Cassini (Visual Studio development web server) by default enables directory browsing, how can I enable directory browsing on IIS Express by default? (I don't want to have a separate configuration for each project I have?
相关问题
- VS2017 RC - The following error occurred when tryi
- How to make a .svc file write to asp.net Trace.axd
- How to deploy python flask application in conda ba
- ASP.NET won't compile to debug
- Web server farms with IIS ? Basic Infos [closed]
Go to
Web.config
file of your project.Add the below two tags in
<system.webServer>
tag inweb.config
<directoryBrowse enabled="true" />
<modules runAllManagedModulesForAllRequests="true" />
you can use
appcmd
toolWhere is one of the commands supported by .Most objects support this basic set of commands:
LIST Display the objects on the machine. An optional can specify a unique object to list, or one or more parameters can be specified to match against object properties.
ADD Create a new object with the specified object properties to set during creation.
DELETE Delete the object specified by the .
SET Set parameters on the object specified by .
Enable directory browsing.
Go to the
IIS
Express install directory.1: Enable directory browsing at the server level
2: Enable directory browsing at the site level
Note: Run with elevated permission
you can verify that the configuration/system.webServer/directoryBrowse@enabled attribute is set to true in the site or application configuration file.
Reference : IIS
for those coming across this years later: directory browsing can also be enabled via IIS Manager:
You should be able to use AppCmd.exe to manage IIS Express. Try this:
More info on AppCmd.exe here: http://learn.iis.net/page.aspx/114/getting-started-with-appcmdexe