Category Archives: Code

Unhandled exception was thrown by the sandboxed code wrapper’s Execute method in the partial trust app domain

I’ve been developing a sandboxed web part for SharePoint 2010.  The web part retrieves images from a SharePoint image library and uses Silverlight to display them in a slideshow.  I deployed the web part solution to the live environment and added it to a simple test page.  The web part displayed the images without error. [...]

Using Visual Studio 2008 With Visual Studio Team Foundation Server 2010

In order to use Visual Studio 2008 With Visual Studio Team Foundation Server 2010, you need to follow the steps below in the following order: Install Visual Studio 2008 Install Team Explorer 2008 Install Visual Studio 2008 SP1 Install Visual Studio 2008 Forward Compatibility Update for Team Foundation Server 2010      

Value does not fall within the expected range

When running a WPF click once application from a network drive, I got the error “Value does not fall within the expected range” .  The reason for the error was an “&” in the name of the folder that contained the application.

Using PowerShell With A Failover Cluster

You must import the FailoverClusters module to use the cluster commandlets in PowerShell.  Open PowerShell then type: Import-Module FailoverClusters

Reporting Virtual Machine Dynamic Disk Space Using PowerShell And System Center Virtual Machine Manager 2008 R2

Dynamically expanding disks enable you to thin provision virtual machines (VMs)  storage.  This means you can pack more VMs onto a given amount of disk, but you need to ensure that if you provision more storage than is physically available, you don’t run out of space on the host.  The PowerShell script below produces a csv file [...]

Storing URLs With Query Strings In XML

Suppose you have a URL like  http://www.test.com?1=2&2=3 and you need to store it in an XML file like the one below.  The & character will cause and error.  Replace the & with &amp; e.g. http://www.test.com?1=2&amp;2=3 <?xml version=”1.0″ encoding=”utf-8″ ?> <Regions> <Europe> <Region ID=”1981″ Name=”Denmark” IAURL=”http://www.test.com?1=2&2=3/> </Europe> </Regions>    

Follow

Get every new post delivered to your Inbox.