我有一个WCF服务托管在Azure的卷轴中。WCF在Azure中无法访问
当我在开发结构中测试它时,它可以从我的网页(其他网络角色)正常工作。
但是,当我将它部署到云中时,它似乎并未运行,尽管webrole已准备就绪。
当我使用Fiddler做我的WCF服务的公共方法中的一种东西,我得到:
[提琴手]连接到 xxxxxxxxxxxxxx.cloudapp.net失败。 异常文本:连接尝试 失败,因为连接的方没有 一段 时间后没有正确响应或已建立的连接失败 ,因为连接的主机没有 响应yyyyyyyyyyyyyy
这是服务配置:
<?xml version="1.0" encoding="utf-8"?>
<ServiceDefinition name="GovGuard" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition">
<WebRole name="GovGuard.Services">
<Sites>
<Site name="Web">
<Bindings>
<Binding name="GuardServiceEndpointBinding" endpointName="GuardServiceEndpoint" />
</Bindings>
</Site>
</Sites>
<ConfigurationSettings>
<Setting name="DevelopmentConnectionString" />
<Setting name="GovGuardStorageConnectionString" />
</ConfigurationSettings>
<Endpoints>
<InputEndpoint name="GuardServiceEndpoint" protocol="http" port="81" />
</Endpoints>
<Imports>
<Import moduleName="Diagnostics" />
</Imports>
<LocalResources>
<LocalStorage name="MyCompany.GovGuard.Services.svclog" sizeInMB="1000" cleanOnRoleRecycle="false" />
</LocalResources>
</WebRole>
<WebRole name="GovGuard.Web">
<Sites>
<Site name="Web">
<Bindings>
<Binding name="GuardWebEndpointBinding" endpointName="GuardWebEndpoint" />
</Bindings>
</Site>
</Sites>
<ConfigurationSettings>
<Setting name="GuardServiceUrl" />
<Setting name="DevelopmentConnectionString" />
<Setting name="GovGuardStorageConnectionString" />
</ConfigurationSettings>
<Endpoints>
<InputEndpoint name="GuardWebEndpoint" protocol="http" port="80" />
</Endpoints>
<Imports>
<Import moduleName="Diagnostics" />
</Imports>
<LocalResources>
<LocalStorage name="MyCompany.GovGuard.Web.svclog" cleanOnRoleRecycle="false" sizeInMB="1000" />
</LocalResources>
</WebRole>
</ServiceDefinition>
(编辑) 在我的问题的调查,可能是这样的:我用的是Microsoft.SqlServer.Types装配在文件基准WCF项目。我使用copy-local = true将程序集复制到bin文件夹,并将其打包在.csx文件中。但是...... Microsoft.SqlServer.Types还需要SqlServerSpatial.dll库(不是程序集)。我创建了一个postbuild脚本来将该dll复制到bin中,但是我没有成功......
也许有人可以帮助我如何将.dll文件(不是程序集)打包到.csx文件中。 ..
(编辑) 这里找到它:http://msdn.microsoft.com/en-us/gg271395
您可能需要共享一些代码......一个常见的错误是将端口设置为80以外的值。可能要检查ServiceDefinition.csdef。 – smarx 2011-01-20 19:24:50