1
원격 서비스 (ISS에서 .NET 유형 호스팅)를 개발했습니다. IIS가 "Windows 통합 인증"을 사용하도록 구성되었습니다.원격 서버에서 오류를 반환했습니다. .NET Remoting에서 (401) 권한이 없음
"로컬 호스트" (아래 코드는 테스트 용 코드입니다.)에서 단위 테스트를 실행하면 완벽하게 작동하지만 테스트 서버에 서비스를 배포 한 후 (다른 도메인), "System.Net.WebException : 원격 서버가 오류를 반환했습니다 : (401) 권한이 없습니다." 예외.
string url = string.Concat(@"http://", serverName, "/", ServiceName);
IDictionary props = new Hashtable();
props["useDefaultCredentials"] = true;
props["useAuthenticatedConnectionSharing"] = true;
BinaryServerFormatterSinkProvider srv = new BinaryServerFormatterSinkProvider();
BinaryClientFormatterSinkProvider clnt = new BinaryClientFormatterSinkProvider();
this.channel = new HttpChannel(props, clnt, srv);
ChannelServices.RegisterChannel(this.channel, false);
IMyService service = Activator.GetObject(typeof(IMyService), url) as IMyService;
service.GetData();// this error returns "System.Net.WebException: The remote server returned an error: (401) Unauthorized." exception.
어떤 문제 일 수 있습니까? 도메인과 관련이 있습니까? 기본 웹 프록시 구성과 관련이있을 수 있습니까?