Search This Blog

Loading...

Friday, November 21, 2008

Deploy ASP.NET MVC App on Windows XP (IIS 5.1)

Deploying ASP.NET MVC application on Windows XP is definitely not easy; there are a lot of settings that need to be tuned. Not only that the application must be changed as well.

The first thing to do is to add the relevant mapping to the Application Configuration of the MVC application. To do this, one must go to Start-> Control Panel-> Administrative Tools-> Internet Information Services. Then, one should click on  the Internet Information Services icon, right-click on the MVC application, and select Properties. On the Virtual Directory Tab, choose Configuration, as shown below:


After clicking on the Configuration panel, choose the Executable to be the aspnet_isapi.ll, and the extension to be ".*", make sure that the "check that file exists" is unchecked. If the OK button is disabled, you must click on the textbox for the Executable, and only then the OK button is enabled.

Click OK all the way to close the Administrative tools.

One must also add a route to the RegisterRoutes static function. Here is the syntax that is compatible with ASP.NET MVC Beta
routes.Add(new Route
(
"{controller}.mvc/{action}/{id}",
new RouteValueDictionary(new { action = "Index", id = (string)null }),
new MvcRouteHandler()

));

Look through your MVC application, make sure that you don't have any hardcode reference to controller class or action method. If you are using



Make sure you change it to



If you have



make sure you change it to



With all these tweakings, hopefully your MVC can run on Windows XP!!

32 comments:

Anonymous said...

Just wanted to thank you so much for the tid bit regarding the catch-all extension mapping. The greyed out "OK" button was driving me nuts, and your article was the first thing to point out that fix.

Seriously, thanks!

Anonymous said...

Dang... Thanks for the info for the script src info...
Do you have any ideas for images urls in css??

Chelo said...

Thank you very much. this helps me a lot

Anonymous said...

I found this site using [url=http://google.com]google.com[/url] And i want to thank you for your work. You have done really very good site. Great work, great site! Thank you!

Sorry for offtopic

Alex Ilyin said...

Hello, I've been facing the same problem and written an article on subject
http://www.codeproject.com/KB/aspnet/iis-aspnet-url-rewriting.aspx

Dave said...

Thanks very much, this worked for me. The Microsoft article refers to a script at http://aspnet.codeplex.com/releases/view/39978 which doesn't seem to exist, but with your help I didn't need the script

Anonymous said...

Thanks.
It helps me and save my time

Anonymous said...

Thank you, this really helped to some extent. But I am still having trouble getting the default page show up. When I access the site, I get page not found error inspite of adding the route, extensions everything. I am not sure why it is not able to go display the Index.aspx located under Home folder of Views? Any help would be appreciated.

Anonymous said...

worked fine for me with a NASTY side effect. all request are since then NOT cached.

In other words, all browser request return with 200 ok, instead with the 304 not modified for the cached one.

I have checked everything else - http works fine, this mapping to aspnet_isapi.dll on server side is the guilty one for sure.

Any remedy?

Anonymous said...

Thank you so much..it worked for me .

Adecus said...

Access to css files is gone for me using this method. Any workaround for that?

Anonymous said...

Thanks..perfectly worked in my xp machine with iis5.1

Anonymous said...

When working with ASP/MVC apps a good idea would be to use T4MVC so that all paths resolve correctly. Unfortunately, the url path inside css are still an issue.

Anonymous said...

Hi,

Looks like your article helped lot of people with hosting MVC application on IIS5.1. I am not able host it even after following the steps given in your article. Not sure whats the issue. my applicaiton runs fine if i run it from VS2010, but on the same PC if i host it on IIS 5.1 using the steps given in this article, it won't work. Other than these steps given in this article, do i need to do anything else to host ASP.Net MVC application on IIS5.1?

Thank You!

Satinder said...

Thank you so much.. You are a life saver

Data Recovery Services said...

Hey this is a cool job... It is helping a millions of guys to do interviews. Cheers and keep the good work up....!!!
usb drive recovery

Anonymous said...

Very helpful article. The configuration mapping works for my MVC3 application on IIS 5.1 Windows XP.

Thank you!

Anonymous said...

I seldom leave remarks, however i did a few searching and wound up here "Deploy ASP.NET MVC App on Windows XP (IIS 5.1)".
And I actually do have 2 questions for you if you tend not to mind.
Is it only me or does it seem like some of these comments
appear as if they are written by brain dead visitors?

:-P And, if you are posting on other sites, I would like to
keep up with everything fresh you have to post. Could you list of the complete urls of
your community pages like your linkedin profile, Facebook page or
twitter feed?

Here is my site ... menopause symptoms

Anonymous said...

When some one searches for his vital thing,
therefore he/she wishes to be available that in detail, therefore that thing is maintained over here.


Also visit my blog post: meratol reviews

Anonymous said...

Fastidious respond in return of this query with genuine arguments and explaining everything on the topic of that.


my webpage; perfect Waist to hip Ratio

Anonymous said...

Very nice post. I just stumbled upon your blog and wished to say that I've really enjoyed surfing around your blog posts. After all I will be subscribing to your rss feed and I hope you write again very soon!

Feel free to visit my web-site yeaste Infection

Anonymous said...

First of all I would like to say excellent blog! I had a quick question
which I'd like to ask if you do not mind. I was curious to know how you center yourself and clear your mind before writing. I have had a difficult time clearing my mind in getting my ideas out. I truly do enjoy writing however it just seems like the first 10 to 15 minutes are wasted just trying to figure out how to begin. Any recommendations or hints? Thanks!

Here is my web site: discount volume pill

Anonymous said...

We are a group of volunteers and starting a new scheme in our community.
Your website offered us with valuable info to work on.
You've done a formidable job and our whole community will be grateful to you.

Look at my site ... Provillus

Anonymous said...

I always spent my half an hour to read this webpage's posts all the time along with a mug of coffee.

my web site; male enhancement methods

Anonymous said...

Unquestionably believe that which you said. Your favorite justification seemed to
be on the net the simplest thing to be aware of. I say to you, I
definitely get irked while people consider worries that they plainly do not know about.

You managed to hit the nail upon the top as well as defined out the whole thing without having
side effect , people can take a signal. Will likely be back to get more.

Thanks

Here is my web page; buy genf20 plus

Anonymous said...

Magnificent beat ! I wish to apprentice while you amend your site, how can i
subscribe for a blog site? The account helped me a
acceptable deal. I had been a little bit acquainted of this
your broadcast offered bright clear idea

Here is my blog buy virility ex

Anonymous said...

It's enormous that you are getting thoughts from this post as well as from our dialogue made at this place.

my web site - total curve

Anonymous said...

Great items from you, man. I have consider your stuff prior to and you are just extremely wonderful.
I really like what you have bought here, really like what you're saying and the way in which through which you assert it. You are making it enjoyable and you still care for to keep it wise. I can't wait to read far
more from you. This is actually a great web site.


Have a look at my web-site - breast actives cream review

Anonymous said...

I am really impressed with your writing skills as well as with the layout on
your blog. Is this a paid theme or did you customize it yourself?
Either way keep up the nice quality writing, it's rare to see a nice blog like this one nowadays.

Stop by my weblog buy alta white

Anonymous said...

It's difficult to find knowledgeable people on this topic, however, you seem like you know what you're talking about!
Thanks

Here is my page ... provillus or viviscal

Anonymous said...

Hi, i think that i saw you visited my site thus i came to “return the
favor”.I'm trying to find things to improve my site!I suppose its ok to use a few of your ideas!!

my webpage: smoke deter

Anonymous said...

This is the perfect web site for everyone who would like to understand this topic.
You understand so much its almost hard to argue with you (not that I really would want to…HaHa).
You definitely put a fresh spin on a topic which has been discussed for ages.

Wonderful stuff, just wonderful!

My web-site: buyaciphex.beep.com