Link to home
Start Free TrialLog in
Avatar of LuckyLucks
LuckyLucks

asked on

Running ASP.NET development server locally

Hi:

 I am running VS 2012 and am making use of the local asp.net dev server that VS provides. However, on CTRL+F5 I get the following error:


HTTP Error 403.14 - Forbidden

The Web server is configured to not list the contents of this directory.



Most likely causes:
•A default document is not configured for the requested URL, and directory browsing is not enabled on the server.



Things you can try:
•If you do not want to enable directory browsing, ensure that a default document is configured and that the file exists.
• Enable directory browsing. 1.Go to the IIS Express install directory.
2.Run appcmd set config /section:system.webServer/directoryBrowse /enabled:true to enable directory browsing at the server level.
3.Run appcmd set config ["SITE_NAME"] /section:system.webServer/directoryBrowse /enabled:true to enable directory browsing at the site level.

•Verify that the configuration/system.webServer/directoryBrowse@enabled attribute is set to true in the site or application configuration file.



So it says: Run appcmd set config /section:system.webServer/directoryBrowse /enabled:true to enable directory browsing at the server level. But it doesn't recognize the command appcmd on local computer.
ASKER CERTIFIED SOLUTION
Avatar of Systech Admin
Systech Admin
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of LuckyLucks
LuckyLucks

ASKER

I don't have a server...so no IIS...just my local PC.
So, I am following this article: http://www.iis.net/configreference/system.webserver/directorybrowse

Under the Configuration subsection, I can not add the enabled = true attribute for the section name="directoryBrowse"  as its not a recognized tag. This is in the IISExpress/config folder's applicationhost config file.

<sectionGroup name="system.webServer">
       
         
            <section name="asp" overrideModeDefault="Deny" />
            <section name="caching" overrideModeDefault="Allow" />
            <section name="cgi" overrideModeDefault="Deny" />
            <section name="defaultDocument" overrideModeDefault="Allow" />
            <section name="directoryBrowse" overrideModeDefault="Allow"/>
            <section name="fastCgi" allowDefinition="AppHostOnly" overrideModeDefault="Deny" />
            <section name="globalModules" allowDefinition="AppHostOnly" overrideModeDefault="Deny" />
            <section name="handlers" overrideModeDefault="Deny" />
            <section name="httpCompression" allowDefinition="AppHostOnly" overrideModeDefault="Deny" />
            <section name="httpErrors" overrideModeDefault="Allow" />
            <section name="httpLogging" overrideModeDefault="Deny" />
            <section name="httpProtocol" overrideModeDefault="Allow" />
            <section name="httpRedirect" overrideModeDefault="Allow" />
            <section name="httpTracing" overrideModeDefault="Deny" />
            <section name="isapiFilters" allowDefinition="MachineToApplication" overrideModeDefault="Deny" />
            <section name="modules" allowDefinition="MachineToApplication" overrideModeDefault="Deny" />
            <section name="odbcLogging" overrideModeDefault="Deny" />


Secondly, the appcmd is not a recognized command as mentioned in the initial question.
Ok was a combination of things but as this was the only comment posted.