I am creating a DLL that utilizes WPF classes to create image manipulation. It really works fine during my local atmosphere, however when I use it within an located site I retrieve this error:
Request the permission of type 'System.Security.Permissions.MediaPermission, WindowsBase, Version=3..., Culture=neutral, PublicKeyToken=31bf3856ad364e35' unsuccessful.
exactly after i attempt to call the EndInit() of the BitmapImage object:
BitmapImage originalImage = new BitmapImage() originalImage.BeginInit() originalImage.CacheOption = BitmapCacheOption.OnLoad originalImage.UriSource = new Uri(physical_imagepath) originalImage.EndInit()
Request your host to alter the permissions.
When they refuse, change to a much better webhost.