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 6817863
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T21:06:27+00:00 2026-05-26T21:06:27+00:00

Configuring IIS 6.0 to run an MVC3 application I think I have a configuration

  • 0

Configuring IIS 6.0 to run an MVC3 application

I think I have a configuration issue on my IIS 6 server and I’d like to see if there’s anything I’ve missed.

The problem that I’m having is that anytime when a RedirectToAction(“Index”, “Home”) is executed (e.g. in a method that returns an ActionResult) I would expect that I would be returned to:

http://servername.domain.com/virtualdirectoryname

However, instead I get redirected to:

http://servername.domain.com/virtualdirectoryname/virtualdirectoryname

That is a second instance of the virtualdirectoryname appended to the end of the URL and can’t figure out why – this URL will of course yield a 404 resource not found error. I written and deployed several MVC3 applications both in corporate intranet and public internet environments and can’t figure out what I’ve done wrong. My global.asax.cs seems ok –

public class MvcApplication : System.Web.HttpApplication
{
    public static void RegisterGlobalFilters(GlobalFilterCollection filters)
    {
        filters.Add(new HandleErrorAttribute());
    }

    public static void RegisterRoutes(RouteCollection routes)
    {
        routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

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

    protected void Application_AuthenticateRequest(Object sender, EventArgs e)
    {
        if (HttpContext.Current.User != null)
        {
            if (HttpContext.Current.User.Identity.IsAuthenticated)
            {
                if (HttpContext.Current.User.Identity is FormsIdentity)
                {
                    FormsIdentity id = (FormsIdentity)HttpContext.Current.User.Identity;
                    FormsAuthenticationTicket ticket = id.Ticket;

                    // Get the stored user-data, in this case, our roles
                    string userData = ticket.UserData;
                    string[] roles = userData.Split(',');
                    HttpContext.Current.User = new System.Security.Principal.GenericPrincipal(id, roles);
                }
            }
        }
    }

    protected void Application_Start()
    {
        AreaRegistration.RegisterAllAreas();

        RegisterGlobalFilters(GlobalFilters.Filters);
        RegisterRoutes(RouteTable.Routes);
    }
}

The Application_AuthenticateRequest handles the storing of the roles for logged on users, but other than that, it seems pretty vanilla. The only think I can think of is that I’ve somehow messed up the virtual directory.

Prior to performing any of these steps, I had verified that MVC3 and v4.0 of the .NET framework were installed on the server. There are also other ASP.NET 4.0 applications on this server that have been running without incident. There is also an MVC2 application (MVC2 is also installed) running on this server and has been running without incident.

  1. I created a virtual directory off of the main “default site” using the IIS manager.
  2. Setup appropriate permissions on the folder that this virtual directory points to. Tested with a quick “Hello, World” index.html file.
  3. Copied the application from my development PC where the application works as developed to the folder described in #2.
  4. Updated the Web.Config file, editing the connection strings to point to the test database server; I had also verified these connection strings on my development PC.
  5. Open the web browser and hope for the best.

Any assistance is greatly appreciated.

Thanks!

  • 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. Editorial Team
    Editorial Team
    2026-05-26T21:06:27+00:00Added an answer on May 26, 2026 at 9:06 pm

    I think what you may be seeing is:

    http://servername.domain.com/virtualdirectoryname/applicationname
    

    If you have named your virtual directory the same name as your application then I could see how that could confuse you. If you had no virtual directory and just your application at the root of the Default Web Site you’d be seeing:

    http://servername.domain.com/applicationname
    

    Is your virtual directory the same name as your application name? If so, that is why you see this.

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

Sidebar

Related Questions

Is there any performance benefit in configuring web gardens in IIS? Anyone have any
I'm working on configuring a RollingFileAppender in log4net programmatically. I have something like this
I have built an MVC 3 application and I have a Web Server 2008
When configuring IIS 7 HTTP redirect it appears that there is an option to
For configuring my ASP.Net Application I'm using Custom Configuration Sections in my web.config. But
I am configuring a new environment to run several intranet web applications. I have
When hosting a WCF service on IIS you have an option of manually configuring
I have an e-commerce application running on Tomcat 7 & IIS 7. The souce-code
I have an MVC3 app written in C# that I'd like to generate rel=canonical
im configuring my EC2 instance (amazon web services) on an ubuntu server, to test

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.