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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T02:13:35+00:00 2026-06-15T02:13:35+00:00

There was a post 3 months ago asking essentially my question, but I’m reposting

  • 0

There was a post 3 months ago asking essentially my question, but I’m reposting as no answers came back that can handle my scenario. Issue is that when forms authentication redirects to the login page in ASP.NET, the hash portion of the URL is lost (since it is never sent to the server), so after login, the user is not directed to the correct location. It was suggested that the user could store off the hash value at the time the user is redirected, but in my case that won’t work because the user is accessing the page from a link in an email, and the redirect happens not in my code, but automatically due to the web.config forms configuration. Any thoughts how I can allow users to be directed to the correct hash-based deep link after login?

Here’s the existing post: .net IE8 hash url redirect

Here’s a post on how someone solved for the same browser behavior in Java: http://forum.springsource.org/showthread.php?101421-Preserving-URL-anchor-when-redirecting

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-06-15T02:13:37+00:00Added an answer on June 15, 2026 at 2:13 am

    The following workaround fixes the issue:

    1) In email link, include a querystring variable that contains an encoded version of the hash address, AND include the hash address contents

            myUrl = baseUrl + "Account\" + acctId + "?route=%2FApplication%2FEntry" + "#/Application/Entry"
    

    2) In login page’s server side code, read the route and use it to append the hash portion to the returnUrl that the login page will redirect to after login:

            if (returnUrl.Contains("?route="))
            {
                string[] split = returnUrl.Split(new string[] { "?route=" }, StringSplitOptions.None);
                var route = Server.UrlDecode(split[1]);
                returnUrl = split[0] + "#" + route;  
            }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

By @user.posts , I can see there is a post with :unfinished status. But
I implimented the FB post to my app so the users can post there
There is a post on this topic already, but it does not have an
There is a post here that talks about this as being a bad idea
I know there is this post , but I still want to know more
Referring back to this SO post If there is a Grouping category Category which,
I'm trying to measure the popularity of a post but there's no current system
This question is related with one of my earlier questions.. Previous Post In there
I have a project that worked for months, but I updated the ADT Plugin
I need to get a list of months that contain Posts in the Post

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.