Results 1 to 2 of 2

Thread: Portal sub site..sharepoint ??

  1. #1

    Thread Starter
    Banned
    Join Date
    May 2006
    Posts
    161

    Portal sub site..sharepoint ??

    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:
    VB Code:
    1. Dim site As SPSite
    2.         Dim webColl As SPWebCollection
    3.         Dim newweb As SPWeb
    4.         Dim l As UInt32
    5.  
    6.         site = New SPSite("http://mysite/sites/tests")
    7.         site.AllowUnsafeUpdates = True
    8.  
    9.         webColl = site.AllWebs
    10.         newweb = webColl.Add(CType("tests/OMI", String), CType("OMI", String), CType("Subsite", String), Convert.ToUInt32(1033), SPWebTemplate.WebTemplateSTS, CType(True, Boolean), CType(False, Boolean))
    Soon as I run this code right on the last line I get the error:
    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:
    Anyone know why I cannot connect to the config db. Not sure what to look for ?

    Thanks,
    Jon
    Last edited by Hack; Jun 6th, 2006 at 01:05 PM.

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Portal sub site..sharepoint ??

    Moved to .NET

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width