wsHttpBinding を使用する WCF サービスを Azure に公開しました。開発環境では、サービス リファレンスを問題なく追加しましたが、Azure へのデプロイ後、サービス リファレンスはプロキシ クラスを生成しませんでした。コード生成を機能させるには、Web 参照に切り替える必要がありました。なんで?
ここに私の設定ファイルがあります:
<?xml version="1.0"?>
<configuration>
<system.diagnostics>
<trace>
<listeners>
<add type="Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitorTraceListener, Microsoft.WindowsAzure.Diagnostics, Version=1.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
name="AzureDiagnostics">
<filter type="" />
</add>
</listeners>
</trace>
</system.diagnostics>
<system.web>
<compilation debug="true" targetFramework="4.0" />
</system.web>
<system.serviceModel>
<services>
<service name="MyService.DataSync">
<host>
<baseAddresses>
<add baseAddress="http://localhost:57059"/>
<add baseAddress="http://xxxxxxxxxxx.cloudapp.net"/>
</baseAddresses>
</host>
<endpoint address=""
binding="wsHttpBinding" bindingConfiguration="" name="SvcEndpoint"
contract="MyLibrary.IDataSync" />
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior>
<serviceMetadata httpGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
<directoryBrowse enabled="true"/>
</system.webServer>
<connectionStrings>
<add name="db" connectionString="...."/>
</connectionStrings>
</configuration>
ありがとう。