1

Silverlight에서 사용하려는 GetDataWorkflowService.xamlx라는 worflow 서비스가 하나 있습니다.Silverlight에서 워크 플로 서비스에 액세스하려면 어떻게해야합니까?

내 응용 프로그램에 서비스 참조를 추가하면 '이 작업은 상대 URI에 대해 지원되지 않습니다.'라는 메시지가 표시됩니다. 그러나 여전히 참고 문헌을 추가합니다. 나는 다음과 같은 오류가

Servicelient proxy=new ServiceClient(); 
proxy.GetDataCompleted += (o, a) => Debug.WriteLine("Result is " + a.Result); 
proxy.GetDataAsync(123); 

:

나는 referece를 사용

An error occurred while trying to make a request to URI 'http://localhost:1234/GetDataWorkflowService.xamlx'. This could be due to attempting to access a service in a cross-domain way without a proper cross-domain policy in place, or a policy that is unsuitable for SOAP services. You may need to contact the owner of the service to publish a cross-domain policy file and to ensure it allows SOAP-related HTTP headers to be sent. This error may also be caused by using internal types in the web service proxy without using the InternalsVisibleToAttribute attribute. Please see the inner exception for more details.

나는 무슨 일이 일어나고 있는지 이해가 안 돼요.

+0

"자세한 내용은 내부 예외를 참조하십시오." 그리고 내부의 예외는 무엇입니까? – Will

답변

0

몇 가지 : 당신은() GetData의를 호출 WCF 테스트 클라이언트를 사용하면 어떻게됩니까

  • ? 오류가 발생합니까 아니면 잘 작동합니까? 여기서 오류가 발생하면 서버 부분에 집중하십시오.
  • 콘솔 응용 프로그램에서 서비스 참조를 설정하고 워크 플로 서비스를 호출하면 어떻게됩니까? 같은 오류입니까, 아니면 작동합니까?
  • 워크 플로 서비스가 Silverlight 클라이언트와 동일한 웹 사이트에서 호스팅되고 있습니까? 그렇지 않은 경우 크로스 도메인 정책 파일을 올바르게 설정해야합니다.
  • WCF 테스트 클라이언트가 작동한다고 가정합니다. 피 들러를 열고 Silverlight 클라이언트의 요청을 WCF 테스트 클라이언트의 요청과 비교하십시오. 다른 무엇입니까?
  • 서버에 추적을 사용하여 잘못된 내용에 대한 더 많은 통찰력을 제공하는 예외 또는 경고가 있는지 확인하십시오.
0

시작 프로젝트를 확인하여 Silverlight 프로젝트가 아닌 웹 프로젝트를 시작하고 있는지 확인하십시오. 자세한 내용은 내 블로그 Troubleshooting Workflow Services/Silverlight을 참조하십시오.

관련 문제