Hi All!. I am building a MVC5 based webApplication. There was a requirement to change the target framework to .NET 4.5. So i changed the target framework of the project from .NET 4.5.2 to 4.5. Now When i am running the codes from Visual Studio, it is throwing the error
HTTP Error 403.14 - Forbidden
The Web server is configured to not list the contents of this directory.
And to my strange in my system i have IIS 7.5, but the error page coming showing title of the page IIS 10. When i reverted the target framework to .NET 4.5.2 also, same problem is occurring.
To add here, in the configured IIS 7.5 in my system, another mvc web application hosted in and it is working fine.
Kindly suggest how to fix this. Thanks in advance.
What I have tried:
I added the below lines of code to my web.config
<system.webserver>
.....
<modules runallmanagedmodulesforallrequests="true">
<add name="UrlRoutingModule" type="System.Web.Routing.UrlRoutingModule, System.Web.Routing, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
</modules>
</system.webserver>
Run the below lines of code in command prompt
C:\Windows\Microsoft.NET\Framework64\v4.0.30319>aspnet_regiis.exe -i
Added the below pieces of code to web.config also
<appsettings>
......
<add key="enableSimpleMembership" value="true" />
<add key="owin:AutomaticAppStartup" value="false" />
</appsettings>
But all in vain.