Click here to Skip to main content
15,881,882 members
Articles / Web Development / ASP.NET

Installing a Production Server for ASP.NET MVC 2 – Part 2

Rate me:
Please Sign up or sign in to vote.
5.00/5 (1 vote)
28 Feb 2011CPOL1 min read 21.7K   5  
How to install a production server for ASP.NET MVC 2

A few days ago, I helped a client to solve a problem they had when they deployed an ASP.NET MVC 2 application. .Net Logo with ASP.NETIn a previous post, I wrote about how you can install a production server in order to run ASP.NET MVC 2 application. The client team has installed the server according to the AspNetMVC2 MSI installer section (in my post) and then they used Phil Haack’s IIS6 Extension-less URLs solution to enable the routing engine. Life was beautiful and they were on the right track.

But…
running the application produced the “page cannot be found” page:

Page not found

This made them and me scratch our heads. So the first thing to do in such cases is to check the IIS log file which can be very helpful by holding the error code which was 404.2. While Googling the net, we found the Getting an ASP.NET 4 application to work on IIS6 post by Johan Driessen which holds the solution. Apparently, when you install .NET 4 on Windows Server 2003 with IIS6, the .NET 4 ASP.NET ISAPI extension is installed disabled…
By using the following command through the command line, you can check whether the ISAPI is enabled:

cscript iisext.vbs /ListFile

If you find out that the status for the .NET 4 ASP.NET ISAPI extension is 0, then in order to enable it, you will need to run the following command in the command line:

cscript iisext.vbs /EnFile C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll

You need to run both of the previous commands in <WINDOWS DIR>/System32.
That solved the client’s problems and the application is running on the production server now.
Thanks Johan!
Image 3

Image 4 Image 5 Image 6 Image 7 Image 8 Image 9 Image 10 Image 11 Image 12 Image 13

Image 14

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Technical Lead sparXys
Israel Israel
Gil Fink is a web development expert and ASP.Net/IIS Microsoft MVP. He is the founder and owner of sparXys. He is currently consulting for various enterprises and companies, where he helps to develop Web and RIA-based solutions. He conducts lectures and workshops for individuals and enterprises who want to specialize in infrastructure and web development. He is also co-author of several Microsoft Official Courses (MOCs) and training kits, co-author of "Pro Single Page Application Development" book (Apress) and the founder of Front-End.IL Meetup. You can read his publications at his website: http://www.gilfink.net

Comments and Discussions

 
-- There are no messages in this forum --