私は数時間Webサービスを呼び出そうとしています。 私はclientaccesspolicy.xml追加しました:私のウェブサイトのルートディレクトリにリモートサーバーがNotFoundエラーを返しました。 Silverlight + WCF
<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
<allow-http-request-headers-from domain="*" headers="SOAPAction,Content-Type"/>
</cross-domain-policy>
:
<?xml version="1.0" encoding="utf-8"?>
<access-policy>
<cross-domain-access>
<policy>
<allow-from http-request-headers="*">
<domain uri="*"/>
</allow-from>
<grant-to>
<resource path="/" include-subpaths="true"/>
</grant-to>
</policy>
</cross-domain-access>
</access-policy>
とのcrossdomain.xmlを。 WebサービスがIISから呼び出され、ここで動作します。
しかし、私は、Silverlightアプリケーションからの私のWCF Webサービスを呼び出すようにしようとしているとき、私はこのエラーを取得:NOTFOUND:
リモートサーバーがエラーを返しました。
これはフィドラーからのログです:私はエラーを取得するとき
a:InternalServiceFaultThe server was unable to process the request due to an internal error. For more information about the error, either turn on IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the <serviceDebug> configuration behavior) on the server in order to send the exception information back to the client, or turn on tracing as per the Microsoft .NET Framework 3.0 SDK documentation and inspect the server trace logs.
これは、コードです:私は間違っ
public int EndUserExist(System.IAsyncResult result) {
object[] _args = new object[0];
int _result = ((int)(base.EndInvoke("UserExist", _args, result))); //Here
return _result;
}
何をしているのですか?
エンドポイントが正しく設定されていることを確認します。 wsdlに基づいてVisual Studioで構築されたプロキシクラスを使用する場合は、正しく定義されているかどうかを確認することもできます(特に、適切なパラメータを持つUserExistメソッドが含まれている場合)。 –