WinServer2008 Standard SP2 上の IIS7 サーバーに展開された WCF サービス。
DataContract int メンバーが「失われています」
つまり、クライアントから送信されたすべての int は、サーバー上のコントラクト処理ロジックに 0 として現れます。
「リフレクション」コントラクトを作成しました(着信 int を文字列に変換して返します)。テスト ハーネスが IDE で実行されている WCF コントラクトを指すと、int が正しく反映されます。Deployed コントラクトを指すとゼロが反映されます。
展開: サーバー上に IIS アプリケーションを作成し、物理ディレクトリにファイルを展開しました。
デプロイされたサービスは正常に表示されます。つまり、「実際の」クライアント アプリ (別のソリューションを開発中の VS2008 WinMobile 6.5 アプリ) には、Deployed WCF OK を参照する WebService 参照があります。クライアントによって生成された変数値がネットワーク上で失われるだけです。クライアントが生成した変数にのみ発生します。クライアントは、期待される値でサーバーが生成した DataContract 変数を使用できます。それは基本型と関係があります。最初の犠牲者はクライアントが生成した日付だったので、ジャーニーのためにこれらを文字列に移動しました。Web.config は以下です。ありがとうボブ
<?xml version="1.0"?>
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.0"/>
<pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID"/>
</system.web>
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior>
<!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
<serviceMetadata httpGetEnabled="true"/>
<!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="true"/>
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true"/>
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
</configuration>