Reputation: 4290
CREATE ASYMMETRIC KEY asymmetrickey
FROM EXECUTABLE FILE = 'c:\windows\microsoft.net\framework\v2.0.50727\system.windows.forms.dll'
Why can't I use the above to generate an asymmetric key from framework libraries (for installing in SQL server as references for CLR functions). It gives an error:
"An error occurred during the generation of the asymmetric key."
Without an asymmetric key the database needs to be set to trustworthy to add the assembly to the SQL Server (2005). I realise the framework libraries are not intended for use from SQL Server, but am curious as to why this doesn't work.
Upvotes: 1
Views: 1373
Reputation:
System.Windows.Forms
is not allowed inside CLR functions.
http://blogs.msdn.com/tims/archive/2004/05/27/142798.aspx
http://msdn.microsoft.com/en-us/library/ms403279.aspx
Upvotes: 0