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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T12:15:05+00:00 2026-05-15T12:15:05+00:00

When trying to access my site: www.X.com The browser changes the url to: www.X.com/

  • 0

When trying to access my site:

http://www.X.com

The browser changes the url to:

http://www.X.com/

The problem is that the result url is:

http://www.X.com/HomePage.aspx?ReturnUrl=/

(HomePage.aspx is the default page)

On IE: http://www.X.com/HomePage.aspx?ReturnUrl=%2f

For some reason the Forms Authentication treats / as a page that the user is trying to access and then gets redirects to: HomePage.aspx?ReturnUrl=/

How can I set the Forms Authentication (or the MVC routing) not to treat / as a page, so when accessing http://www.X.com it will not change the url?

The site runs on windows server 2008 IIS7, .NET 4.

(When running on IIS6 it didn’t have this problem)

Web.config:

<authentication mode="Forms">
            <forms name=".AUTHCOOKIE" loginUrl="HomePage.aspx" defaultUrl="Loading.aspx" timeout="9480" />
  </authentication>

MVC Routing (not sure it’s related):

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

        routes.MapRoute("Actions", "A/{controller}/{action}", new { controller = "Tasks", action = "InitPage" });

    }

Thanks

Rafael

  • 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-15T12:15:05+00:00Added an answer on May 15, 2026 at 12:15 pm

    Actually, when you access http://www.x.com, you are requesting http://www.x.com/. When you get redirected to the validation form in IIS/.Net, RedirectTo= is always appended at the end of the URL, so that the server knows where do you wanted to go before your request was intercepted.

    Or to put it another way: everything is working as expected. What’s exactly what you want to do?

    If it helps, I see two things “weird” with the code you included:

    • The Login page is called HomePage.aspx. That’s… unusual (with that name, HomePage.aspx should be the page you go to after login, not the login page). Moreover, you mention MVC, but that’s not a MVC route.
    • Your only route in Global.asax starts with “A/”, so that http://www.x.com/ won’t be captured by it. If your start page must be http://www.x.com/A/Tasks/InitPage, either make A a route parameter {whatever}, and assign it a default value, or create another MapRoute that captures the “/” request, and redirects to the correct path. Probably adding a Default.aspx to the project would work, but it would be very un-MVC.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've had some users trying to access a site that is registered as subdomain.example.com
this URL www.jinfuwu.com can be access in windows browser,windows telnet, but in my ubuntu
I have a very simple sinatra site that I'm trying to access via ajax
Hey. I need to prevent direct access to http://www.site.com/wp-content/uploads/folder/something.pdf through the browser. However the
Having an issue with random individuals trying to access an intranet site with a
I'm trying to use FireWatir (1.6.5) to access a site using Basic Authentication and
I am trying to allow access to every subdomain on my site in order
I have a Facebook page at https://www.facebook.com/xxxx and a web site at http://xxxx.com .
My domain (let's call it www.example.com) creates a cookie. On another site (let's say,
I have a symlink from /var/www/web/ to /projects/Symfony/web/ . When trying to access my

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.