Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 .NET Inside SQL Server (2005)
 Error while executing SP related to CLR assembly

Author  Topic 

sober69
Starting Member

1 Post

Posted - 2010-10-27 : 04:40:53
Hi,
I've got some problem with stored procedure related to clr assembly function. The problem occurs on sql server 2008 (i know its 2005 cathegory, but there is no cathegory for clr assemblies on sql server in 2008 block). The problem occured on my customer server. Some time ago i deployed this assembly, created procedures that refer to this assembly and everything was working correct. Recently i've redeployed this assebly with new version of it. First ive deleted all references like procedures, views that were using these procedures etc. then ive deleted the assembly and deployed new one with recreating all procedures and views. Unfortunetely the new assebly doesnt work and gives me error like below:


An error occurred in the Microsoft .NET Framework while trying to load assembly id 65556. The server may be running out of resources, or the assembly may not be trusted with PERMISSION_SET = EXTERNAL_ACCESS or UNSAFE. Run the query again, or check documentation to see how to solve the assembly trust issues. For more information about this error:
System.IO.FileNotFoundException: Could not load file or assembly 'monkeyslicer, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
System.IO.FileNotFoundException:
at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
at System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
at System.Reflection.Assembly.Load(String assemblyString)


assembly doesnt reference to any external dlls, even doesnt use .net 3.5, its all in 2.0. the only references are mscorlib and system.data. assembly permission set is safe. database trustworthy property is set to false. The silly thik of it is fact that the same assembly with the same settings like on my customer database works on my local database.
have you ever met with such problem?

shane.garven
Starting Member

2 Posts

Posted - 2011-03-29 : 11:19:26
Hi sober69,

Late reply I know. But I this same problem recently. In the Visual Studio project, I had to set the Permissions to External in the SQL Project within VS using the Properties window for the SQL Project. Once I had set the Permissions to External and re-deployed the CLR sproc, all worked as expected.

HTH

--
Cheers,
Shane
Go to Top of Page
   

- Advertisement -