How to force ASP.NET forms authentication to use absolute URL for ReturnUrl parameter?

此生再无相见时 提交于 2019-12-10 09:47:01

问题


When you use ASP.NET forms authentication, and you want to surf to a secure page like securepage.aspx, you would be redirected to this URL:

http://www.example.com/login.aspx?returnurl=securepage.aspx`

Is there a way to get the absolute URL in login page, like:

http://www.example.com/login.aspx?returnurl=http://www.example.com/securepage.aspx

I need this feature, because I'm working on a rather complicated SSO project, and I need to always work with absolute URLs.


回答1:


try this

<httpRuntime useFullyQualifiedRedirectUrl=”true”


来源:https://stackoverflow.com/questions/7584114/how-to-force-asp-net-forms-authentication-to-use-absolute-url-for-returnurl-para

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!