调用Web服务时出现问题?

时间:2011-03-02 15:24:36

标签: c# vb.net webservice-client

我正在调用网络服务并收到此错误。任何人都知道确切的问题是什么......

System.ServiceModel.Security.MessageSecurityException: An unsecured or incorrectly secured fault was received from the other party. See the inner FaultException for the fault code and detail. ---> System.ServiceModel.FaultException: An error occurred when verifying security for the message.
   --- End of inner exception stack trace ---

Server stack trace: 
at System.ServiceModel.Channels.SecurityChannelFactory`1.SecurityRequestChannel.ProcessReply(Message reply, SecurityProtocolCorrelationState correlationState, TimeSpan timeout)
at System.ServiceModel.Channels.SecurityChannelFactory`1.SecurityRequestChannel.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)

Exception rethrown at [0]: 

at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at IVWSecurityServices.addRole(String rolename, String roledesc)
at VWSecurityServicesClient.addRole(String rolename, String roledesc) in D:\NEC\App_Code\proxy.vb:line 312
at ProvisionService.addRole(String Customercode, String Customername) in D:\NEC\App_Code\ProvisionService.asmx.vb:line 59

有什么建议吗?

1 个答案:

答案 0 :(得分:1)

您的请求似乎未提供任何或正确的身份验证。

您是否阅读过您正在呼叫的WebService上的文档?它是否完全提到身份验证?

您是否对客户端和服务器负责?如果是这样,您如何配置服务器?

要获得更准确的答案,我们需要知道您正在呼叫的服务以及如何配置。