는 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 환경에서이 응용 프로그램을 실행하려면 다음 단계를 수행해야합니다.