IDeploymentContext.SiteUrl 方法

定义

返回项目根据 SharePoint 连接到的 Microsoft.SharePoint.SPWeb 的规范 URL。

public Uri SiteUrl ();

返回

Uri

项目根据 SharePoint 连接到的 Microsoft.SharePoint.SPWeb 的规范 URL。

注解

这可能与相同,也可能不相同 Microsoft.VisualStudio.SharePoint.ISharePointProject.SiteUrl ,但它们指向相同资源。

此值将从 SharePoint 中查询,使其与 SiteCollectionUrl 一致。

例如, Microsoft.VisualStudio.SharePoint.ISharePointProject.SiteUrl 可以为 http://localhost ,但 SharePoint 会将其解析为 http://hostname 。

适用于