G
Guest
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
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