Archive for the Category: .NET Version 4

Fixing orientation of image/photo from devices

Camera phones these days store the orientation the phone was in when taking the photo and store the photo in the camera device layout.  So this means if your software dosn’t know to rotate the image it will appear rotated on screen. Here is a simple extension method to fix the orientation when you load […]

Also posted in .NET, .NET Version 3.5 Comments Off

Tracking Changes to Entities in a TableServiceContext

I recently ran into a problem that I needed to track what has actually changed on the Entity before it gets stored.  It turns out that this level of tracking isn’t available in a TableServiceContext unlike it’s similar style providers like the Linq to SQL one.  It turns out you can achieve this quite simply. […]

Also posted in .NET, Azure Comments Off

Error – This method explicitly uses CAS policy, which has been obsoleted by the .NET Framework. In order to enable CAS policy for compatibility reasons, please use the NetFx40_LegacySecurityPolicy configuration switch.

If you change your App.Config to the following this error will go away.  See here for information regarding this <?xml version=”1.0″?> <configuration> <startup> <supportedRuntime version=”v4.0″ sku=”.NETFramework,Version=v4.0″/> </startup> <runtime> <NetFx40_LegacySecurityPolicy enabled=”true”/> </runtime> </configuration>

Comments Off

Error occurred in deployment step ‘Activate Features': Object reference not set to an instance of an object.

This just means that some custom EventReceiver code you have written is failing. Comment out your code and add it in step by step until you discover the problomatic code

Also posted in .NET Version 3.5, Error Solving, Share Point 2010 2 Comments