RSS Feed Feed your read!

Scot Hillier is an independent consultant and Microsoft SharePoint Most Valuable Professional focused on creating solutions for Information Workers with SharePoint, Office, and related .NET technologies. A frequent speaker at TechEd and SharePoint Connections, he is also the author many books on Microsoft technologies including 5 for SharePoint 2010. Scot splits his time between consulting on SharePoint projects and training for Critical Path Training. Scot is a former U. S. Navy submarine officer and graduate of the Virginia Military Institute. Scot can be reached at scot@shillier.com

Archives

January 2010 (17)
February 2010 (1)
March 2010 (1)
April 2010 (2)
May 2010 (1)
June 2010 (1)
August 2010 (4)
September 2010 (6)
October 2010 (3)
November 2010 (2)
February 2011 (1)
March 2011 (4)
April 2011 (3)
May 2011 (1)
August 2011 (1)

Links

Todd Baginski's Blog
BCS Team Blog
SharePoint Team Blog
SharePoint Workspace Team Blog
Andrew Connell's Blog
Ted Pattison's Blog

Tag Cloud

Business Data Connectivity, Claims, Conferences, MOSS 2007 Archived Post, PowerShell, Search, SharePoint 2010,

Detecting the Sandbox in SharePoint 2010 

Tags:

When you create Sandboxed Solutions, these features are capable of running either inside or outside of the sandbox. Because there are many restrictions on solutions running in the sandbox, you may want to detect if the current solution is running inside the sandbox. The following code will do it:

if (System.AppDomain.CurrentDomain.FriendlyName.Equals(

“Sandboxed Code Execution Partially Trusted Asp.net AppDomain”))

    writer.Write(“You are in the Sandbox”);

 
Posted by Scot Hillier on 20-Feb-10
0 Comments  |  Trackback Url  |  Link to this post | Bookmark this post with:        
 

Links to this post

Comments