Link to home
Start Free TrialLog in
Avatar of David Robitaille
David RobitailleFlag for Canada

asked on

asp.net Using Tilde "~" in path gives ip adress and port instead of domain name.

I'm deploying a application and i got a problem with the url resolution on the server side.

When I'm login, the browser detect my authentication cookie as a third-party Cookie.

My investigations leed me to think it's the redirection links appear to resolve to a IP adress and a port number instead of my subdomain.
(i got http://xxx.xxx.xxx.xxx:xxx/login.aspx instead of http://sub.myDomain.com/login.aspx) I got the corect adress in the adress bar.

I think our in-house sysadmin put my app on is iis server as a "web app" that lisent on a specific port, then he redirect it somewere to sub.myDomain.com. But how those thing works is not my duty.

What could I do or ask to my in-house sysadmin?
 


Avatar of Saqib Khan
Saqib Khan
Flag of United States of America image

Try to set the Domain Propety when you setup/create a cookie

response.cookies("TEST").domain = "yourdomain.com"

this way system will ignore sub domain.
Avatar of David Robitaille

ASKER

doesn`t help.
<authentication mode="Forms">
<forms name=".AuthCookie" timeout="30" slidingExpiration="true" domain="myDomain.com" />
</authentication>
i dont create cookies for the main domain or anything.it just the automatic thisn that asp.net does to create the login...
 if i goes in the page - Web page privacy policy in IE, i got the  http://sub.myDomain.com and some other entry like http://xxx.xxx.xxx.xxx:xxx/login.aspx
ASKER CERTIFIED SOLUTION
Avatar of David Robitaille
David Robitaille
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial