Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 82373
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T21:36:24+00:00 2026-05-10T21:36:24+00:00

Where can I find some good pointers on best practices for running ASP.NET MVC

  • 0

Where can I find some good pointers on best practices for running ASP.NET MVC on IIS6?

I haven’t seen any realistic options for web-hosts who provide IIS7-hosting yet. Mostly because I don’t live in the U.S.

So I was wondering on how you best build applications in ASP.NET MVC and make it easily available to deploy on both IIS6 and IIS7. Keep in mind that this is for standard web-hosts, so there is no access to ISAPI-filters or special settings inside IIS6.

Are there anything else one should think about when developing ASP.NET MVC-applications to target IIS6? Any functions that doesn’t work?

UPDATE: One of the bigger issues is the thing with routes. The pattern {controller}/{action} will work on IIS7, but not IIS6 which needs {controller}.mvc/{action}. So how do I make this transparent? Again, no ISAPI and no IIS-settings, please.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T21:36:25+00:00Added an answer on May 10, 2026 at 9:36 pm

    It took me a bit, but I figured out how to make the extensions work with IIS 6. First, you need to rework the base routing to include .aspx so that they will be routed through the ASP.NET ISAPI filter.

    routes.MapRoute(     'Default',                                              // Route name     '{controller}.aspx/{action}/{id}',                      // URL with parameters     new { controller = 'Home', action = 'Index', id = '' }  // Parameter defaults ); 

    If you navigate to Home.aspx, for example, your site should be working fine. But Default.aspx and the default page address of http://[website]/ stop working correctly. So how is that fixed?

    Well, you need to define a second route. Unfortunately, using Default.aspx as the route does not work properly:

    routes.MapRoute(     'Default2',                                             // Route name     'Default.aspx',                                         // URL with parameters     new { controller = 'Home', action = 'Index', id = '' }  // Parameter defaults ); 

    So how do you get this to work? Well, this is where you need the original routing code:

    routes.MapRoute(     'Default2',                                             // Route name     '{controller}/{action}/{id}',                           // URL with parameters     new { controller = 'Home', action = 'Index', id = '' }  // Parameter defaults ); 

    When you do this, Default.aspx and http://[website]/ both start working again, I think because they become successfully mapped back to the Home controller. So the complete solution is:

    public class MvcApplication : System.Web.HttpApplication {     public static void RegisterRoutes(RouteCollection routes)     {         routes.IgnoreRoute('{resource}.axd/{*pathInfo}');          routes.MapRoute(             'Default',                                              // Route name             '{controller}.aspx/{action}/{id}',                      // URL with parameters             new { controller = 'Home', action = 'Index', id = '' }  // Parameter defaults         );          routes.MapRoute(             'Default2',                                              // Route name             '{controller}/{action}/{id}',                            // URL with parameters             new { controller = 'Home', action = 'Index', id = '' }  // Parameter defaults         );     }      protected void Application_Start()     {         RegisterRoutes(RouteTable.Routes);     } } 

    And your site should start working just fine under IIS 6. (At least it does on my PC.)

    And as a bonus, if you are using Html.ActionLink() in your pages, you should not have to change any other line of code throughout the entire site. This method takes care of properly tagging on the .aspx extension to the controller.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Related Questions

Loading...

Sidebar

Ask A Question

Stats

  • Questions 54k
  • Answers 54k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer Just install svn as normal on the new server, copy… May 11, 2026 at 7:30 am
  • added an answer Try this: require 'nokogiri' html_text = '<html><body><h1>Foo</h1><p>The quick brown fox.</p><h1>Bar</h1><p>Jumps… May 11, 2026 at 7:30 am
  • added an answer Two thoughts: (1) The hyphen might be treated as a… May 11, 2026 at 7:30 am

Top Members

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.