I've been trying to get an MVC 5 web application running on a server. It has not been a good day :-(
The server is Windows Server 2008. I have installed NET Framework 4 and NET Framework 4.5. I spent ages trying to get past a really weird 403 Access Forbidden error before discovering that adding this attribute gets the site loading.
<modules runAllManagedModulesForAllRequests="true">
I am now getting an error within an internal constructor that seems to be called before my Application_Start method. I am using the Membership Database, since I've upgraded an MVC 3 project to MVC 5. I mention this since I've seen a few questions on SO where people have encountered this problem using OpenAuth.
From what I've read the problem is connected to the security model changing. This question is one such example.. However, the AllowPartiallyTrustedCallersAttribute
is not available in MVC 5.
I've ran the project successfully on my local machine but pushing it to a server is looking a touch tricky. I suspect there is something not quite right with the set up on the server but I'm at a bit of a loss now to guess what.
EDIT
The problem is with the recommended version of System.Web.WebPages. If I comment that out in my web.config then the project runs. It doesn't look as nice as it should be it definitely runs! I've going to try and install this web app on a server running Windows 2008 R2 Datacentre. I'll post my results.
<dependentAssembly>
<assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>