レポート実行サービスへの Web 参照を持つ .Net 4.0 プロジェクトがあります。これに対してテスト コードを実行すると、正常に動作します。ただし、別のマシンに移行すると、サービスへの呼び出しが次のように失敗します。
System.Configuration.SettingsPropertyNotFoundException: 設定プロパティ 'MyNamespace_localhost_ReportExecutionService' が見つかりませんでした。
私の Settings.settings ファイルは次のようになります。
[global::System.Configuration.ApplicationScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.WebServiceUrl)]
[global::System.Configuration.DefaultSettingValueAttribute("http://localhost:8080/ReportServer/ReportExecution2005.asmx")]
public string MyNamespace_localhost_ReportExecutionService {
get {
return ((string)(this["MyNamespace_localhost_ReportExecutionService"]));
}
}
app.config は次のようになります。
<applicationSettings>
<MyNamespace.Properties.Settings>
<setting name="MyNamespace_localhost_ReportExecutionService"
serializeAs="String">
<value>http://localhost:8080/ReportServer/ReportExecution2005.asmx</value>
</setting>
</MyNamespace.Properties.Settings>
</applicationSettings>
私が知る限り、これは正しいです。Web サービス参照を削除して再作成しようとしましたが、効果はありませんでした。この時点でアイデアがありません。繰り返しますが、これは私の開発マシンで動作します。この問題は、このアセンブリを別のサーバーに配置したときに発生します。URLからアクセスできるため、実行サービスはそのサーバーで実行されています。
問題が何であるかを知っている人はいますか?