2010-12-27 8 views
0

WCFサービスコールを行うWindowsサービスがあります。通常、正常に動作します。しかし、ときどきWindowsサービスを再起動すると、MessageSecurityExceptionがスローされ、すべてが投げられ、その後も繰り返し投げられます。Windows Service throw MessageSecurityException

解決策は、AllowedImpersonationLevelに「偽装」を設定することです。ただし、偽装は一切使用していません。また、それはランダムな問題であり、必ずしも再現可能ではありません。したがって、このソリューションは無関係です。

誰かがこれに照らすことができる光は高く評価されます。

エラーメッセージのスタックトレースは:

2010-12-24 23:18:42,581 [3] ERROR [DataSync] – An error occured during Data Sync [(null)] System.ServiceModel.Security.MessageSecurityException: The HTTP request is unauthorized with client authentication scheme ‘Negotiate’. The authentication header received from the server was ‘Negotiate,NTLM’. -> System.Net.WebException: The remote server returned an error: (401) Unauthorized. at System.Net.HttpWebRequest.GetResponse() at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout) —End of inner exception stack trace --

Server stack trace: at System.ServiceModel.Channels.HttpChannelUtilities.ValidateAuthentication(HttpWebRequest request, HttpWebResponse response, WebException responseException, HttpChannelFactory factory) at System.ServiceModel.Channels.HttpChannelUtilities.ValidateRequestReplyResponse(HttpWebRequest request, HttpWebResponse response, HttpChannelFactory factory, WebException responseException, ChannelBinding channelBinding) at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout) at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout) at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs) at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation) at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

+0

IISでホストされているWCFサービスは反対ですか?はいの場合は、ユーザーがIISログに失敗した要求を記録していることを確認しますか? – amit

答えて

0

これは環境問題です。マシンがドメインコントローラに接続できなかったため、認証を実行できませんでした。このため、この断続的な問題が発生しました。

関連する問題