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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T22:31:55+00:00 2026-05-10T22:31:55+00:00

I implemented OpenID support for an ASP.Net 2.0 web application and everything seems to

  • 0

I implemented OpenID support for an ASP.Net 2.0 web application and everything seems to be working fine on my local machine.

I am using DotNetOpenId library. Before I redirect to the third party website I store the orginal OpenID in the session to use when the user is authenticated (standard practice I believe).

However I have a habit of not typing www when entering a URL into the address bar. When I was testing the login on the live server I was getting problems where the session was cleared. My return url was hard coded as http://www.mysite.com.

Is it possible that switching from mysite.com to www.mysite.com caused the session to switch?

Another issue is that http://www.mysite.com is not under the realm of mysite.com.

What is the standard solution to these problems. Should the website automatically redirect to www.mysite.com? I could just make my link to the log in page an absolute url with containing www? Or are these just hiding another problem?

  • 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-10T22:31:55+00:00Added an answer on May 10, 2026 at 10:31 pm

    Solve the realm problem that you mentioned is easy. Just set the realm to *.mysite.com instead of just mysite.com. If you’re using one of the ASP.NET controls included in the library, you just set a property on the control to set the realm. If you’re doing it programmatically, you set the property on the IAuthenticationRequest object before calling RedirectToProvider().

    As far as the session/cookie problem goes with hopping between the www and non-www host name, you have two options:

    1. Rather than storing the original identifier in the session, which is a bad idea anyway for a few reasons, use the IAuthenticationRequest.AddCallbackArguments(name, value) method to store the user’s entered data and then use IAuthenticationResponse.GetCallbackArgument(name) to recall the data when the user has authenticated.
    2. Forget it. There’s a reason the dotnetopenid library doesn’t automatically store this information for you. Directed identity is just one scenario: If the user types ‘yahoo.com’, you probably don’t want to say to them ‘Welcome, yahoo.com!’ but rather ‘Welcome, id.yahoo.com/andrewarnott’! The only way you’re going to get the right behavior consistently is to use the IAuthenticationResponse.FriendlyIdentifierForDisplay property to decide what to display to the user as his logged in identifier. It gives more accurate information, and is easier than storing a value in the callback and getting it back. 🙂
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have implemented a straightforward OpenID support for my ASP.NET app with DotNetOpenAuth .
I've implemented a web application with form and OpenID authentication, but in addition I
On a website I have implemented the login using OpenID (based on StackOverflow). But
I'm attempting to implement OpenID with ASP.NET MVC (Yeah, we haven't heard that one
I'm trying to implement OpenId login for a web application. Whenever new user who
I have a Windows server application, implemented in C++ using the Win32 API, that
I've implemented an OpenID controller using Dnoa. I was using the approach found in
Is there a simple example of OpenID authentication implemented using MVC ?
General Description I implemented an OP (OpenID Provider), using DotNetOpenAuth . I am testing
Before I reinvent the wheel, ASP.Net MVC 3 Tools Update includes an Internet Application

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.