Logo 
Search:

Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Creating a virtual server and Share Point Site programmatically.using C#

  Asked By: Nichole    Date: Jul 02    Category: Sharepoint    Views: 2398

pls tell me ..........

1)Creating a virtual server programmatically using C#

2)Creating a Share Point Site programmatically.using C#

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Donta Kirkland     Answered On: Jul 02

I'm not sure about creating  the virtual  server, but you can create SP sites
with the web service at http://Server_Name:Port_Number/_vti_adm/Admin.asmx.
The Method is aptly named CreateSite(). Have some sample code complements
of the WSS SDK.

Web_Reference_Folder_Name.Admin admService = new Web_Reference_Folder_Name
.Admin();
admService.Credentials= System.Net.CredentialCache.DefaultCredentials;

try
{
admService.CreateSite("http://Server_Name/sites/SiteCollection_Name",
"Title", "Description", 1033, "STS#0",
"Domain_Name\\User_Alias","User_Display_Name",
"User_E-mail","","");
}

catch (System.Web.Services.Protocols.SoapException ex)
{
MessageBox.Show("Message:\n" + ex.Message + "\nDetail:\n" +
ex.Detail.InnerText +
"\nStackTrace:\n" + ex.StackTrace);
}

 




Tagged: