Created
July 11, 2011 19:17
-
-
Save tecmaverick/1076564 to your computer and use it in GitHub Desktop.
SharePoint 2010 Sandbox Code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
01:25:18.94 SPUCHostService.exe (0x0A8C) 0x0D58 SharePoint Foundation Sandboxed Code Service fe8a Medium - - Unable to activate worker process proxy object within the worker process: ipc://fe3bdb40-dbc3-4322-b772-b34a5752336c:7000 | |
01:25:18.94 SPUCHostService.exe (0x0A8C) 0x0D58 SharePoint Foundation Sandboxed Code Service fe8c Medium - - Error activating the worker process manager instance within the worker process. - Inner Exception: System.InvalidOperationException: Unable to activate worker process proxy object within the worker process: ipc://fe3bdb40-dbc3-4322-b772-b34a5752336c:7000 at Microsoft.SharePoint.UserCode.SPUserCodeWorkerProcess.CreateWorkerProcessProxies() | |
01:25:18.94 SPUCHostService.exe (0x0A8C) 0x0D58 SharePoint Foundation Sandboxed Code Service ei0t Medium - Process creation/initialization threw an exception. Stopping this process. "ipc://fe3bdb40-dbc3-4322-b772-b34a5752336c:7000" | |
01:25:19.05 SPUCHostService.exe (0x0A8C) 0x0D58 SharePoint Foundation Sandboxed Code Service fe87 Medium - - Error activating the worker process manager instance within the worker process. - Starting worker process threw - Inner Exception: System.InvalidOperationException: Unable to activate worker process proxy object within the worker process: ipc://fe3bdb40-dbc3-4322-b772-b34a5752336c:7000 at Microsoft.SharePoint.UserCode.SPUserCodeWorkerProcess.CreateWorkerProcessProxies() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.ComponentModel; | |
using System.Web; | |
using System.Web.UI; | |
using System.Web.UI.WebControls; | |
using System.Web.UI.WebControls.WebParts; | |
using Microsoft.SharePoint; | |
using Microsoft.SharePoint.WebControls; | |
namespace _005_SandBoxWebpart.WP_HelloWorld | |
{ | |
[ToolboxItemAttribute(false)] | |
public class WP_HelloWorld : WebPart | |
{ | |
Label lblName = new Label() { ID = "lblName", Visible = true, Text = "You Name Plese: " }; | |
Button brtnSayHello = new Button() { ID = "btnSayHello", Visible = true, Text = "Greet" }; | |
TextBox txtName = new TextBox() { ID = "txtName", Visible = true, }; | |
protected override void CreateChildControls() | |
{ | |
brtnSayHello.Click += new EventHandler(brtnSayHello_Click); | |
Controls.Add(lblName); | |
Controls.Add(txtName); | |
Controls.Add(brtnSayHello); | |
} | |
void brtnSayHello_Click(object sender, EventArgs e) | |
{ | |
string JSScript = "alert('Hi {0}, greetings from sandboxed webpart.');"; | |
JSScript = string.Format(JSScript,txtName.Text); | |
ScriptManager.RegisterStartupScript(this, this.GetType(), "HelloWorldScript", JSScript, true); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment