views:

76

answers:

1

I'm developing a DLL that uses WPF classes to make image manipulation. It works fine in my local environment, but when I try to use it in an hosted web site I retrieve this error:

Request for the permission of type 'System.Security.Permissions.MediaPermission, WindowsBase, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' failed.

exactly when I try to call the EndInit() of a BitmapImage object:

BitmapImage originalImage = new BitmapImage();
originalImage.BeginInit();
originalImage.CacheOption = BitmapCacheOption.OnLoad;
originalImage.UriSource = new Uri(physical_imagepath);
originalImage.EndInit();

Any suggestion?

A: 

Ask your host to change the permissions.

If they refuse, switch to a better webhost.

SLaks
nope, my webhost says that in shared hosting there's no way to have a dll to full trust. If you know a shared hosting service that can do this, plese let me know! thanks!
tanathos
I'm using LFC shared hosting, which is full trust.
SLaks
I'm using Aruba, but now I want to check out this LFC, thanks for the answer
tanathos