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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T08:41:36+00:00 2026-05-16T08:41:36+00:00

After authentication, asp.net redirects my users to …/myapp/default.aspx instead of …/myapp/ Is there some

  • 0

After authentication, asp.net redirects my users to …/myapp/default.aspx instead of …/myapp/

Is there some way of fixing this? I think it’s a little ugly not to mention redundant to contain the extra default.aspx on the url.

I’ve tried putting the following code in my default.aspx.cs page_load function, but it results in a redirect loop because it cannot distinguish whether the user is accessing myapp/ or myapp/default.aspx:

if (Request.RawUrl.ToLower().EndsWith("/default.aspx"))
  Response.Redirect("./");

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-16T08:41:37+00:00Added an answer on May 16, 2026 at 8:41 am

    If you are using a login control, decide yourself how the redirect will happen.
    Use the login control’s event (I think it is Authenticate) and:

    if (Request.QueryString["ReturnUrl"] != null)  
    {  
        FormsAuthentication.RedirectFromLoginPage("someuserid", false);  
    }  
    else  
    {  
        FormsAuthentication.SetAuthCookie("someuserid", false);  
        Response.Redirect("~/SomePage.aspx");  
    } 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using forms authentication with Asp.Net 4. At the moment when the users
I have an Asp.Net MVC project with the typical forms authentication that redirects the
In our asp.net intranet application we are using windows authentication to authenticate the users.
So I'm getting some problem similar to this: ttp://stackoverflow.com/questions/3694475/asp-net-forms-authentication-authenticates-in-localhost-server-but-not-on-the-w but I'm using MVC 3.0
I have many sites under one ASP.NET forms authentication. They have mixed frameworks (some
From my understanding after Googling the issue, the authentication ticket used by ASP.NET for
I'm using ADFS for authentication in my ASP.net web app. The STS server redirects
I am trying to manage session of users after authentication with ldap. The authentication
After working on some test code for open ID authentication, I had a break
Is there any way to retrieve a user's email address after authenticating with Yesod's

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.