I'm getting married! - More Details

Unsafe code & Partial Trust

Tuesday, June 06, 2006 8:26 PM

Ever since moving to GoDaddy's shared hosting, I've had nothing but problems dealing with running in a Partial Trust environment. In fact, it really was the first time that I had paid any attention at all to the security features baked into ASP.NET (and .NET in general).

For the most part, I was able to aleviate all of my problems by strong signing my assemblies, and marking them with the AllowPartiallyTrustedCallers attribute. It is quite a hastle however, when dealing with 3rd party controls. Often times, open source projects either don't use APTCA, or don't give their binaries a strong name. In these cases, instead of merely using the library, I need to aquire the source, add the necessary attributes, and recompile.

Tonight however, I discovered a new caveat to Code Access Security...

I had hoped to debut my FaceFinder project, a web-based face detection mashup of the OpenCV image library and my PhotoNotes image notation script. It would allow you to upload a picture, and have the faces automatically marked in the image. Very similar in nature to the BetaFace website, only completely implemented using open source software.

Problem is, as it turns out, the .NET wrapper to the OpenCV library (SharperCV), utilizes code sections marked as unsafe. However, thanks to type safety, the .NET Framework only allows unsafe code in fully trusted assemblies. There's a nice explanation of this here: Beware of Fully Trusted Code

For now I'm stuck.

Anyone know of a host that allows Full Trust? I highly doubt it, especially now after reading what it's all about.

Comments



Post a comment

   
 
  
  

    

All content © Dusty Davidson