2012-04-23 3 views
0

Windows 서비스로 실행되는 WCF 서비스 라이브러리가 있습니다. Azure 작업자 역할로이 서비스를 마이그레이션하고 싶습니다. WCF 프로젝트를 마우스 오른쪽 버튼으로 클릭하면 일반적으로 "Windows Azure Deployment Project 추가"옵션이 표시됩니다. 내 WCF 라이브러리에서이 옵션이 표시되지 않습니다. 이 경우 작업자 역할로 Azure에 WCF 서비스 라이브러리를 어떻게 마이그레이션합니까? 어떤 도움이라도 대단히 감사하겠습니다.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

, 난 당신이 수동으로 작업자 역할 프로젝트를 생성하는 것이 좋습니다 서비스 라이브러리 프로젝트에 대한 참조를 추가 한 다음 작업자 역할 내에서 서비스를 호스팅하고 싶습니다. 서비스 호스트 코드는 일반 콘솔/Windows 서비스 호스트에서 얻은 코드와 유사합니다. 그러나 코드를 통해 주소를 얻으십시오. 또한 전체 자습서는 http://msdn.microsoft.com/en-us/WAZPlatformTrainingCourse_WindowsAzureRoleCommunicationVS2010Lab을 참조하십시오.

최고 감사합니다,

명나라 쑤.

0

Windows Azure 배포 프로젝트 추가 옵션은 프로젝트 형식이 웹 응용 프로그램 또는 WCF 응용 프로그램 인 경우에만 나타납니다. WebApplication에서 WCF 라이브러리를 호스팅해야 옵션이 나타납니다 (또는 Windows Azure WebRole 프로젝트에서 직접 호스팅하는 것이 더 좋음).

WorkerRole에서 WCF 라이브러리를 실제로 호스팅하려는 경우 Ming Xu가 설명한 내용을 수행하는 것이 좋습니다. 그러나 일반적으로 Windows Azure의 WebRoles에서 WCF 서비스를 호스팅합니다. 따라서 WorkerRoles를 사용하려는 이유를 설명하는 특별한 도움이 필요하기를 바랍니다.

도움이 되었기를 바랍니다.

관련 문제