Web Service 之 Exception: "The HTTP request is unauthorized with client authentication scheme......"
来源:互联网 发布:js联动下拉菜单 编辑:程序博客网 时间:2024/05/17 23:43
问题:
An exception of type'System.ServiceModel.Security.MessageSecurityException' occurred and wascaught.
Type :System.ServiceModel.Security.MessageSecurityException, System.ServiceModel,Version=4.0.0.0, Culture=neutral, ......
Message: TheHTTP request is unauthorized with client authentication scheme 'Negotiate'. Theauthentication header received from the server was 'NTLM,Negotiate'.
Data :System.Collections.ListDictionaryInternal
TargetSite : VoidHandleReturnMessage(System.Runtime.Remoting.Messaging.IMessage,System.Runtime.Remoting.Messaging.IMessage)
Stack Trace :
Server stack trace:
atSystem.ServiceModel.Channels.HttpChannelUtilities.ValidateAuthentication(HttpWebRequestrequest, HttpWebResponse response, WebException responseException,HttpChannelFactory`1 factory)
atSystem.ServiceModel.Channels.HttpChannelUtilities.ValidateRequestReplyResponse(HttpWebRequestrequest, HttpWebResponse response, HttpChannelFactory`1 factory, WebExceptionresponseException, ChannelBinding channelBinding)
at System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpantimeout)
at System.ServiceModel.Channels.RequestChannel.Request(Message message,TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.Call(String action,Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs,TimeSpan timeout)
atSystem.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessagemethodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessagemessage)
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg,IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData&msgData, Int32 type)
at XXX.DataAccess.MyWebService.MySoap.GetInfoList()
at XXX.Program.LoadAll() ind:\...\Program.cs:line XX
InnerException
Type: System.Net.WebException, System, Version=4.0.0.0, Culture=neutral,......
Message: The remote server returned an error: (401) Unauthorized.
Status: ProtocolError
Response: System.Net.HttpWebResponse
Data: System.Collections.ListDictionaryInternal
TargetSite: System.Net.WebResponse GetResponse()
StackTrace : atSystem.Net.HttpWebRequest.GetResponse()
at System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpantimeout)
原因:
访问web service时, 需要用户名和密码。
此时使用的用户名和密码不对。
解决方案:
修改可用的密码和用户名
- Web Service 之 Exception: "The HTTP request is unauthorized with client authentication scheme......"
- Web service: The HTTP request is unauthorized with client authentication scheme 'Anonymous'.....
- The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The authentication header received from the serv
- Web Service Error: “The request failed with HTTP status 401: Unauthorized.”
- Web Service Error: “The request failed with HTTP status 401: Unauthorized.”
- the request failed with http status 401:unauthorized
- The request failed with HTTP status 401: Unauthorized
- Web service request SetParameters to Report Server http://host/reportserver failed. Error: 请求因 HTTP 状态 401 失败: Unauthorized
- Develop Web Service With Axis2 #9 - HTTP Basic Authentication in Weblogic
- Web Service 使用时出现 HTTP Status 401: Unauthorized
- curl -X POST http://localhost:8881/bus/refresh Unauthorized Full authentication is required
- NTLM Authentication Scheme for HTTP
- Central Authentication Service(CAS)之四(Client)
- Web Service Authentication
- Full authentication is required to access this resource Unauthorized
- Web Service系列之实例之使用http.client发送SOAP POST请求
- HTTP Error 503. The service is unavailable.
- HTTP Error 503. The service is unavailable
- 让Xcode 支援Lua 语法高亮
- eclipse编译zookeeper
- 未知问题------js导入失败
- 从Code Review谈如何做技术
- 共享内存结构与指针问题
- Web Service 之 Exception: "The HTTP request is unauthorized with client authentication scheme......"
- 把LIST转化成数组
- dsdsvxzvx
- titanium 安装过程错误解决办法
- jdk和jre是什么?都有什么用?(转帖)
- 实例教程Unity3D单例模式(二)自我包含法
- java 利用checkbox多选按钮实现多条记录同时操作
- applicationContext.xml整合hibernate mybatis
- Oracle 分区表总结