我们已成功设置Windows Azure AD租户,并根据本教程http://msdn.microsoft.com/en-us/library/windowsazure/dn151790.aspx
在我们的ASP.NET应用程序中实现了网络单点登录我们正在使用组织身份进行身份验证,但如果用户已使用其他Microsoft帐户(Windows Live ID)登录到其他网站,则会收到非常用户不友好的错误消息。 - “ACS20016:登录用户的域与此STS的任何允许域都不匹配。”
我们有什么方法可以提供更友好的用户错误消息吗?如果在登录过程中发生错误,是否有类似ACS中的错误URL将用户重定向到自定义错误页面?
答案 0 :(得分:0)
完全可能。
ACS为您提供编码JSON中的错误消息 像这样
{"context":null,"httpReturnCode":401,"identityProvider":"Google","timeStamp":"2010-12-17 21:01:36Z","traceId":"16bba464-03b9-48c6-a248-9d16747b1515","errors":[{"errorCode":"ACS30000","errorMessage":"There was an error processing an OpenID sign-in response."},{"errorCode":"ACS50019","errorMessage":"Sign-in was canceled by the user."}]}
通过此功能,您可以完全控制页面,您可以按照所需的方式显示错误消息,并将页面标记为与依赖方网站的外观相匹配。