Logo 
Search:

Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Accessing Sharepoint Site Collection & getusagedata

  Asked By: Tanya    Date: Jun 19    Category: Sharepoint    Views: 1721

I'm creating a windows forms application to access the usage data
using the getusagedata method. Note that all this works on a
developement server. On the production server, when I attempt to
either create a new site SPSite("typed the url here") or create a
spglobaladmin(returns yes for isglobaladmin), create a virtual server
for the globaladmin, then try to perfom anything at the site level
(count etc..) I get the following error:

Microsoft.SharePoint.SPException: Cannot connect to the configuration
database. For tips on troubleshooting this error, search for article
823287 in the Microsoft Knowledge Base at
http://support.microsoft.com." target="_blank" rel="nofollow">http://support.microsoft.com. --->
System.Runtime.InteropServices.COMException (0x81070555): Cannot
connect to the configuration database. For tips on troubleshooting
this error, search for article 823287 in the Microsoft Knowledge Base
at http://support.microsoft.com." target="_blank" rel="nofollow">http://support.microsoft.com.
at Microsoft.SharePoint.Library.SPRequestInternalClass.OpenSite
(String bstrUrl, Boolean bGetUrlOnly, String& pbstrServerRelativeUrl,
Guid& pgSiteId, Int32& pOwnerID, Int32& pSecondaryContactID,
DateTime& pdtLastContentChange, DateTime& pdtLastSecurityChange)
at Microsoft.SharePoint.Library.a.a(String A_0, Boolean A_1,
String& A_2, Guid& A_3, Int32& A_4, Int32& A_5, DateTime& A_6,
DateTime& A_7)
--- End of inner exception stack trace ---
at Microsoft.SharePoint.Library.a.a(String A_0, Boolean A_1,
String& A_2, Guid& A_3, Int32& A_4, Int32& A_5, DateTime& A_6,
DateTime& A_7)
at Microsoft.SharePoint.SPSite.get_ServerRelativeUrl()
at Microsoft.SharePoint.SPSite.get_Url()
at Microsoft.SharePoint.c.a(String[]& A_0, String[]& A_1, Guid[]&
A_2, Int32[]& A_3, String[]& A_4, String[]& A_5, String[]& A_6, String
[]& A_7, Boolean[]& A_8, Int32[]& A_9, Int16[]& A_10, Int16[]& A_11)
at Microsoft.SharePoint.SPWebCollection.b()
at Microsoft.SharePoint.SPWebCollection.get_Item(Int32 i)
at usage.main..ctor()

There's also some other weird things going on on our production
server that arent happening on the dev one. Such as cannot import
excel list and cannot create subarea. Any suggestions would be
greatly appreciated.

Microsoft.SharePoint.SPException: Cannot complete this action.

Please try again. ---> System.Runtime.InteropServices.COMException
(0x80004005): Cannot complete this action.

Please try again.
at
Microsoft.SharePoint.Library.SPRequestInternalClass.GetSiteCollection
(Int32 lIISInstanceID, UInt32& pdwColCount, UInt32& pdwRowCount,
Object& pvarDataSet)
at Microsoft.SharePoint.Library.a.a(Int32 A_0, UInt32& A_1,
UInt32& A_2, Object& A_3)
--- End of inner exception stack trace ---
at Microsoft.SharePoint.Library.a.a(Int32 A_0, UInt32& A_1,
UInt32& A_2, Object& A_3)
at Microsoft.SharePoint.Administration.SPSiteCollection.b()
at Microsoft.SharePoint.Administration.SPSiteCollection.get_Item
(Int32 index)
at usage.main..ctor()

Is the error I got when I tried to use count after doing all the
globaladmin nonsense.

The above error is from trying SPSite("site url here"). <- Worked
when it was coded as a webpart. Why can I not do this when logged in
as an admin and running a windows forms app?

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Karla Morrison     Answered On: Jun 19

The account you are running the command as doesn't have access  to the
configuration database. Grant the account using the tool permissions on the
database server  and the problem should disappear.

 
Didn't find what you were looking for? Find more on Accessing Sharepoint Site Collection & getusagedata Or get search suggestion and latest updates.