Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/31.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
.net 如何覆盖ReturnUrl查询字符串参数值的设置方式?_.net_Asp.net_Forms Authentication - Fatal编程技术网

.net 如何覆盖ReturnUrl查询字符串参数值的设置方式?

.net 如何覆盖ReturnUrl查询字符串参数值的设置方式?,.net,asp.net,forms-authentication,.net,Asp.net,Forms Authentication,如果用户在未经身份验证的情况下请求页面,则会将其重定向到查询字符串中带有返回URL的登录页面。然而,返回的URL是一个物理资源,但是在我们的应用程序中,我们使用虚拟资源,这些虚拟资源通过URL重写映射到物理资源 因此,如果用户最初请求: http://foo.com/bar/Pages/Performance/Employee/Summary.aspx?ID=1104 登录调用FormsAuthentication.RedirectFromLoginPage后,会将它们重定向到: http:/

如果用户在未经身份验证的情况下请求页面,则会将其重定向到查询字符串中带有返回URL的登录页面。然而,返回的URL是一个物理资源,但是在我们的应用程序中,我们使用虚拟资源,这些虚拟资源通过URL重写映射到物理资源

因此,如果用户最初请求:

http://foo.com/bar/Pages/Performance/Employee/Summary.aspx?ID=1104
登录调用
FormsAuthentication.RedirectFromLoginPage
后,会将它们重定向到:

http://foo.com/bar/Pages/Performance/Summary.aspx?ID=1104
这是假设页面在物理上位于Pages/Performance中


如何更改ReturnUrl参数的设置方式?

这个类似的问题可能会对您有所帮助