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 configured. Thank you in advance for any help.
Asked
Active
Viewed 268 times
1 Answers
0
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.
}

joerage
- 4,863
- 4
- 38
- 48