Azure的Silverlight和WCF服务器 [英] Silverlight and WCF servers with Azure

查看:68
本文介绍了Azure的Silverlight和WCF服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

WCFserver:http://jiwallwcf.cloudapp.net/Service1.svc





silverlight代码:



WCFserver:http://jiwallwcf.cloudapp.net/Service1.svc


silverlight code:

public MainPage()
{
    InitializeComponent();

    ServiceReference1.Service1Client C = new ServiceReference1.Service1Client();
    C.GetDataCompleted += new EventHandler<ServiceReference1.GetDataCompletedEventArgs>(C_GetDataCompleted);
    C.GetDataAsync(20);


}


private void C_GetDataCompleted(object sender, ServiceReference1.GetDataCompletedEventArgs e)
{
    box1.Text = e.Result.ToString();
}





错误:

尝试向URI发出请求时出错http://jiwallwcf.cloudapp.net/Service1.svc。这可能是由于尝试在没有适当的跨域策略的情况下以跨域方式访问服务,或者是不适合SOAP服务的策略。您可能需要联系服务的所有者以发布跨域策略文件,并确保它允许发送与SOAP相关的HTTP标头。在不使用InternalsVisibleToAttribute属性的情况下,在Web服务代理中使用内部类型也可能导致此错误。有关详细信息,请参阅内部异常。



帮助!!



error:
An error occurred while trying to make a request to URI 'http://jiwallwcf.cloudapp.net/Service1.svc'. This could be due to attempting to access a service in a cross-domain way without a proper cross-domain policy in place, or a policy that is unsuitable for SOAP services. You may need to contact the owner of the service to publish a cross-domain policy file and to ensure it allows SOAP-related HTTP headers to be sent. This error may also be caused by using internal types in the web service proxy without using the InternalsVisibleToAttribute attribute. Please see the inner exception for more details.

HELP!!

推荐答案

这篇关于Azure的Silverlight和WCF服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆