M
mohaaron
Hello all,
I'm having a problem using the ReturnUrl parameter while using
FormsAuthentication. If I already have some querystring parameters in
the url like this.
NonSecurePage.aspx?param1=value1¶m2=value2
I now click a link to a secure page and I get redirected by
FormsAuthentication to the login page and I get this.
Login.aspx?ReturnUrl=/NonSecurePage.aspx?param1=value1¶m2=value2¶m1=value1¶m2=value2
Where this causes the first problem is in my BasePage class where I
have the following public properties.
public string Param1
{
get { this.param1 = this.Request.QueryString["param1"]; }
}
public string Param2
{
get { this.param2 = this.Request.QueryString["param2"]; }
}
With the duplicate parameters in the querystring the returned value for
each of the above variables is duplicated with a comma between the
values. This is very annoying at the least to deal with and in some
cases really causes problems.
The second problem that happens with this is that the value returned
from Request.QueryString["ReturnUrl"] looks like this.
NonSecurePage.aspx?param1=value1
So when the redirect is done the second parameter is missing.
Does anyone have any experience with this and how I might fix it? I
have done quite a bit of searching the web for solutions and haven't
found anyone else with this problem.
What do I do?
I'm having a problem using the ReturnUrl parameter while using
FormsAuthentication. If I already have some querystring parameters in
the url like this.
NonSecurePage.aspx?param1=value1¶m2=value2
I now click a link to a secure page and I get redirected by
FormsAuthentication to the login page and I get this.
Login.aspx?ReturnUrl=/NonSecurePage.aspx?param1=value1¶m2=value2¶m1=value1¶m2=value2
Where this causes the first problem is in my BasePage class where I
have the following public properties.
public string Param1
{
get { this.param1 = this.Request.QueryString["param1"]; }
}
public string Param2
{
get { this.param2 = this.Request.QueryString["param2"]; }
}
With the duplicate parameters in the querystring the returned value for
each of the above variables is duplicated with a comma between the
values. This is very annoying at the least to deal with and in some
cases really causes problems.
The second problem that happens with this is that the value returned
from Request.QueryString["ReturnUrl"] looks like this.
NonSecurePage.aspx?param1=value1
So when the redirect is done the second parameter is missing.
Does anyone have any experience with this and how I might fix it? I
have done quite a bit of searching the web for solutions and haven't
found anyone else with this problem.
What do I do?