2011-04-28 6 views
1

Visual Studio 2008을 디버그 모드로 실행하는 동안 내 컴퓨터에서 WCF 서비스가 실행되고 있습니다. IIS 7.5에 새 웹 사이트를 추가 할 때까지 모든 것이 잘 작동했습니다. 이제 클라이언트를 디버그 모드로 시작하면 다음과 같은 오류가 발생합니다.WCF 오류 | IIS 7.5 | 500.24

The content type text/html; charset=utf-8 of the response message does not match the content type of the binding (text/xml; charset=utf-8). If using a custom encoder, be sure that the IsContentTypeSupported method is implemented properly. The first 1024 bytes of the response were: '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head> 
<title>IIS 7.5 Detailed Error - 500.24 - Internal Server Error</title> 
<style type="text/css"> 
<!-- 
body{margin:0;font-size:.7em;font-family:Verdana,Arial,Helvetica,sans-serif;background:#CBE1EF;} 
code{margin:0;color:#006600;font-size:1.1em;font-weight:bold;} 
.config_source code{font-size:.8em;color:#000000;} 
pre{margin:0;font-size:1.4em;word-wrap:break-word;} 
ul,ol{margin:10px 0 10px 40px;} 
ul.first,ol.first{margin-top:5px;} 
fieldset{padding:0 15px 10px 15px;} 
.summary-container fieldset{padding-bottom:5px;margin-top:4px;} 
legend.no-expand-all{padding:2px 15px 4px 10px;margin:0 0 0 -12px;} 
legend{color:#333333;padding:4px 15px 4px 10px;margin:4px 0 8px -12px;_margin-top:0px; 
border-top:1px solid #EDEDED;border-left:1px solid #EDEDED;border-right:1px solid #969696; 
border-bottom:1px solid #969696;background:#E7ECF0;font-weight:bold;'. 

무엇이 원인인지 잘 모르겠습니다. 제발 도와주세요.

을 사용 나는 내 웹 서비스를 참조하고 있습니다 : 사용 기본 인증 : 사용 폼 인증 : 사용 Windows 인증

다음은 7.5 구성 .. 익명 인증 = ASP.NET 가장을 활성화 내 IIS이다 내 클라이언트 구성 파일에서 다음과 같습니다. http://localhost:2336/Service.svc

이 서비스는 내 프로젝트의 일부이며 IIS에 명시 적으로 추가되지 않습니다. 내 클라이언트가 디버그 모드에서 실행하고 나는 이런 일이 시작 의심 또한

<authentication mode="None"/> 

으로 web.config 파일 내부 인증이 설정되어있는 경우 자동으로 시작됩니다 나는이 일과 아무 상관이 스카이프, 뜻을 설치 한 후 ? 난 그냥 직장이 관련된 버그를했다 - 마이크

답변

0

아래의 단계를 따르십시오로 :

  1. 먼저 IIS와 ASP.NET (정확한 버전)에 WCF가 제대로 등록되어 있는지 확인하십시오. register WCF with IIS and ASP.NET하는 방법에 대한 자세한 내용.

  2. 둘째, IIS를 열고 웹 사이트/가상 디렉터리의 고급 설정으로 이동하십시오. "고급 설정"팝업에서 응용 프로그램 풀을 "Classic .NET AppPool"로 변경하고 확인을 클릭하십시오.

기억해야 할 점은 응용 프로그램에서 사용하는 응용 프로그램 풀에는 두 가지 중요한 설정이 있어야한다는 것입니다. a) AppPool의 관리 파이프 라인 모드가 "통합"대신 "클래식"으로 설정되어야합니다. b) AppPool의 .NET Framework 버전은 WCF 서비스에 사용 된 것과 동일해야합니다.

이 두 가지 설정을 사용하면 응용 프로그램에 새로운 AppPool을 만들고 사용할 수 있으므로 "Classic .NET AppPool"과 관련 될 필요는 없습니다.

3

감사합니다, (말 그대로 동일한 출력을 얻고 있었다). 문제는 앱이 통합 모드에서 실행되는 동안 가장이 사용 설정되었습니다. 해결하려면, 나는 서비스에 대한 Web.config에 다음을 추가 :

<configuration> 
    <system.webServer> 
    <validation validateIntegratedModeConfiguration="false" /> 
    </system.webServer> 
</configuration> 

<system.Web/httpHandlers> 및 < system.Web/HttpModules는 > 섹션으로 "확인이 우회 통합 모드 검증, 물론 가장 "source

More info that helped me