Manish Pansiniya's Blog

.NET, C#, Javascript, ASP.NET and lots more…:)

Session expire in the same site due to different type of access (could be wrong access of data)

leave a comment »

We were working on the project and we have one issue.

User access site with http://londondreams.com and in the same project we have some hardcoded URL which we need to put (Sometime in life you find some issue which you could not change due to time limitation and other priority work).

Now, when we first started fetching the site, it has one session. But when url http://www.londondreams.com called from code, it creates new session and when we goto next page, we have entirely new sessionstate parameter. And so, all old sessions which are connected to the website when we accessed the page are gone.

And due to that we got the null in all session paramater.

We wrote a code in global.asax that all the request which is accessed without www will be 302 redirects and goto www.londondreams.com.

We lost good amount of quality time into this project. Hope it would help.

If anybody has better solution, you can post it here.

[tweetmeme only_single=”false”]
Advertisements

Written by Manish

September 24, 2010 at 7:19 pm

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: