IIS 7에서 SVC 호스팅
정말... ^^;
Oxite 설치때문에 많은 시행착오를 거치는군요.
Live Writer를 이용해서 Metaweblog API 사용을 설정하는 과정에서 다음과 같은 오류가 발생했습니다.
"
An error occurred while attempting to connect to your blog:
Server Error - The server reported an error with the following URL:
http://localhost/MetaWeblog.svc
405 Method Not Allowed
You must correct this error before proceeding.
"
직접 IE를 이용해서 "http://localhost/MetaWeblog.svc"와 같이 입력했더니 찾을 수 없다고 나옵니다. ^^; IIS 7 관리자에서 보니까, svc 확장자에 대한 핸들러가 전혀 매핑되어 있지 않았습니다. 그래서 예전에 제가 썼던 자료를 한번 찾아봤는데요.
WCF 서비스를 IIS에서 호스팅 하는 방법
; https://www.sysnet.pe.kr/2/0/382
그런데 ^^; IIS 6을 기반으로 써놓았네요. IIS 7에서는 달라졌지요. 그래서 관련 자료를 좀 더 찾아봤더니 ^^ 이미 마이크로소프트가 servicemodelreg.exe라는 응용 프로그램을 제공해 주는군요. ^^
Hosting a WCF service in IIS7
; http://www.u2u.info/Blogs/Peter/Lists/Posts/Post.aspx?ID=151
즉, 다음과 같이 실행해서 해결이 되었습니다.
C:\>"%windir%\Microsoft.NET\Framework\v3.0\Windows Communication Foundation\ServiceModelReg.exe" -i
Microsoft(R) Windows Communication Foundation Installation Utility
[Microsoft (R) Windows (R) Communication Foundation, Version 3.0.4506.648]
Copyright (c) Microsoft Corporation. All rights reserved.
Installing: Machine.config Section Groups and Handlers
Installing: System.Web Build Provider
Installing: System.Web Compilation Assemblies
Installing: HTTP Handlers
Installing: HTTP Modules
Installing: ListenerAdapter node for protocol net.tcp
Installing: Protocol node for protocol net.tcp
Installing: TransportConfiguration node for protocol net.tcp
Installing: ListenerAdapter node for protocol net.pipe
Installing: Protocol node for protocol net.pipe
Installing: TransportConfiguration node for protocol net.pipe
Installing: ListenerAdapter node for protocol net.msmq
Installing: Protocol node for protocol net.msmq
Installing: TransportConfiguration node for protocol net.msmq
Installing: ListenerAdapter node for protocol msmq.formatname
Installing: Protocol node for protocol msmq.formatname
Installing: TransportConfiguration node for protocol msmq.formatname
Installing: HTTP Modules (WAS)
Installing: HTTP Handlers (WAS)
C:\Windows\system32>
실행 후에, IIS 7 관리자에서 확인해 보면 다음과 같은 항목을 볼 수 있습니다.
[그림 1: IIS 7에 등록된 SVC Handler]
[이 토픽에 대해서 여러분들과 의견을 공유하고 싶습니다. 틀리거나 미흡한 부분 또는 의문 사항이 있으시면 언제든 댓글 남겨주십시오.]