I am at my wits end over this. I have an ASP.NET MVC4 web application. I am trying to set it up on a Windows 7 Ultimate 64 bit machine. So far I have installed IIS (version 7.5), installed my web application via a .zip file generated by Visual Studio and installed ASP.NET MVC 4. I have pointed my web page at a .NET 4 application pool. However, every time I try and access the page it gives me the below error:
I tried running the below in the command prompt as it has solved the issue for me in the past (from HTTP Error 403.14 - Forbidden - The Web server is configured to not list the contents of this directory):
%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe -ir
However it didn’t seem to do anything – it just listed all the command line options.
I noticed that in the list of installed applications it is missing the Microsoft ASP.NET MVC 4 runtime (this is present on another of my machines). Is this necessary to get this working? If so, how do I install it? Running the ASP.NET MVC4 installer doesn’t add it.
This is what I’ve enabled in Windows Features:
Can anyone help point me in the right direction? Thanks. I have attached my web.config, but I think the issue is more to do with getting ASP.NET MVC4 to work.
<configuration>
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=4.4.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
<sectionGroup name="elmah">
<section name="security" requirePermission="false" type="Elmah.SecuritySectionHandler, Elmah" />
<section name="errorLog" requirePermission="false" type="Elmah.ErrorLogSectionHandler, Elmah" />
<section name="errorMail" requirePermission="false" type="Elmah.ErrorMailSectionHandler, Elmah" />
<section name="errorFilter" requirePermission="false" type="Elmah.ErrorFilterSectionHandler, Elmah" />
</sectionGroup>
</configSections>
<connectionStrings>
<add name="ConnectDataContextConnectionString" connectionString="User Id=connectadmin;Password=letme1n;Host=ws2012e;Database=cl_svhstest;Persist Security Info=True;Found Rows=true;" />
<add name="DBKey" connectionString="Driver={MySQL ODBC 3.51 Driver};User Id=connectadmin;Password=letme1n;Server=ws2012e;Database=cl_svhstest;Option = 3;Persist Security Info=True;Found Rows=true;" />
<add name="ClTeleceteraDataContextConnectionString" connectionString="User Id=sa;Password=letme1n;Host=ws2012e;Database=cl_telecetera;Persist Security Info=True" />
<add name="DefaultConnection" connectionString="DefaultConnection_ConnectionString" providerName="System.Data.SqlClient" />
</connectionStrings>
<appSettings>
<add key="webpages:Version" value="2.0.0.0" />
<add key="webpages:Enabled" value="true" />
<add key="PreserveLoginUrl" value="true" />
<add key="ClientValidationEnabled" value="true" />
<add key="UnobtrusiveJavaScriptEnabled" value="true" />
<add key="dhx_license" value="dan@telecetera.co.uk-enterprise--aHEjuRAwNm9yY7e7q4uR8P08+A1oBBK/aVgjzekJJdXuvReGeoKI+s3A0CcdEC0tXutD7y4okCfkA8OsRGdIww==" />
<add key="elmah.mvc.disableHandler" value="false" />
<add key="elmah.mvc.disableHandleErrorFilter" value="false" />
<add key="elmah.mvc.requiresAuthentication" value="false" />
<add key="elmah.mvc.IgnoreDefaultRoute" value="false" />
<add key="elmah.mvc.allowedRoles" value="*" />
<add key="elmah.mvc.allowedUsers" value="*" />
<add key="elmah.mvc.route" value="elmah" />
</appSettings>
<location path="">
<system.web>
<authorization>
<deny users="?" />
</authorization>
</system.web>
</location>
<location path="api">
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
</location>
<location path="content">
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
</location>
<location path="scripts">
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
</location>
<system.web>
<trust level="Full" />
<roleManager enabled="true" />
<customErrors mode="Off" />
<compilation targetFramework="4.0" />
<authentication mode="Forms">
<forms loginUrl="~/Login/Index" defaultUrl="~/Login/Index" timeout="10080" />
</authentication>
<pages controlRenderingCompatibilityVersion="4.0">
<namespaces>
<add namespace="System.Web.Helpers" />
<add namespace="System.Web.Mvc" />
<add namespace="System.Web.Mvc.Ajax" />
<add namespace="System.Web.Mvc.Html" />
<add namespace="System.Web.Optimization" />
<add namespace="System.Web.Routing" />
<add namespace="System.Web.WebPages" />
</namespaces>
</pages>
<httpModules>
<add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah" />
<add name="ErrorMail" type="Elmah.ErrorMailModule, Elmah" />
<add name="ErrorFilter" type="Elmah.ErrorFilterModule, Elmah" />
</httpModules>
<httpRuntime maxQueryStringLength="32768" maxRequestLength="1048576" executionTimeout="3600" />
</system.web>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true">
<add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah" preCondition="managedHandler" />
<add name="ErrorMail" type="Elmah.ErrorMailModule, Elmah" preCondition="managedHandler" />
<add name="ErrorFilter" type="Elmah.ErrorFilterModule, Elmah" preCondition="managedHandler" />
</modules>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="1073741824" maxQueryString="32768" />
</requestFiltering>
</security>
<httpErrors errorMode="Detailed" />
<asp scriptErrorSentToBrowser="true" />
<validation validateIntegratedModeConfiguration="false" />
</system.webServer>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-2.0.0.0" newVersion="2.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-2.0.0.0" newVersion="2.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Data.SQLite" publicKeyToken="db937bc2d44ff139" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.0.66.0" newVersion="1.0.66.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="MySql.Data" publicKeyToken="c5687fc88969c44d" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.7.4.0" newVersion="6.7.4.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="0.0.0.0-4.0.0.1" newVersion="4.0.0.1" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
</entityFramework>
</configuration>