Why is my MVC site showing the following error message when I try to browse it?
HTTP Error 403.14 - Forbidden
The Web server is configured to not list the content of this directory.
Solution:
Some MVC sites might require to be run in Class Mode instead of integrated mode. To fix this issue:
1) Go to your control panel -> websites-->manage website and change your website from Integrated Mode to Classic Mode.
2) If you are running asp.net 4, please add the following to your web.config file.
<
handlers
>
<
add
name
=
"StaticFile1"
path
=
"*.*"
verb
=
"*"
modules
=
"StaticFileModule,DefaultDocumentModule,DirectoryListingModule"
resourceType
=
"Either"
requireAccess
=
"Read"
/>
<
add
name
=
"wildcard map"
path
=
"*"
verb
=
"*"
modules
=
"IsapiModule"
scriptProcessor
=
"C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll"
resourceType
=
"Unspecified"
preCondition
=
"classicMode,runtimeVersionv4.0,bitness32"
/>
</
handlers
>
3) If you are running asp.net 3.5, please add the following to your web.config instead:
<
add
name
=
"ASP.NET-ISAPI-2.0-Wildcard"
path
=
"*"
verb
=
"GET,HEAD,POST,DEBUG"
modules
=
"IsapiModule"
scriptProcessor
=
"%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll"
preCondition
=
"classicMode,runtimeVersionv2.0,bitness32"
responseBufferLimit
=
"0"
/>
Article ID: 314, Created: January 5, 2013 at 9:53 AM, Modified: January 23, 2017 at 12:40 AM