PC Review


Reply
Thread Tools Rating: Thread Rating: 3 votes, 1.00 average.

asp.net web service Cannot connect to the configuration database

 
 
=?Utf-8?B?a3N0cml5aG9u?=
Guest
Posts: n/a
 
      6th Aug 2005
hellow i need to get sharepoint user credentials, in order to get this
information i'm using the next code. in a C# web service

SPSite site = new SPSite("http://sharepoint/");
SPWeb web = site.OpenWeb();
string cadena = web.CurrentUser.LoginName;

when i run the web service i get this error

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:


Line 45: SPSite site = new SPSite("http://sharepoint/");
Line 46: SPWeb web = site.OpenWeb();
Line 47: string cadena = web.CurrentUser.LoginName;

it shows me the error is on line 47 but i really can't find what is my error.

any help would be appreciate.

thanks in advance
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
AT Service Account Configuration Jason Krause Windows XP Embedded 5 20th Jan 2007 12:19 AM
Windows service configuration - registry or configuration file? Ken Brady Microsoft Dot NET Framework 1 18th Feb 2005 03:52 PM
wireless zero configuration service =?Utf-8?B?UmF5TTEyMw==?= Windows XP Help 0 16th Jun 2004 01:29 AM
Re: Unable to connect to shared printers in a Workgroup configuration Cari \(MS-MVP\) Windows XP Print / Fax 3 28th Apr 2004 11:34 PM
how to connect to a database by DSN configuration? Linda Chen Microsoft ADO .NET 4 23rd Dec 2003 11:46 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:37 PM.