G
Guest
My google skills must be dwindling. I am trying to determine how in ASP.NET
2.0 I can get the ReturnUrl querystring variable in Forms Authentication to
contain the absolute url.
Just like others that have posed this question, we are an enterprise
environment that has multiple websites across multiple servers and we are
trying to setup Web SSO for our public internet site that will be accessible
by our clients.
ASP.NET seems to have half the equation. I can setup the machine key so the
one cookie can be read by all of the web apps but if the Login page contained
in its own central site is unable to send the user back, not a very nice
experience for them.
I tried the one post I found about having code in the
Application_AuthenticateRequest of Global.asax in each client web app (here
it is written in Csharp):
protected void Application_AuthenticateRequest(object sender, EventArgs e)
{
//Setup the return URL to be full path of my application
if (!Request.IsAuthenticated)
{
HttpCookie formCookie = new
HttpCookie(FormsAuthentication.FormsCookieName);
formCookie.Values["RequestURL"] = Request.Url.AbsoluteUri;
Request.Cookies.Add(formCookie);
}
}
But I can't get it to work. The cookie I added here is gone by the time it
gets to my Login page on the other site (which is just another virtual folder
on my dev machine right now).
Plus, this means I would have to ask every single web app team going forward
to put this code into their apps. Having to touch web.config for all of the
apps is ugly enough (to turn on Forms Authentication and set the login page).
I would rather get my hands on an assume-I-am-a-newbie guide to getting ADFS
Web SSO working. But this is all I have to work with for now.
Noremac
2.0 I can get the ReturnUrl querystring variable in Forms Authentication to
contain the absolute url.
Just like others that have posed this question, we are an enterprise
environment that has multiple websites across multiple servers and we are
trying to setup Web SSO for our public internet site that will be accessible
by our clients.
ASP.NET seems to have half the equation. I can setup the machine key so the
one cookie can be read by all of the web apps but if the Login page contained
in its own central site is unable to send the user back, not a very nice
experience for them.
I tried the one post I found about having code in the
Application_AuthenticateRequest of Global.asax in each client web app (here
it is written in Csharp):
protected void Application_AuthenticateRequest(object sender, EventArgs e)
{
//Setup the return URL to be full path of my application
if (!Request.IsAuthenticated)
{
HttpCookie formCookie = new
HttpCookie(FormsAuthentication.FormsCookieName);
formCookie.Values["RequestURL"] = Request.Url.AbsoluteUri;
Request.Cookies.Add(formCookie);
}
}
But I can't get it to work. The cookie I added here is gone by the time it
gets to my Login page on the other site (which is just another virtual folder
on my dev machine right now).
Plus, this means I would have to ask every single web app team going forward
to put this code into their apps. Having to touch web.config for all of the
apps is ugly enough (to turn on Forms Authentication and set the login page).
I would rather get my hands on an assume-I-am-a-newbie guide to getting ADFS
Web SSO working. But this is all I have to work with for now.
Noremac