2012-04-23 7 views
0

Windowsサービスとして実行されるWCFサービスライブラリがあります。このサービスをAzureワーカーの役割として移行したいと思います。 WCFプロジェクトを右クリックすると、通常、「Windows Azureデプロイメントプロジェクトを追加する」というオプションが表示されます。私のWCFライブラリでは、このオプションが表示されません。その場合、WCFサービスライブラリをAzureにどのように移行するのですか?どんな助けでも大歓迎です。AzureワーカーロールとしてWCFを移行する

以下は、私のWCFサービスライブラリのapp.configです。この場合

<?xml version="1.0"?> 
<configuration> 
<system.serviceModel> 
    <bindings> 
     <netTcpBinding> 
      <binding name="NetTcpBinding_IHealthService" closeTimeout="00:01:00" 
       openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" 
       transactionFlow="false" transferMode="Buffered" transactionProtocol="OleTransactions" 
       hostNameComparisonMode="StrongWildcard" listenBacklog="10" 
       maxBufferPoolSize="524288" maxBufferSize="65536" maxConnections="10" 
       maxReceivedMessageSize="65536"> 
       <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" 
        maxBytesPerRead="4096" maxNameTableCharCount="16384" /> 
       <reliableSession ordered="true" inactivityTimeout="00:10:00" 
        enabled="false" /> 
       <security mode="None"> 
        <transport clientCredentialType="Windows" protectionLevel="EncryptAndSign" /> 
        <message clientCredentialType="Windows" algorithmSuite="Default" /> 
       </security> 
      </binding> 
     </netTcpBinding> 
    </bindings> 
    <client> 
     <endpoint address="net.tcp://localhost:9017/monitor/health/service.svc" 
      binding="netTcpBinding" bindingConfiguration="NetTcpBinding_IHealthService" 
      contract="HealthService.IHealthService" name="NetTcpBinding_IHealthService" /> 
    </client> 
</system.serviceModel> 
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup> 
</configuration> 

答えて

1

、私は、手動でWorkerロールプロジェクトを作成することを提案したサービスライブラリプロジェクトへの参照を追加した後、Workerロール内のサービスをホストしたいと思います。サービスホストコードは、通常のコンソール/ Windowsサービスホストの場合と似ています。しかし、コードを介してアドレスを取得してください。さらに、完全なチュートリアルについてはhttp://msdn.microsoft.com/en-us/WAZPlatformTrainingCourse_WindowsAzureRoleCommunicationVS2010Labを参照することもできます。

よろしく、

明徐。

0

[Windows Azureデプロイメントプロジェクトを追加]オプションは、プロジェクトタイプがWebApplicationまたはWCFアプリケーションの場合にのみ表示されます。 WCFライブラリをWebApplicationでホストする必要があり、そのオプションが表示されます(または、Windows Azure WebRoleプロジェクトで直接ホストする方がよい)。

実際にWCFライブラリをWorkerRoleにホストしたい場合は、Ming Xuが説明したことをお勧めします。しかし、通常、Windows AzureのWebRolesでWCFサービスをホストします。 WorkerRolesを使用する理由を説明する特別な必要があることを願っています。

私は役立つことを願っています。

関連する問題