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

  • Home
  • SEARCH
  • 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

Ask A Question

Stats

  • Questions 83k
  • Answers 83k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer For firefox you can add the css style: (mozilla guide)… May 11, 2026 at 4:47 pm
  • Editorial Team
    Editorial Team added an answer You are using the data type 'json' you need to… May 11, 2026 at 4:47 pm
  • Editorial Team
    Editorial Team added an answer Lets say a bunch of patients wants to go see… May 11, 2026 at 4:47 pm

Related Questions

I have a project in mind, here's the pitch. When I come to a
I like the idea of CardSpace but unlike OpenID it seems like a real
I'm interested to know if there's any sites out there that has implemented CardSpace
I'm going to be developing a REST-ful Web Service for a new public website.

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.