I have an application that combines webforms with mvc3 hosted in IIS.
What corresponds to MVC 3 works perfectly in IIS, but when I try to access the pages .aspx not work
Error:
Parser Error Message: Unrecognized attribute 'targetFramework'. Note that attribute names are case-sensitive.
<compilation debug="true" targetFramework="4.0">
I have configured the Application Pools with .NET 4. The error occurs only when I try to access the pages .aspx. The rest works perfectly.
Note: When running the alplicacion with VS 2010 all works perfectly
Fix for Issue with 'targetFramework'
You need to register IIS with Asp.net v 4.0.
Using command prompt do it C:\Windows\Microsoft.NET\Framework\v4.0.30319>aspnet_regiis.exe -i
Your application pool under which the application hosted may not be Asp.net v 4.0. Create a new application pool of Asp.net version v 4.0 and managed pipeline mode - Integrated. And host your application under that.
Fix for Issue with Report Viewer
For fixing the issue with report viewer , you should install Microsoft Report Viewer 2010 Redistributable in the server.( ASp.Net MVC 3 also need to be installed in the server)
Related
I have created an application installer for my MVC3 project and have followed the BIN Deployment suggestions found online.
My site has been installed but I don't get any pages displayed.
This is how the VS2010 installer project looks
and this is how I have IIS setup
How do you get the Home Index page to be the default page as it is when I run the application through Visual studio?
IIS 6.0 doesn't support extensionless urls out of the box. This means that if you try to navigate to /Home/Index, IIS 6.0 doesn't know that this is an ASP.NET application and nothing happens. Extensionless urls are supported out of the box starting from IIS 7.0 when running the application in managed pipeline mode.
You will need to associate the unmanaged aspnet_isapi.dll filter with ASP.NET if you want to achieve that. Phil Haack covered how this topic in his blog post (ASP.NET 4.0) and this post (for CLR 2.0, which is not your case since you are using 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
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.
I just started using ASP.NET MVC 3 with the Razor view engine. It works great locally, however when I published the site to my web server, it gives me the error:
Method not found: 'System.Web.Razor.GeneratorResults System.Web.Razor.RazorTemplateEngine.GenerateCode(System.IO.TextReader, System.String, System.String, System.String)'.
I installed ASP.NET MVC 3 on the server and it's running under the .NET 4 app pool. Any ideas?
My guess is you have a preview version of MVC isntalled on the server. Make sure that you have MVC 3 RTM installed.
Simply uninstalling and reinstalling MVC alone didn't fix it, I needed to recycle my app pool and restart my IIS application as well.
My guess is there is a bug in the update from RC to RTM versions... The Gu is on the case so i'm sure it will be fixed in the next MVC revision.
I'm trying to run an MVC3 rc new application created a simple from vs 2010 , no changes to the project , from IIS 7.5 but i'm getting 404 error.
are there some changes that are required in the web.config or IIS settings for extensionless url
I have a mvc2 running on the same IIS and tried to set the same config but I guess I'm missing something.
thanks
My bad I was running .net 2.0 instead of 4.0