팜 A에 사용자 지정 SharePoint 웹 서비스를 배포했습니다. 팜 B의 SharePoint 타이머 작업에서이 웹 서비스에 액세스하려고합니다. 클래스 라이브러리 프로젝트 생성, 패키징 (wsp), 그리고 GAC 로의 전개. 문제는 다음 코드를 사용하여 웹 서비스에 액세스 할 수 없다는 것입니다. TodaysNewSVC
는 서비스 참조다른 SharePoint 팜에서 SharePoint 사용자 지정 웹 서비스를 호출 할 수 없습니다.
TodaysNewSVC.GetTodaysnewsfromInsite objGetNews = new TodaysNewSVC.GetTodaysnewsfromInsite();
objGetNews.PreAuthenticate = true;
objGetNews.Credentials = CredentialCache.DefaultCredentials;
objGetNews.Url = "http://insite-dev.portal/_vti_bin/todaysnews.asmx";
DataTable dt2 = objGetNews.getNewsFromInsite(true, true);
//getNewsFromInsite is a WebMethod which returns the DataTable.
주입니다 : 두 농장은 같은 Active Directory 인증을 사용합니다. 타이머 작업 및 기능 활성화에 대한 디버깅을 수행했으며 정상적으로 작동합니다. 문제가 통화 중에 발생합니다. 즉, getNewsFromInsite
asmx 및 wsdl 파일은 Windows 탐색기와 Windows 콘솔 응용 프로그램에서 액세스 할 수 있습니다. 여기
GetTodaysnewsfromInsiteSoapClient objWSClient = new GetTodaysnewsfromInsiteSoapClient();
objWSClient.ClientCredentials.Windows.ClientCredential = System.Net.CredentialCache.DefaultNetworkCredentials;
objWSClient.ClientCredentials.Windows.AllowedImpersonationLevel = System.Security.Principal.TokenImpersonationLevel.Impersonation;
DataTable dt = objWSClient.getNewsFromInsite(true, true);
오류 메시지입니다 :이 problem-with-page.aspx
무엇
The request failed with the error message:
--
<html><head><title>Object moved</title></head><body>
<h2>Object moved to <a href="%2fPages%2fproblem-with-page.aspx%3fc%3d500">here</a>.</h2>
</body></html>
예 Madhur, 인증 할 수 없어 통합 Windows 인증을 사용하고 있습니다. _vti_bin 12 하이브의 디렉터리가 익명의 Windows 통합 인증으로 설정되어 있는지 확인했습니다. 그 MOSS 2007. BTW, 나는 다른 농장 에서이 웹 서비스를 호출하고 목표 코드에 들어갈 수 없습니다! –