getting user info with SPSite error

G

Guest

hellow my problem is i need to get the log in user information from the site
in the code. i tried this but i get this error "Cannot connect to the
configuration database."

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

any suggestions or possible error in my code??

thanks in advance.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,262
Messages
2,571,050
Members
48,769
Latest member
Clifft

Latest Threads

Top