Odd Things of ASP.NET MVC Deployment on IIS 6 - asp.net-mvc

Recently, I am a bit interested in the deployment of ASP.NET MVC application on IIS6 because Phil Haack posted an easier way to deploy ASP.NET MVC application on ASP.NET 4. So I decided to see how different version of ASP.NET MVC works on different version of ASP.NET.
First off, I created an ASP.NET MVC 2 project in Visual Studio 2010 and deploy it to IIS 6 on Windows Server 2003 (only .NET framework 3.5 installed). I set the application to run in ASP.NET 2.0 and no extra stuff. Because I just wanted to see what sort of error would occur. And as expected, some error was reported as following.
Then, I set the Copy Local attribute of System.Web.Mvc assembly to true as following and deploy again.
As a result, the application ran smoothly.
I had read tons of materials talked about the mess of deploying MVC application on IIS 6. And I did fight to tackle the deploying issues in my previous project. At least, if had used Extensionless Url in your application, you should have configured wildcard mapping in IIS. But in this case, I even didn’t have chance to do so.
What the heck was going on exactly? Did I discover a new continent?

Perhaps your IIS is configured with a wildcard module mapping. With other words, the request path ".*" is being send to the asp.net ISAPI module.

Related

When is the mono implementation of mvc 5 expected to come out ?

Currently I am trying to figure out the architecture for a product revamp. The current project is in Asp.Net Webforms 4.0 but I am leaning heavily towards MVC 5 now. Problem is that a few customers (around 10%) do not want to get stuck with Windows Server licensing but our dev team/environment is .Net/Windows based. I was wondering if I could build it in MVC 5 leveraging the latest features like scaffolding, filtering, etc and also be able to port it to Linux based platform through Mono.
Does it sound realistic ?
I wanted to know about the timelines for a stable implementation of MVC 5 in Mono so that I can know whether I can depend on Mono when my team would be working on portability 2-4 months down the line. Otherwise MVC 5 may be a dealbraker for us.
I went through the Mono site and it links to StackOverflow for any questions ... so here I am
MVC 5 will likely never be 100% stable/supported on Mono, as it builds upon System.Web which Microsoft never open-sourced and is difficult to recreate in Mono. edit this may change now that the sources for System.Web have been made open source.
MVC 6 (and all the other stuff from ASP.NET "vNext") is a complete rewrite to get rid of System.Web and will support Mono out of the box, as Microsoft actively tests on it.
See http://www.asp.net/vnext, https://github.com/aspnet/Home and https://github.com/aspnet/Mvc.
My advice would be to keep an eye an ASP.NET "vNext" (it is in development stage right now, but will be the future of ASP.NET for the next decade) if you want to have proper Mono support. You can also start with MVC 5 now, but be aware that there will be breaking changes by the time you upgrade to MVC6.
You could also try Nancyfx, which is a MVC framework that has been built from the start to work with .net and mono.
I currently use it on a project. I develop on windows and .net and then publish(copy files) to Unbuntu and mono. Its very seamless.
Nancy's hosting support is very broad also.
Hosting Nancy with ASP.NET
Hosting Nancy with WCF
Hosting Nancy with Azure
Hosting Nancy with OWIN
Hosting Nancy with Umbraco
Hosting Nancy with Nginx on Ubuntu
Hosting Nancy with FastCgi
Self Hosting Nancy

How can I deploy an MVC 4 application to IIS 6?

I'm working on my first MVC application (also my first web project) and want to deploy it to a test server running Windows Server 2003 with IIS 6. It's a simple CRUD app built with VS 2012 using .NET 4, Entity Framework 5. I built the DB first on SQL Server 2005 since my manager wanted to see the DB first. I used the EF Power Tools Beta 4 to reverse-engineer back to Code First. I customized the T4 templates to allow for Data Annotations.
The app works fine using IIS Express on my development PC, but I want to get an initial version out to our test server, which unfortunately, is running IIS 6. Nobody where I work has experience with MVC...just ASP.NET with VB, and I'm having trouble finding good step-by-step instructions on how to deploy it.
first setup extensionless urls based on Phil Haack's blog post: ASP.NET MVC on IIS 6 Walkthrough.
Second Source click here
I found this article to be helpful:
http://www.asp.net/mvc/tutorials/older-versions/deployment/using-asp-net-mvc-with-different-versions-of-iis-cs

Is there a certain IIS configuration required to allow a functioning .Net 4.0 ASP.Net MVC 2 Azure application?

I just installed the Azure 1.2 tools update and would like to get to work on an Azure project running locally using ASP.Net MVC and .Net 4, but I cannot get MVC pages to load.
If I just create a new Azure project in VS 2010, add a ASP.Net MVC web role, and run the application, pages never load. It appears that routing is somehow at fault as controller actions never get called, but if I add other pages to the project (like .htm or .aspx) they will load in the browser.
It all works fine with a new project using .Net 3.5, MVC 2 project in the Azure development environment; it all works fine with .Net 4.0 MVC 2 project that is not running in Azure; only the combination does not work.
Environment is Win 7 x64 (IIS 7.5), VS 2010, Azure tools 1.2
Is there some magic IIS setting I need to change or something? Any ideas?
Check if you have "HTTP Redirection" feature enabled.
See here

Run ASP.NET MVC in Internet Hosting Providers

My question is very simple. Can I run an ASP.NET MVC application on shared servers that has installed ASP.NET 3.5 but not MVC?
If this is possible could you tell me how?
You just need to include System.Web.dll in the bin folder and it should work fine (and maybe in the dll folder for routing. I'll check out for exact article for this in a moment).
Here's a link with proper a TODO.
Most interesting part:
With the release of ASP.NET MVC Beta, the assemblies distributed with ASP.NET MVC are automatically installed into the GAC.
System.Web.Mvc
System.Web.Routing
System.Web.Abstractions
While developing an application locally, this isn’t a problem. But when you are ready to deploy your application to a hosting provider, this might well be a problem if the hoster does not have the ASP.NET MVC assemblies installed in the GAC.
Fortunately, ASP.NET MVC is still bin-deployable. If your hosting provider has ASP.NET 3.5 SP1 installed, then you’ll only need to include the MVC DLL. If your hosting provider is still on ASP.NET 3.5, then you’ll need to deploy all three. It turns out that it’s really easy to do so.

Does ASP.NET MVC need to be installed on my production web server?

My IT folks don't like to install software on their precious servers unless they must. To that extent, does the server that serves my ASP.NET MVC application need to have the MVC 1.0 Framework on it in addition to .NET 3.5 sp 1 Framework?
Nope. You can deploy the System.Web.Mvc.dll to your application's bin directory if MVC has not been installed on the server. The only requirement is that the server have .NET Framework 3.5 (preferably with SP1)
Phil Haack put together an article on bin deploying MVC apps here. It mentions the ASP.Net MVC beta drop, but it still works just fine (given the caveat that .Net 3.5's installed).

Resources