How to force ASP.NET forms authentication to use a

2019-05-12 00:10发布

问题:

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:

Check this link: http://blogs.freshlogicstudios.com/Posts/View.aspx?Id=cb739183-6a0b-46bc-9179-22aed8e60433



回答2:

try this

<httpRuntime useFullyQualifiedRedirectUrl=”true”