2012-02-17 2 views
3

몇 시간 동안 웹 서비스를 호출하려고합니다. 내가 추가 한 clientaccesspolicy.xml :원격 서버에서 NotFound 오류를 반환했습니다. Silverlight + WCF

<?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에 내 웹 사이트의

<?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> 

루트 디렉토리. 웹 서비스가 IIS에서 호출되었으며 여기에서 작동합니다.

하지만 난이 오류가 Silverlight 응용 프로그램에서 내 WCF 웹 서비스를 호출하기 위해 노력하고있어 때

원격 서버에서 오류를 반환 : 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; 
      } 

?

+0

끝점이 올바르게 구성되었는지 확인하십시오. Visual Studio에서 wsdl을 기반으로 작성한 프록시 클립을 사용하는 경우 올바르게 정의되었는지 확인할 수 있습니다 (특히 적절한 매개 변수를 사용하여 UserExist 메소드가 포함되어있는 경우) –

답변

0

좋습니다;) 이제 작동합니다. Fiddler에서 예외 메시지가 표시되도록 web.config에서 디버그를 켰습니다. SQL 데이터베이스에 대한 IIS의 풀에 ID 사용자를 설정해야합니다.

9

이 텍스트는 web.config에서 찾으십시오. IncludeExceptionDetailInFaults true로 설정하십시오. 그런 다음 서비스 요청을 다시 실행하고 이번에는 피들러가 알아야 할 것을 알려줍니다. SQL 오류에서 null 참조에 이르기까지 수 있습니다. :-)

+0

더 많은 기능 sql 연결로 프로젝트를 만듭니다. 문자열을이 sqlConn에 연결하면 아무 문제없이 열립니다. – ogrod87

0

휴대 기기에서 Wi-Fi 설정으로 이동하여 현재 Wi-Fi 연결을 편집하십시오. 프록시 설정 "자동으로 설정 검색".

관련 문제