Problem with deploying ASP.NET MVC3 app - asp.net-mvc-3

This question is related to this: Problem with bin Deploying ASP.NET MVC 3 I erase the line with targetFramework="4.0" but now I have another problem. It says:
Could not load file or assembly 'EntityFramework' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.
I can´t get access to IIS server because it is from provider of my hosting. It´s weird because one of my website is running on this server (MVC3 too) and now I am trying add next and it is not working. Thanks for every help.

Have you made sure your provider has .NET 4.0 installed on their server?
It sounds like you are trying to run a .NET 4.0 application on a server that only has .NET 3.5 installed

Related

What needs to be installed in a Windows Server 2008 R2 to allow it to run ASPNET MVC 4 apps?

I've installed the .NET 4.5 framework using the dotNetFx45_Full_x86_x64.exe installer, and the ASPNET MVC4 framework using the AspNetMVC4Setup.exe installer in a Windows 2008 R2 server, yet I keep getting the message 'There is no build provider registered for the extension '.cshtml'.' while trying to run my ASPNET MVC4 app.
I've fixed this temporarily by adding a buildProviders section in my Web.config, but I would like to know how to setup a server so that I can use the current framework without having to touch my Web.config (the same way I can run them in my dev machine).
This is a shot in the dark, but "aspnet_regiis -i" maybe?
(make sure to run the version in the correct directory on your server)
http://msdn.microsoft.com/en-us/library/k6h9cz8h(v=vs.80).aspx
UPDATE:
Did you also deploy the following .dlls in your BIN folder of your web app?
System.Web.Helpers.dll
System.Web.Mvc.dll
System.Web.WebPages.Deployment.dll
system.Web.WebPages.dll
System.Web.WebPages.Razor.dll

requirements to deploy the mvc 3 application to the server

I want to deploy the application in the Windows Server 2008 R2. But I am wondering if I need to install the .Net Framework 4.0 since the version available in the server is 2.0? Do I need also to install the MVC Framework?
you don't need to install MVC, only dlls can do the task
there are different ways to do it, see links
http://msdn.microsoft.com/en-us/library/dd410407(v=vs.90).aspx
http://msdn.microsoft.com/en-us/library/gg286946.aspx
http://weblogs.asp.net/scottgu/archive/2011/01/18/running-an-asp-net-mvc-3-app-on-a-web-server-that-doesn-t-have-asp-net-mvc-3-installed.aspx
You may use the ASP.NET MVC3 installer,
or simply copy the required dlls into bin directory of your web application
such as System.Web.Mvc.dll,
System.Web.Helpers.dll,
System.Web.Razor.dll,
System.Web.WebPages.dll,
System.Web.WebPages.Razor.dll,
System.Web.WebPages.Administration.dll,
System.Web.WebPages.Deployment.dll,
Microsoft.Web.Infrastructure.dll

configuring website using windows server2003,IIS6.0 and MVC

I have been going through http://haacked.com/archive/2008/11/26/asp.net-mvc-on-iis-6-walkthrough.aspx but so far I have not been able to configure my website. These are the steps I have done:
Downloaded and installed .net 4.0
I have built and published my website to inetpub/root on windows server2003
I have used IIS to do the cofiguration as per haacked. It seems that despite setting the asp.net 4.0(please see image) in the webservice extensions
did you install MVC on the server? So that it has the MVC DLLs
MVC install
You should change the path to aspnet_isapi.dll to the one from .NET 4:
C:\Windows\Microsoft.NET\Framework\v4.0.21006\aspnet_isapi.dll

Hosting/Publishing MVC3 on IIS6

So to be specific, I'm using a windows server 2003 (that means iis 6). I've already installed ASP.NET MVC 3 RTM and .NET 4.
I've tried a few guides already.I've tried Haacked's guide too, then navigated to the root.
eg.
localhost/MyWebApp which showed Directory Listing denied (permission related problem probably not relevant to my actual problem).
Visiting another view, localhost/MyWebApp/Home.mvc/Index, showed 404 error page.
Is there anything I'm missing? I don't have any visual studio installed on the server but should I have used the Web Platform Installer instead?
Is your app working correctly when you deploy it from visual studio to local IIS?
The "Home.mvc" looks a little odd - with the default routes that would imply a controller named "Home.mvcController", which is not valid.
The other obvious thing to check is that "MyWebApp" is set up as a web application using a .NET 4 app pool rather than just being a directory.

Azure Full IIS deployment issue - TypeLoadException

I have an application using the Azure 1.4 SDK (previously 1.3 with same problem). If I try and deploy the application as Full IIS I get the following error in Intellitrace logs.
System.TypeLoadException: Unable to load the role entry point due to the following exceptions: System.IO.FileLoadException: Could not load the file or assembly 'System.Web.Mvc, Version=2.0.0.0..blah..The located assemblies manifest does not match the assembly reference.
The web site is using ASP.NET MVC 3, not version 2. It seems the Full IIS is looking for the wrong versions of the dll's. I have set the MVC dll's in the project to Copy Local so they should be deployed in the bin directory.
If I deploy the site as a legacy hosted web core by commenting out the sections in the ServiceDefinition.csdef it all deploys and works fine.
This seems like it was an application that may have been created as an MVC2 application, and then later you migrated it to MVC3, correct? The reason it is failing is that you have both MVC2 and MVC3 installed on your machine, and when you're running it locally, your application is loading MVC2 out of the GAC. When you deploy it to Azure it can't find MVC 2, since MVC is not installed on the base Azure images that you get when you create a new Deployment.
I would check through my config files and look very closely for any references to MVC 2.0. Take a look at a reference like this and make sure you haven't overlooked any steps. You may have neglected to change the project type guid, or missed one of the config files.

Resources