Not sure if anyone knows sharepoint here, but this is code in .net if that helps.
Im simply trying to create sub sites in sharepoint using code. So I have this:
Soon as I run this code right on the last line I get the error:VB Code:
Dim site As SPSite Dim webColl As SPWebCollection Dim newweb As SPWeb Dim l As UInt32 site = New SPSite("http://mysite/sites/tests") site.AllowUnsafeUpdates = True webColl = site.AllWebs newweb = webColl.Add(CType("tests/OMI", String), CType("OMI", String), CType("Subsite", String), Convert.ToUInt32(1033), SPWebTemplate.WebTemplateSTS, CType(True, Boolean), CType(False, Boolean))Anyone know why I cannot connect to the config db. Not sure what to look for ?Code:Cannot connect to the configuration database. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Runtime.InteropServices.COMException: Cannot connect to the configuration database.Source Error:
Thanks,
Jon


Reply With Quote
