开发者

How to determine programmatically whether team project has sharepoint portal configured?

In VS.Net 2010 Beta 2: when a team project gets created the wizard offers a choice of whether or not to configure the project's Sharepoint portal. How can I determine programmatically whether a team project has a portal confi开发者_JAVA百科gured. Thank you in advance for any help.


You know the url? The default URL for the portal is http://serverName/sites/teamProjectName/default.aspx, rigth? If so, use this:

WebRequest request = WebRequest.Create("sharepointURL");
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
if (response == null || response.StatusCode != HttpStatusCode.OK)
{
   // Do logic here.
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜