2011-03-02 202 views
1

我調用WebService和得到這個error..Do人知道什麼是確切的問題...調用Web服務時出現問題?

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

看起來您沒有爲您的請求提供任何或正確的身份驗證。

您是否閱讀過您正在調用的WebService的文檔?它是否提及認證?

您是否對客戶端和服務器負責?如果是的話,你如何配置服務器?

想要得到更確切的答案,我們需要知道您要撥打哪些服務以及如何配置。

+0

昏暗objClient作爲VWSecurityServicesClient =新VWSecurityServicesClient( 「WSUserName」) objClient.ClientCredentials.UserName.UserName = 「管理用戶」 objClient.ClientCredentials.UserName.Password = 「****」 objClient.addRole(Customercode,客戶名稱) – bala3569 2011-03-02 15:41:11

+0

您是否連接到公共webservice?如果可以,請提供鏈接。如果您正在連接到一個私人web服務什麼是提供web服務,並且sercirty是如何配置的?例如IIS/.Net/.ASMX或Apache/Tomcat/Axis2或.​​.. – 2011-03-03 11:29:49

相關問題