Sharepoint 2010 : Visual Web Part in Sandbox : yes you can !

 

image

 

 

 

 

 

 

 

A few days ago, Mike Morton (MS) and the Visual Studio team released the Visual Studio 2010 Sharepoint Power Tools that allow us to create Visual Web Part running in sandBox mode but also to display build errors when we use unauthorized sandbox code ; you can download the tool here.

Create a Sharepoint 2010 sandbox empty project, add a Sharepoint project Item and the new template will show up:

 

image

 

 

 

 

 

 

Select Visual Web Part (sandBoxed) and a web part will be generate with an ascx control :

image

 

 

 

 

 

 

 

 

However, the ascx control won’t be deployed:

 

image

 

 

 

 

 

 

 

 

 

 

 

But everything relies on pure .Net code :

 image

 

The other nice feature is that you won’t be able to type unauthorized code (class & methods) like SPSecurity, SPFram..:

 

 image

 

Enjoy!!!!!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s