Creation of a site collection in MOSS 2007 using C#.NET 2008 [modified]
-
I created a site collection in a Web Application using the following code snippet in a Console Application: ============================================================================ SPWebApplication webApp = SPWebApplication.Lookup(new Uri("http://devportal.domain.local")); webApp.Sites.Add( "/", // site URL "testsite", // site title "Test Site Description", // site description 1033, // site LCID that represents the language, e.g. 1033 = en-US "STS#0", // site template, e.g. STS#0 = Team Site @"localdomain\my_alias", // site owner login "Test Owner", // site owner name "abc@def.com"); // email Console.WriteLine("Site Created"); Console.ReadLine(); ============================================================================ However, I am not able to view the same? How should I view it?
modified on Tuesday, October 20, 2009 8:33 AM
-
I created a site collection in a Web Application using the following code snippet in a Console Application: ============================================================================ SPWebApplication webApp = SPWebApplication.Lookup(new Uri("http://devportal.domain.local")); webApp.Sites.Add( "/", // site URL "testsite", // site title "Test Site Description", // site description 1033, // site LCID that represents the language, e.g. 1033 = en-US "STS#0", // site template, e.g. STS#0 = Team Site @"localdomain\my_alias", // site owner login "Test Owner", // site owner name "abc@def.com"); // email Console.WriteLine("Site Created"); Console.ReadLine(); ============================================================================ However, I am not able to view the same? How should I view it?
modified on Tuesday, October 20, 2009 8:33 AM
-
I created a site collection in a Web Application using the following code snippet in a Console Application: ============================================================================ SPWebApplication webApp = SPWebApplication.Lookup(new Uri("http://devportal.domain.local")); webApp.Sites.Add( "/", // site URL "testsite", // site title "Test Site Description", // site description 1033, // site LCID that represents the language, e.g. 1033 = en-US "STS#0", // site template, e.g. STS#0 = Team Site @"localdomain\my_alias", // site owner login "Test Owner", // site owner name "abc@def.com"); // email Console.WriteLine("Site Created"); Console.ReadLine(); ============================================================================ However, I am not able to view the same? How should I view it?
modified on Tuesday, October 20, 2009 8:33 AM
mgr_2k7 wrote:
How should I view it?
Poorly. This code is a mess and made less readable by the fact you haven't enclosed it in pre tags. When I did decipher the code,
SPWebApplication
is a Sharepoint class, so you've posted to the wrong forum.CCC solved so far: 2 (including a Hard One!)