Quantcast
Channel: SharePoint 2010 - General Discussions and Questions forum
Viewing all articles
Browse latest Browse all 17574

Web Part Error: Unhandled exception was thrown by the sandboxed code wrapper's Execute method

$
0
0

i wrote this code.

SPWeb currentWeb = SPControl.GetContextWeb(HttpContext.Current);

string currentUserName = currentWeb.CurrentUser.LoginName;

LiteralControl message = new LiteralControl();
message.Text = "currentUserName";
Controls.Add(message);

 After that Webpart is throwing this error :

Web Part Error: Unhandled exception was thrown by the sandboxed code wrapper's Execute method in the partial trust app domain: An unexpected error has occurred.


Syed Shujaat Ali


Viewing all articles
Browse latest Browse all 17574

Trending Articles