WCF IIS HTTP Error 500.19 - Internal Server Error Code 0x80070032


Server Error
Internet Information Services 7.0

Error Summary
HTTP Error 500.19 - Internal Server Error

The requested page cannot be accessed because the related configuration data for the page is invalid.

Detailed Error Information

Module IIS Web Core
Notification BeginRequest
Handler Not yet determined
Error Code 0x80070032
Config Error The configuration section 'protocolMapping' cannot be read because it is missing a section declaration
Config File \\?\D:\WCFTest\WCFServiceTest\web.config

Requested URL http://localhost:80/WCFServiceTest
Physical Path D:\WCFTest\WCFServiceTest
Logon Method Not yet determined
Logon User Not yet determined

Config Source
   10:   </system.web>
   11:   <system.serviceModel>
   12:     <behaviors>

Links and More Information
This error occurs when there is a problem reading the configuration file for the Web server or Web application. In some cases, the event logs may contain more information about what caused this error.
View more information ?

 WCF 간단한 서비스 만든것을 비주얼 스튜디오 상에서 실행해서 IIS Express로 자동으로 띄우는 것 말고 실제 서비스를 띄울 태국 서버에서 띄우는 과정에서 위와같이 오류가 발생했습니다. 위에 굵게 볼드 처리한 것은 같은 500.19 에러라도 다른 web.config 내용에서 발생하는 이슈가 있어서 일단 표시해봤습니다.

 문제의 원인은 WCF 서비스를 닷넷 4.5로 만들었는데 IIS에 ASP.Net이 적용되지 않아서 생긴거더군요. WCF 서비스에서 사용할 어플리케이션 풀이 위와같이 DefaultAppPool이라고 하나 있는데 닷넷이 v2.0인게 문제였습니다.

 먼저 링크를 클릭해 닷넷 프레임워크 4.5를 다운받고 설치를 합니다. 설치 과정도 다 스샷을 찍었었는데 다른 작업때문에 다 날라갔네요.

 IIS에 ASP.net을 설치하기위해 스샷과 같이 콘솔창에서 C:\Windows\Microsoft.NET\Framework\v4.0.30319 이동합니다. 4.5를 깔았는데 v4.0.30319로 깔리는 것 같습니다. 거기서 aspnet_regiis.exe -i 를 실행하면 IIS에 ASP.NET이 설치가 됩니다.

Start installing ASP.NET (4.0.30319.17929).
.
An error has occurred: 0x8007b799
You must have administrative rights on this machine in order to run this tool.

 콘솔은 관리자모드로 실행해야합니다. 그렇지않다면 위와 같이 에러가 발생합니다.

 이제 IIS 메니저의 어플리케이션 풀을 보면 ASP.NET v4.0과 ASP.NET v4.0 Classic가 생긴것을 볼 수있습니다. DefaultAppPool도 기본 v4.0으로 되었네요.

 WCF 서비스가 이제야 잘 작동합니다.

 사실 서버 관리자도 웹 개발자도 아니라 IIS에 ASP.NET을 설치해야한다는 것을 모를때 한참 구글링중에는 위와 같이 서버 메니저 Features중 .NET Framework 3.0 Features의 WCF Activation - HTTP Activation을 설치하면 된다고 하는 것 같아서 지금은 체크해제해  지운 상태지만 해보니 안되더군요.

댓글

이 블로그의 인기 게시물

'xxx.exe' 프로그램을 시작할 수 없습니다. 지정된 파일을 찾을 수 없습니다.

goorm IDE에서 node.js 프로젝트로 Hello World Simple Server 만들어 띄워보기

애드센스 수익을 웨스턴 유니온으로 수표대신 현금으로 지급 받아보자.