Click here to Skip to main content
15,889,281 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Hi,

I have a web application that is accessed by internal users using

http://coms/ . Now tehy decided to call this application home so users can access it using http://home/ . To make it transparent for users network admin added DNS redirect from coms to home. So if use types in http://coms it takes them to http://home . This is working fine but now I am facing issue with session variables. I have form based authentication and SSL enabled on the web pages. Once staff is logged in based on their role they will be redirected to their proper home pages. Everything works fine till this point and users are able to navigate within application properly. I have an Upload documents page which is not secured through SSL but users needs to upload documents through the application so whenever they click on that upload documents link the web page goes from https://coms/Staff/Details.aspx to http://coms/Upload.aspx. Just before redirecting user to Upload documents page I am setting one session variable Sessin["ID"]=somevalue. When I check that variable in Upload.aspx page it is showing null. The application was working perfectly fine right to the day we added DNS redirect from http://coms to http://home.

Here is the IIS bit :

http://COMS bind to 172.16.0.212
http://home bind to 172.16.0.212


Is DNS redirect doing cross domain redirect for every request ?

When I access the application through external website ( www.appname.com ) everything works perfectly fine. So my assumption is that redirect is killing session variable somehow. What is your point of view on this ?
Posted
Updated 8-Dec-10 10:01am
v2

Unfortunately different domains are different applications with all respectful followings.
If this is only for users authentication and authorization I would recommend you to use the built-in membership.
In this case your members will be controlled by the single database and all the setting will be defined in the web.config
Good lick.
 
Share this answer
 
you can't use same sessions on different domains
 
Share this answer
 
Comments
virang_21 8-Dec-10 15:46pm    
I am not sure if DNS redirect is making every request a cross domain request ?
Finally I resolved it. I made changes to IIS and rather than having two sites pointing to same directory I have one site pointing to the application with different DNS names and IP addresses. Now my IIS config for the application is like this :

Site name : COMS
Bindings :

http:// COMS bind to 172.16.0.212
http:// HOME bind to 172.16.0.213
http://www.appname.com bind to external link IP.

So basically three bindings with one site so one application pool.

DNS is doing redirect from COMS to HOME so all good now. No more issue with sessions. :laugh:
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900