At a file gallop, such error falls out here:
There was a. net Framework error in runtime the user of the program or an aggregate function "IM_DownloadImage":
System. Security. SecurityException: failure at request of resolution of type: "System.Security.Permissions.SecurityPermission, mscorlib, Version=18.104.22.168, Culture=neutral, PublicKeyToken=b77a5c561934e089".
System. Security. SecurityException:
In System.Net.WebClient.DownloadDataInternal (Uri address, WebRequest& request)
In System. Net. WebClient. DownloadData (Uri address)
In HttpFunctions. DownloadImage (String imageUri)
It is made:
ALTER ASSEMBLY [IM_DownloadImage] WITH PERMISSION_SET = EXTERNAL_ACCESS
ALTER DATABASE [M5] SET TRUSTWORTHY ON
Help, what can be?
The assembly needs to be registered pens .
And generally wean from CLR.
On equal a place that else worked in 2008R2 can fall off.
"... Sometimes a library is changed from pure MSIL to mixed-mode (i.e. it contains both managed and unmanaged code), and SQL only allows for pure MSIL libraries. The ServiceModel library ( an unsupported library), prior to.NET 4.0, was pure MSIL and so people imported it into A SQL Server 2005, 2008, and 2008 R2 to do Web Service calls . Starting in.NET 4.0 it was changed to mixed-mode and could no longer be imported. Any project using it successfully on 2005, 2008, or 2008 R2 that wanted to upgrade to 2012 (or newer) had to be rewritten to not use ServiceModel.
Some of the actions that can be performed via supported libraries require EXTERNAL_ACCESS so that they can go outside of a SQL Server to the file system, or to the network, etc. Some actions require UNSAFE due to the type of operations (updating static variables, etc) or being marked with a Host Protection Attribute (there are many different attributes that are for different reasons for requiring UNSAFE)... "- esteem thoughtfully,