我有一個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