WSDL 调用网络服务;服务器无法处理请求 ---> System.Security.AuthenticationException
WSDL Calling Web Service; Server was unable to process request ---> System.Security.AuthenticationException
我有一个程序可以通过 WSDL 结构向 Web 服务发送请求,然后接收响应。目前我收到的回复是:
<soap:Fault>
<faultcode>soap:Server</faultcode>
<faultstring>System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.Security.Authentication.AuthenticationException: Failed to authenticate Rewards service - (5.0.0):Authentication with the SecurityService has failed for username 'exam269'
at P3Rewards.ServiceHost.RewardsServiceState.GetPrincipal(Boolean& fromLocalCache, Boolean& fromP3Cache) in c:\Development\P3Rewards\Source\P3Rewards.ServiceHost\RewardsServiceState.cs:line 105
at P3Rewards.ServiceHost.ServiceMethodCall`2.GenerateController() in c:\Development\P3Rewards\Source\P3Rewards.ServiceHost\ServiceMethodCall.cs:line 254
at System.Lazy`1.CreateValue()
--- End of stack trace from previous location where exception was thrown ---
at System.Lazy`1.get_Value()
at P3Rewards.ServiceHost.ServiceMethodCall`2.get_Controller() in c:\Development\P3Rewards\Source\P3Rewards.ServiceHost\ServiceMethodCall.cs:line 27
at P3Rewards.ServiceHost.ServiceMethodCall`2.LogResponse() in c:\Development\P3Rewards\Source\P3Rewards.ServiceHost\ServiceMethodCall.cs:line 245
at P3Rewards.ServiceHost.ServiceMethodCall`2.Execute() in c:\Development\P3Rewards\Source\P3Rewards.ServiceHost\ServiceMethodCall.cs:line 149
at P3Rewards.ServiceHost.ServiceMethodCall`2.ServiceCallMethodFluentHandler.Execute() in c:\Development\P3Rewards\Source\P3Rewards.ServiceHost\ServiceMethodCall.cs:line 88
at P3Rewards.ServiceHost.RewardsService.NewMemberRegistration(String source, NewMember registerMember) in c:\Development\P3Rewards\Source\P3Rewards.ServiceHost\RewardsService.asmx.cs:line 163
--- End of inner exception stack trace ---</faultstring>
<detail />
</soap:Fault>
关于发生了什么问题有什么想法吗?
您可能提供了错误的 credentials.You 跟踪中有以下内容:
Authentication with the SecurityService has failed for username 'exam269'
来自异常的 MSDN 描述,here:
The NegotiateStream and SslStream classes throw this exception when
the client or server cannot be authenticated. When this exception is
thrown, you can retry the authentication with different credentials.
If you cannot retry the authentication, a FatalAuthenticationException
is thrown instead of the AuthenticationException.
我有一个程序可以通过 WSDL 结构向 Web 服务发送请求,然后接收响应。目前我收到的回复是:
<soap:Fault>
<faultcode>soap:Server</faultcode>
<faultstring>System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.Security.Authentication.AuthenticationException: Failed to authenticate Rewards service - (5.0.0):Authentication with the SecurityService has failed for username 'exam269'
at P3Rewards.ServiceHost.RewardsServiceState.GetPrincipal(Boolean& fromLocalCache, Boolean& fromP3Cache) in c:\Development\P3Rewards\Source\P3Rewards.ServiceHost\RewardsServiceState.cs:line 105
at P3Rewards.ServiceHost.ServiceMethodCall`2.GenerateController() in c:\Development\P3Rewards\Source\P3Rewards.ServiceHost\ServiceMethodCall.cs:line 254
at System.Lazy`1.CreateValue()
--- End of stack trace from previous location where exception was thrown ---
at System.Lazy`1.get_Value()
at P3Rewards.ServiceHost.ServiceMethodCall`2.get_Controller() in c:\Development\P3Rewards\Source\P3Rewards.ServiceHost\ServiceMethodCall.cs:line 27
at P3Rewards.ServiceHost.ServiceMethodCall`2.LogResponse() in c:\Development\P3Rewards\Source\P3Rewards.ServiceHost\ServiceMethodCall.cs:line 245
at P3Rewards.ServiceHost.ServiceMethodCall`2.Execute() in c:\Development\P3Rewards\Source\P3Rewards.ServiceHost\ServiceMethodCall.cs:line 149
at P3Rewards.ServiceHost.ServiceMethodCall`2.ServiceCallMethodFluentHandler.Execute() in c:\Development\P3Rewards\Source\P3Rewards.ServiceHost\ServiceMethodCall.cs:line 88
at P3Rewards.ServiceHost.RewardsService.NewMemberRegistration(String source, NewMember registerMember) in c:\Development\P3Rewards\Source\P3Rewards.ServiceHost\RewardsService.asmx.cs:line 163
--- End of inner exception stack trace ---</faultstring>
<detail />
</soap:Fault>
关于发生了什么问题有什么想法吗?
您可能提供了错误的 credentials.You 跟踪中有以下内容:
Authentication with the SecurityService has failed for username 'exam269'
来自异常的 MSDN 描述,here:
The NegotiateStream and SslStream classes throw this exception when the client or server cannot be authenticated. When this exception is thrown, you can retry the authentication with different credentials. If you cannot retry the authentication, a FatalAuthenticationException is thrown instead of the AuthenticationException.