Проблема при вызове веб-службы? - PullRequest
1 голос
/ 02 марта 2011

Я вызываю веб-сервис и получаю эту ошибку .. Кто-нибудь знает, в чем именно проблема ...

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 Ответ

1 голос
/ 02 марта 2011

Похоже, вы не указали или не указали правильную аутентификацию в вашем запросе.

Читали ли вы документацию по веб-сервису, которому вы звоните?Это вообще упоминает аутентификацию?

Вы отвечаете как за клиента, так и за сервер?Если да, то как вы настроили сервер?

Для более точного ответа нам нужно знать, какую службу вы вызываете и как она настроена.

...