single sign on in asp.net

半腔热情 提交于 2019-12-07 02:46:03

问题


We have developed implemented single sign on methodology to authenticate user.

When a page is requested, if it is not authenticated then a login page will be redirected. Once they logged in the requested page will be shown.

this is working when we don't assign a domain to the virtual directory. But when we assign the domain to virtual directory after the authentication the application is not redirecting to the requested page.

We are using FormsAuthentication.GetRedirectUrl method to redirect the requested page.

Why this is happening? How can we resolve this issue?


回答1:


You might want to check Windows Identity Framework too.

Good article here : Windows Identity Foundation features for passive single sign-on and single sign-out




回答2:


First add defaulturl to your web.config and see if page can redirect to defaulturl after authentication

<authentication mode="Forms"> 
        <forms loginUrl = "login.aspx" defaultUrl="default.aspx" />
</authentication>

If defaulturl works then you have to check ReturnUrl parameter in your login page address



来源:https://stackoverflow.com/questions/2964891/single-sign-on-in-asp-net

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