THY02K
February 19th, 2005, 03:45 AM
ASP.NET Single Login and IFRAME
To enable "Single Login", I have configured web.config to use form authentication with same "name" attribute. For your reference: http://www.codeproject.com/aspnet/aspnetsinglesignon.asp?forumid=36840&select=1042673&df=100&msg=1042673
Basically, this is how it's done. In "web.config":
<authentication mode="Forms">
<forms name=".EXAMPLE-AUTH" loginUrl="/Login.aspx"
protection="All" timeout="30" path="/" />
</authentication>
And in your login page:
...
Dim C As System.Web.HttpCookie = _
System.Web.Security.FormsAuthentication.GetAuthCookie(UserName, False)
Response.AppendCookie(C)
... redirection and the rest ...
Now, the problem is, I have an aspx page (http://localhost/AppA) that contains an iframe which points back to another page from same domain (same server in fact) but resides in a different virtual directory/application (http://localhost/AppB). User logon to AppA, which takes user to one page in AppA that contains the iframe, everything is fine.. But within this iframe user is redirected to AppB's login page?
Thanks in advance.
To enable "Single Login", I have configured web.config to use form authentication with same "name" attribute. For your reference: http://www.codeproject.com/aspnet/aspnetsinglesignon.asp?forumid=36840&select=1042673&df=100&msg=1042673
Basically, this is how it's done. In "web.config":
<authentication mode="Forms">
<forms name=".EXAMPLE-AUTH" loginUrl="/Login.aspx"
protection="All" timeout="30" path="/" />
</authentication>
And in your login page:
...
Dim C As System.Web.HttpCookie = _
System.Web.Security.FormsAuthentication.GetAuthCookie(UserName, False)
Response.AppendCookie(C)
... redirection and the rest ...
Now, the problem is, I have an aspx page (http://localhost/AppA) that contains an iframe which points back to another page from same domain (same server in fact) but resides in a different virtual directory/application (http://localhost/AppB). User logon to AppA, which takes user to one page in AppA that contains the iframe, everything is fine.. But within this iframe user is redirected to AppB's login page?
Thanks in advance.