2014-03-01 7 views
0

Silverlight 응용 프로그램 (클라이언트와 같은)과 자체 호스트 서비스 인 wcf 서비스의 두 모듈이 있습니다. 이 두 응용 프로그램은 클라이언트와 서버 통신과 같이 작동합니다. 그 두 응용 프로그램은 Windows 7 및 이전 버전에서는 제대로 작동하지만 승리하지는 않습니다.WCF 서비스가 Windows 8에서 silverlight4 응용 프로그램과 통신하지 않습니다. IE 10. IIS 8.0

" "과 같은 오류가 있습니다. "localhost : 8283/MyTestService"URI에 요청하는 동안 오류가 발생했습니다. 적절한 도메인 간 정책이없는 교차 도메인 방식의 서비스 또는 SOAP 서비스에 적합하지 않은 정책에 액세스하려고 시도 할 때가 있습니다. 서비스 소유자에게 연락하여 도메인 간을 게시해야 할 수도 있습니다 정책 파일을 사용하고 SOAP 관련 HTTP 헤더를 보낼 수 있는지 확인합니다.이 오류는 InternalsVisibleToAttribute 특성을 사용하지 않고 웹 서비스 프록시에서 내부 형식을 사용하는 경우에도 발생할 수 있습니다. 자세한 내용은 내부 예외를 참조하십시오. "

나는 내가 다음과 같은 방법을 시도 8.

창에서 그들 사이의 연결을 만들 수 없습니다 인터넷에서 언급하지만, 여러 가지 방법을 시도 : 1) 두 파일이 clientaccesspolicy.xml과의 crossdomain.xml .added MSN에서 참조한 IIS8 (wwwroot) 폴더. 2). 각 폴더에 대한 모든 권한을 부여합니다.

이 경우 가능한 해결책은 무엇입니까? 1). 모든 보안 문제가있을 수 있습니다. 2). windows 8 엔터 프라이즈 버전

더 자세한 내용이 필요하면 의견에 알려주십시오.

나는 당신의 응답에 대한 기대 ..

답변

0

는 R & D 너무 많은 후, 나는 창에서 실버 라이트와 WCF 서비스 (8) 환경을 작업 할 수있는 솔루션을 얻었다. 내 질문에 대답하고있다 .. 그것은 이러한 유형의 오류에 걸린 사람에게 도움이 수도 경우

실제 원인 :

No communication is creating in between CVT Service(WCF service) and CVT pages(silver light application) as client side. Whenever it compiled in windows 8 environment . Then the error caught was “ An error occurred while trying to make a request to URI ‘http://localhost:8283. 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. Please see the inner exception for more details. “. 

해상도 :

The actual problem is present in WCF service . Below steps to be followed to run the WCF service successfully and make it communicate properly with silver light application in windows 8 environment. In windows 7 and previous versions the settings related to WCF service work will be enabled by default but in win 8 few features might not be enabled in that case you can follow these below steps. 

1 단계 : 만들고 추가 두 개의 XML 파일을 wwwroot 폴더에 저장합니다. 이 폴더는이 경로 "C : \ inetpub \ wwwroot"에 있습니다.

a). clientaccesspolicy.xml :

<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> 
</xml> 

b). 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> 

2 단계 :이 기능이 활성화되지 않은 경우, 아래의 단계를 수행하여이 기능을 활성화합니다.

Windows + x를 누르십시오. 프로그램 및 기능을 선택하십시오 (목록의 첫 번째 항목). 왼쪽에서 Windows 기능 켜기 또는 끄기를 선택하십시오. .Net Framework 4.5 고급 서비스. WCF 서비스를 확장하십시오. HTTP 활성화 활성화.

3 단계 : MIME 유형 및 새로운 관리되는 처리기 추가 파일을 SVC는 대상으로 들어오는 요청을 처리하는 방법을

웹 서버가 모르기 때문에 WCF 서비스를 기본 구성으로 IIS 8에서 실행되지 않습니다, . 아래 링크를 참조하십시오. https://gyorgybalassy.wordpress.com/2012/09/24/

4 단계 : 응용 프로그램은 Windows 8 환경에서 컴파일해야합니다. Windows 8 환경에서이 응용 프로그램을 실행하려면 다음 단계를 수행해야합니다.