Ask a Question related to ASP.NET Security, Design and Development.
-
Brian Adkins #1
FormsAuthentication.GetRedirectUrl() returns only first parameter
It appears that FormsAuthentication.GetRedirectUrl() only returns the first
parameter for the original target URL. For example, if the original target
URL is:
/MyPage.aspx?a=b&c=d
and the user is redirected to the login page, a call to
FormsAuthentication.GetRedirectUrl() in the login page returns:
/MyPage.aspx?a=b
Any ideas as to why this may be?
Thanks,
Brian Adkins
[url]http://www.MLSClassified.com[/url]
Brian Adkins Guest
-
Cookie not persisted w/o call to GetRedirectUrl()
I am using forms authentication. I do not have default.aspx nor do I want one as I am using multiple roles and I want to redirect the user after... -
FormsAuthentication.GetRedirectUrl returns non-existing page ??
hi, i have copied to my PC an ASP.NET project that was developed on a different PC. I have managed to create a virtual directory and build the... -
Date Parameter For Saved Parameter Queries
Hi again, I finally got to using saved parameter queries in my application (a big thank you to Bob Barrows for helping me with this). Currently... -
#26132 [Opn]: pg_fetch_object returns NULL on serial and INT in record but returns strings NP
ID: 26132 User updated by: steven at pearavenue dot com Reported By: steven at pearavenue dot com Status: Open Bug... -
#26132 [NEW]: pg_fetch_object returns NULL on serial and INT in record but returns strings NP
From: steven at pearavenue dot com Operating system: Redhat 9.0/Apache 2.0 PHP version: 4.3.4 PHP Bug Type: PostgreSQL... -
Brian Adkins #2
Re: FormsAuthentication.GetRedirectUrl() returns only first parameter
I was able to create a workaround that I've included below, but if anyone
has additional insight into this problem, please post to the group.
StringBuilder redirectUrl =
new StringBuilder(FormsAuthentication.GetRedirectUrl(" ", false));
NameValueCollection coll = Request.QueryString;
foreach (string key in coll.AllKeys)
{
if (string.Compare(key, "returnurl", true) != 0)
{
String[] values = coll.GetValues(key);
if (values.Length > 0)
{
string pair = key + "=" + values[0];
if (redirectUrl.ToString().IndexOf(pair) < 0)
{
redirectUrl.Append("&" + pair);
}
}
}
}
"Brian Adkins" <brian> wrote in message
news:ex08LHm%23DHA.1212@TK2MSFTNGP12.phx.gbl...first> It appears that FormsAuthentication.GetRedirectUrl() only returns thetarget> parameter for the original target URL. For example, if the original> URL is:
>
> /MyPage.aspx?a=b&c=d
>
> and the user is redirected to the login page, a call to
> FormsAuthentication.GetRedirectUrl() in the login page returns:
>
> /MyPage.aspx?a=b
>
> Any ideas as to why this may be?
>
> Thanks,
>
> Brian Adkins
> [url]http://www.MLSClassified.com[/url]
>
>
Brian Adkins Guest



Reply With Quote

