Web プロジェクトに (非 RIA) WCF サービスを使用する Silverlight 5 アプリケーションがあります。もちろん、私のマシンではうまく動作します ;-) - Windows 7 ですが、それを開発サーバー (IIS 6 を使用して .NET 4 を搭載した WinServer2008) に展開すると、アプリケーションの読み込みが完了していないようです。最初のsilverlight Loading...その後、空白の画面が表示されます。エラーメッセージは表示されません。
問題は、Silverlight アプリが、WCF サービスのポートが私のマシン (46133) と同じであると想定していることだと思います。
ServiceReferences.ClientConfig のエンドポイントのアドレスを ../Service.svc に設定する必要があるという記事をオンラインで見たことがあります。これに変更してデプロイしても何も変わりません。
Web プロジェクトのプロパティの [Web] タブで、[Visual Studio 開発サーバーを使用する] をオンにし、特定のポート 46133、仮想パス =/
デプロイされたサイトはまだポート 46133 を使用しようとしていると思います。これは、Fiddler が clientaccesspolicy.xml ファイルの 502 の赤いアイテムをメッセージとともに表示するためです。
[Fiddler] localhost へのソケット接続に失敗しました。
ErrorCode: 10061。
ターゲット マシンがアクティブに拒否したため、接続できませんでした 127.0.0.1:46133
助言がありますか?
ServiceReferences.ClientConfig ファイルは次のとおりです。
<configuration>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_IService" maxBufferSize="2147483647"
maxReceivedMessageSize="2147483647">
<security mode="TransportCredentialOnly" />
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="../Service.svc" binding="basicHttpBinding"
bindingConfiguration="BasicHttpBinding_IService" contract="ServiceReference1.IService"
name="BasicHttpBinding_IService" />
</client>
</system.serviceModel>
</configuration>
私のweb.configは
<system.web>
<httpRuntime executionTimeout="180" />
<compilation debug="true" targetFramework="4.0" />
<customErrors mode="Off"/>
</system.web>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpStreamingBinding" maxBufferSize="2147483647"
maxReceivedMessageSize="2147483647" transferMode="Streamed" receiveTimeout="01:00:00" sendTimeout="01:00:00">
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647"
maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
<security mode="TransportCredentialOnly">
<transport clientCredentialType="Ntlm" />
<!--<transport clientCredentialType="Windows" />-->
</security>
</binding>
</basicHttpBinding>
</bindings>
<client />
<behaviors>
<serviceBehaviors>
<behavior name="">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment
multipleSiteBindingsEnabled="true" />
<services>
<service name="CitationAir.MissionPlanning.WebService.Service">
<endpoint address="" binding="basicHttpBinding" bindingConfiguration="BasicHttpStreamingBinding"
contract="CitationAir.MissionPlanning.WebService.IService" />
</service>
</services>
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>