2012-08-15 4 views
0

IIS에 WCF 프로젝트를 방금 배포했습니다.WCF 콘텐츠 형식이 일치하지 않습니다.

The document was understood, but it could not be processed. 
    - The WSDL document contains links that could not be resolved. 
    - There was an error downloading 'http://server1.local/WCFServices/serv1/serv1.svc?xsd=xsd0'. 
    - The underlying connection was closed: An unexpected error occurred on a receive. 
    - Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. 
    - An existing connection was forcibly closed by the remote host 
    Metadata contains a reference that cannot be resolved: 'http://server1.local/WCFServices/serv1/serv1.svc?wsdl'. 
    Content Type application/soap+xml; charset=utf-8 was not supported by service http://server1.local/WCFServices/serv1/serv1.svc?wsdl. The client and service bindings may be mismatched. 
The remote server returned an error: (415) Cannot process the message because the content type 'application/soap+xml; charset=utf-8' was not the expected type 'text/xml; charset=utf-8'.. 
If the service is defined in the current solution, try building the solution and adding the service reference again. 

그래서 내가 그렇다고 얻을 문제가있다 : 나는 테스트 프로젝트에 서비스 참조를 추가 할 때

는 그러나 Visual Studio는 다음과 같은 수 있습니다. 서비스의 컨텐츠 유형이 클라이언트가 기대하는 것과 일치하지 않습니다.

그래서 어떻게 수정합니까?

+0

mex 끝점을 포함하여 구성을 게시 할 수 있습니까? – CodingWithSpike

답변

1

클라이언트의 App.Config 또는 Web.Config를 확인하고 ServiceModel을 확인하십시오. 아마도 customBinding이 있으며 이는 WCF 서비스가 보내는 것과 다릅니다. 이 첫 번째 게시물의 구글이 에러를 나타이므로

+0

아직 설정 파일이 없습니다! – CompanyDroneFromSector7G

+0

그러면이 문제가 발생할 수 있습니다. http://stackoverflow.com/questions/6673495/wcf-iis-server-configuration –

+0

나는 당신이 옳다고 생각합니다! 그냥 지금 어떻게 바꿀지 알아 내려고 애 썼는데 ... – CompanyDroneFromSector7G

1

, 내 솔루션과 함께 참여하고 싶은 : 잘 작동 된 시스템에서 코드를 변경,하지만에 대한 참조를 업데이트하는 동안

내가 유사한 오류가 발생했습니다 내 개발 시스템이 실패했습니다. 참조는 실버 프로젝트 안에 있으며 주변 웹 사이트에 통합 된 WCF와 관련이 있습니다 (표준 신뢰도). 내 오류 메시지 포함 "WCF 메타 데이터에 해결할 수없는 참조가 포함되었습니다 : 'Some funny path'응답 메시지의 text/html; charset = utf-8 콘텐츠 유형이 바인딩의 콘텐츠 유형과 일치하지 않습니다 (application/soap + xml; charset = utf-8). " 내 웹 사이트에서는 문제/솔루션의 기반이 된 권한 부여 역할을 사용합니다. 서비스 참조를 업데이트하려면 모든 사용자를 허용해야했습니다.

<?xml version="1.0"?> 
<configuration> 
    <system.web> 
     <!--<authorization> 
      <allow users="*"/>    
     </authorization>--> 
     <authorization> 
      <deny users="?"/> 
      <allow roles="role-1,role-2"/> 
      <deny users="*"/> 
     </authorization> 
    </system.web> 
</configuration> 
관련 문제