I've 2 web site. From web site 1 I need to execute login into website 2 and return to original requested url (requested url of website 1).
On login click, whan I execute Response.Redirect(FormsAuthentication.GetRedirectUrl("...", false)) I always achieve something like "http://website2/requestedPage.aspx", instead, I should getting the first website : "http://website1/requestedPage.aspx".
In other words, GetRedirectUrl method aòways assume that I'm working in the same domina, so web site name is implied.
Of course I could to explicit webSite name, but I don't want it because tomorrow, maybe I'll have to do login from another one web site.
Is there a simple way to get web site name that required login function?