WCF를 이용하여 RESTful webservice를 구현하고 있는데, 인증 부분에서 문제가 잘 해결이 되지 않네요.
첨부이미지에서 처럼 IIS의 Virtual directory에서 Windows 인증과 Basic 인증을 모두 활성화 시켜 놓았을 때,
WCF의 configuration이 잘 먹질 않네요. webHTTPBinding을 사용하고 있습니다.
IE에서 접근했을때는 문제가 없는데, client program에서 시도 하였을때는 401 에러를 발생시키네요.
혹시 관련 정보가 있으면 도움 부탁드리겠습니다.
고맙습니다.
Web.config
<webHttpBinding>
<binding name="BPCServicesBinding" closeTimeout="01:00:00" openTimeout="01:00:00"
receiveTimeout="01:00:00" sendTimeout="01:00:00" maxBufferSize="2147483647"
maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647"
transferMode="Buffered">
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647"
maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
<security mode="TransportCredentialOnly">
<transport clientCredentialType="Windows" />
</security>
</binding>
</webHttpBinding>
Client program:
Dim sUri As New Uri(uri)
Dim oRequest As HttpWebRequest
Try
oRequest = WebRequest.Create(sUri)
oRequest.Method = method '"POST"
oRequest.ContentType = contentType '"application/json"
oRequest.ContentLength = postBytes.Length
oRequest.Credentials = New NetworkCredential(userName, password)
[최초 등록일: ]
[최종 수정일: 1/22/2010]