문제

이것은 가능합니다 :

  using (SPSite site = new SPSite(SPContext.Current.Site.WebApplication.Sites[0].Url))
.

이하입니까? :

 using (SPSite site = new SPSite(SPContext.Current.Site.WebApplication.Sites[0].RootWeb.Url))
.

도움이 되었습니까?

해결책

예이 작업도 작동하지만 SPWEB 객체를 SPSITE 객체에 넣지 않고 있습니다. 대신 URL을 사용하여 새 SPSITE 객체를 인스턴스화하는 것입니다

대부분의 경우 spsite.url 및 spsite.rootweb.url은 동일한 URL을 반환합니다. 이미 여기에 spsite-url-and-spsite-rootweb-url">

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 sharepoint.stackexchange
scroll top