在 Firefox Developer Edition 中调试会产生 WSFederationMessageException: ID3204
Debugging in Firefox Developer Edition yields WSFederationMessageException: ID3204
我真的很喜欢 Firefox Developer Edition,但过去我在尝试让它运行时发现了多个问题,在我工作的其他地方通常需要管理员干预。我 运行 遇到的最新问题是,当尝试登录到我正在调试的某个 Web 应用程序(名为 XXX.YYY)时,我在新的客户端站点上遇到了以下服务器错误。当我使用 Internet Explorer 作为我的浏览器时,我没有得到这个。我该怎么做才能纠正它?
Server Error in '/XXX.YYY' Application. ID3204:
WS-Federation SignIn request must specify a 'wtrealm' or 'wreply'
parameter. Description: An unhandled exception occurred during the
execution of the current web request. Please review the stack trace
for more information about the error and where it originated in the
code.
Exception Details:
Microsoft.IdentityModel.Protocols.WSFederation.WSFederationMessageException:
ID3204: WS-Federation SignIn request must specify a 'wtrealm' or
'wreply' parameter.
Source Error:
An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of
the exception can be identified using the exception stack trace below.
Stack Trace:
[WSFederationMessageException: ID3204: WS-Federation SignIn request
must specify a 'wtrealm' or 'wreply' parameter.]
Microsoft.IdentityModel.Protocols.WSFederation.SignInRequestMessage..ctor(Uri
baseUrl, String realm, String reply) +271
Microsoft.IdentityModel.Protocols.WSFederation.WSFederationMessage.CreateFromNameValueCollection(Uri
baseUrl, NameValueCollection collection) +753
Microsoft.IdentityModel.Protocols.WSFederation.WSFederationMessage.TryCreateFromUri(Uri
requestUri, WSFederationMessage& fedMsg) +57
Microsoft.IdentityModel.Web.WSFederationAuthenticationModule.GetSignOutCleanupMessage(HttpRequest
request) +34
Microsoft.IdentityModel.Web.WSFederationAuthenticationModule.CanReadSignInResponse(HttpRequest
request, Boolean onPage) +188
Microsoft.IdentityModel.Web.WSFederationAuthenticationModule.OnAuthenticateRequest(Object
sender, EventArgs args) +85
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
+142 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +92
Version Information: Microsoft .NET Framework Version:4.0.30319;
ASP.NET Version:4.6.1590.0
我找到了解决办法!事实证明,问题是 Firefox Developer Edition 默认情况下不会像 IE 开箱即用的方式那样使用 Windows NT LAN Manager (NTLM) 协议进行身份验证。因此,您必须对其进行配置才能这样做:
- 打开 Firefox Developer Edition 并在地址栏中输入 about:config。你会
提示警告。单击 "I accept the risk!" 按钮。
- 使用浏览器顶部地址栏下方的“搜索”字段查找 network.automatic-ntlm-auth.trusted-uris配置参数。
- 双击配置参数的名称,或右击并select修改。
- 输入您无法进行身份验证的网站的网址。使用格式:
https://localhost
无需指定端口号或任何特定页面的路径,因为身份验证是在逐个站点的基础上进行的。您可以通过逗号分隔来列出多个网站。现在,我尝试在本地调试的 XXX.YYY 网络应用程序运行正常并进行身份验证!
我真的很喜欢 Firefox Developer Edition,但过去我在尝试让它运行时发现了多个问题,在我工作的其他地方通常需要管理员干预。我 运行 遇到的最新问题是,当尝试登录到我正在调试的某个 Web 应用程序(名为 XXX.YYY)时,我在新的客户端站点上遇到了以下服务器错误。当我使用 Internet Explorer 作为我的浏览器时,我没有得到这个。我该怎么做才能纠正它?
Server Error in '/XXX.YYY' Application. ID3204: WS-Federation SignIn request must specify a 'wtrealm' or 'wreply' parameter. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: Microsoft.IdentityModel.Protocols.WSFederation.WSFederationMessageException: ID3204: WS-Federation SignIn request must specify a 'wtrealm' or 'wreply' parameter.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[WSFederationMessageException: ID3204: WS-Federation SignIn request must specify a 'wtrealm' or 'wreply' parameter.]
Microsoft.IdentityModel.Protocols.WSFederation.SignInRequestMessage..ctor(Uri baseUrl, String realm, String reply) +271
Microsoft.IdentityModel.Protocols.WSFederation.WSFederationMessage.CreateFromNameValueCollection(Uri baseUrl, NameValueCollection collection) +753
Microsoft.IdentityModel.Protocols.WSFederation.WSFederationMessage.TryCreateFromUri(Uri requestUri, WSFederationMessage& fedMsg) +57
Microsoft.IdentityModel.Web.WSFederationAuthenticationModule.GetSignOutCleanupMessage(HttpRequest request) +34
Microsoft.IdentityModel.Web.WSFederationAuthenticationModule.CanReadSignInResponse(HttpRequest request, Boolean onPage) +188
Microsoft.IdentityModel.Web.WSFederationAuthenticationModule.OnAuthenticateRequest(Object sender, EventArgs args) +85
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +142 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +92Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.6.1590.0
我找到了解决办法!事实证明,问题是 Firefox Developer Edition 默认情况下不会像 IE 开箱即用的方式那样使用 Windows NT LAN Manager (NTLM) 协议进行身份验证。因此,您必须对其进行配置才能这样做:
- 打开 Firefox Developer Edition 并在地址栏中输入 about:config。你会 提示警告。单击 "I accept the risk!" 按钮。
- 使用浏览器顶部地址栏下方的“搜索”字段查找 network.automatic-ntlm-auth.trusted-uris配置参数。
- 双击配置参数的名称,或右击并select修改。
- 输入您无法进行身份验证的网站的网址。使用格式: https://localhost
无需指定端口号或任何特定页面的路径,因为身份验证是在逐个站点的基础上进行的。您可以通过逗号分隔来列出多个网站。现在,我尝试在本地调试的 XXX.YYY 网络应用程序运行正常并进行身份验证!