我们正在尝试在 Amazon EC2 上托管一个 Silverlight 应用程序。
我可以让它提供 .xap 文件,但是我在使用 silverlight 应用程序所需的 web 服务时遇到了一些麻烦。
通常我会在 Visual Studio 中添加服务引用并输入 Web 服务的 URL,例如http://url.com/ServiceName.svc,然后会为我生成一个代理。
但是,随着 Amazon Elastic Cloud 实例输入 url
http://ec2-174-129-139-48.compute-1.amazonaws.com/AuthService.svc
给出错误“不被识别为已知的文档类型”
如果我进入
http://ec2-174-129-139-48.compute-1.amazonaws.com/AuthService.svc?wsdl
在 Internet Explorer 地址栏中,我得到一个 wsdl 描述 - 但它在配置中有这部分,这似乎有点奇怪
<wsdl:types>
<xsd:schema targetNamespace="http://asp.net/ApplicationServices/v200/Imports">
<xsd:import schemaLocation="http://ip-0af8db15/AuthService.svc?xsd=xsd0" namespace="http://asp.net/ApplicationServices/v200" />
<xsd:import schemaLocation="http://ip-0af8db15/AuthService.svc?xsd=xsd1" namespace="http://schemas.microsoft.com/2003/10/Serialization/" />
</xsd:schema>
</wsdl:types>
schemaLocation http://ip-0af8db15/AuthService.svc?对我来说,这不是正确的地址吗?
任何人都知道我是否需要配置或更改某些内容以访问 Amazon EC2 上的 WCF Web 服务?
编辑:应注意:Windows Server 2003、IIS 6.0
编辑:看起来 ip-0af8db15 是机器名称