且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

HTTP请求未经客户端身份验证方案“匿名"授权.从服务器收到的身份验证标头

更新时间:2022-02-18 22:03:13

我遇到了相同的调试问题.


HTTP请求未经客户端身份验证方案'Anonymous'的授权.从服务器收到的身份验证标头是"NTLM",用于localhost

这是堆栈跟踪.

我正在使用基本的http绑定;服务和客户端都在Win 2008上运行服务器

"\ r \ n服务器堆栈跟踪:\ r \ n在System.ServiceModel.Channels.HttpChannelUtilities.ValidateAuthentication(HttpWebRequest请求,HttpWebResponse响应,WebException responseException,HttpChannelFactory工厂)在系统中. ServiceModel.Channels.HttpChannelUtilities.ValidateRequestReplyResponse(HttpWebRequest请求,HttpWebResponse响应,HttpChannelFactory工厂,WebException responseException)在System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan超时)\ r \ n在系统中. .Channels.RequestChannel.Request(消息,TimeSpan超时)\ r \ n在System.ServiceModel.Dispatcher.RequestChannelBinder.Request(消息,TimeSpan超时)\ r \ n在System.ServiceModel.Channels. ServiceChannel.Call(String action,Boolean oneway,ProxyOperationRuntime operation,Object [] ins,Object [] outs,TimeSpan timeout)\ r \ n在System.ServiceModel.Channels.ServiceChannel.Call(String action,Boolean oneway,ProxyOperationRuntime操作, System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall,ProxyOperationRuntime operation)的对象[] ins,Object [] outs)\ r \ n在System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage消息)\ r \ n r \ n \ r \ nException在[0]处重新抛出:\ r \ n在System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg,IMessage retMsg)\ r \ n在System.Runtime.Remoting.Proxies.RealProxy .PrivateInvoke(MessageData& msgData,Int32类型)\ r \ n在IService.GetAvailableLocations()\ r \ n在ServiceClient.GetAvailableLocations()在C:\\ Users \\ RMircea \\ Documents \\ Visual Studio 2008 \\ Projects \\ WCFTest \\ WCFTest \\ Service.cs:行1626 \ r \ n在C:\\ Users \ RMircea \\ Documents \\ Visual Studio 2008 \\ Projects \\ WCFTest \\中的WCFTest.Program.Main(String [] args) WCFTest \\ Program.cs:行14 \ r \ n在System.AppDomain._nExecuteAssembly(装配体,String [] args)\ r \ n在System.AppDomain.ExecuteAssembly(String assemblyFile,证据assemblySecurity,String [] args) \ r \ n在Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()\ r \ n在System.Threading.ThreadHelper.ThreadStart_Context(对象状态)\ r \ n在System.Threading.ExecutionContext.Run(ExecutionContext executeContext,ContextCallback回调,对象状态)\ r \ n(位于System.Threading.ThreadHelper.ThreadStart()")

任何帮助将不胜感激
i get the same problem for debugging.


The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The authentication header received from the server was 'NTLM', for localhost

here is the stack trace.

i am using basic http binding;the service and the client are both runing on Win 2008 Server

"\r\nServer stack trace: \r\n   at System.ServiceModel.Channels.HttpChannelUtilities.ValidateAuthentication(HttpWebRequest request, HttpWebResponse response, WebException responseException, HttpChannelFactory factory)\r\n   at System.ServiceModel.Channels.HttpChannelUtilities.ValidateRequestReplyResponse(HttpWebRequest request, HttpWebResponse response, HttpChannelFactory factory, WebException responseException)\r\n   at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)\r\n   at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)\r\n   at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)\r\n   at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)\r\n   at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs)\r\n   at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)\r\n   at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)\r\n\r\nException rethrown at [0]: \r\n   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)\r\n   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)\r\n   at IService.GetAvailableLocations()\r\n   at ServiceClient.GetAvailableLocations() in C:\\Users\\RMircea\\Documents\\Visual Studio 2008\\Projects\\WCFTest\\WCFTest\\Service.cs:line 1626\r\n   at WCFTest.Program.Main(String[] args) in C:\\Users\\RMircea\\Documents\\Visual Studio 2008\\Projects\\WCFTest\\WCFTest\\Program.cs:line 14\r\n   at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)\r\n   at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)\r\n   at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()\r\n   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)\r\n   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)\r\n   at System.Threading.ThreadHelper.ThreadStart()"

any help would be appreciated