Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/silverlight/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 在silverlight中通过https访问soap_C#_Silverlight_Web Services_Soap_Https - Fatal编程技术网

C# 在silverlight中通过https访问soap

C# 在silverlight中通过https访问soap,c#,silverlight,web-services,soap,https,C#,Silverlight,Web Services,Soap,Https,我在另一台装有axis2和apache的计算机上托管了一台服务器。我只是想通过https连接到它 CustomBinding binding = new CustomBinding(SecurityBindingElement.CreateUserNameOverTransportBindingElement()); binding.Elements.Add(new HttpsTransportBindingElement()); EndpointAddress endpoint = new

我在另一台装有axis2和apache的计算机上托管了一台服务器。我只是想通过https连接到它

CustomBinding binding = new CustomBinding(SecurityBindingElement.CreateUserNameOverTransportBindingElement());

binding.Elements.Add(new HttpsTransportBindingElement());
EndpointAddress endpoint = new EndpointAddress("https://othercomputer/axis2/services/DataModel");
DataClient client = new DataClient(binding, endpoint);
client.ClientCredentials.UserName.UserName = "a";
client.ClientCredentials.UserName.Password = "a12345";
return client;

我得到了一个通信异常,用户代码没有处理这个代码,我做得对吗

编辑进一步请求信息: 例外情况如下:

尝试向URI的请求时出错https://othercomputer/axis /服务/数据模型'。这可能是由于试图访问交叉连接中的服务- 没有适当的跨域策略的域方式,或 不适合SOAP服务。您可能需要联系服务的所有者以 发布跨域策略文件并确保它允许与SOAP相关的HTTP头 待发送。此错误也可能是由于在web服务中使用内部类型引起的 不使用InternalsVisibleToAttribute属性的代理。请看里面的 更多细节例外


身份验证是基本身份验证,我的一位同事认为证书有问题,并认为可能是因为证书是自行生成的。

它被视为跨域调用。您需要添加一个可以通过SOAP调用的同一服务器访问的文件。

在提供更多有用信息之前,我们需要更多信息。1) 服务中配置了什么类型的安全模型(假设基本身份验证,但您想确定)?2) 您可以提供通信异常的哪些详细信息?