当前位置:  开发笔记 > 编程语言 > 正文

FileLoadException/Msg 10314运行CLR存储过程时出错

如何解决《FileLoadException/Msg10314运行CLR存储过程时出错》经验,为你挑选了2个好方法。

尝试运行CLR存储过程时收到以下错误.任何帮助深表感谢.

Msg 10314, Level 16, State 11, Line 1
An error occurred in the Microsoft .NET Framework while trying to load assembly id 65752. 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.FileLoadException: Could not load file or assembly 'orders, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An error relating to security occurred. (Exception from HRESULT: 0x8013150A)
System.IO.FileLoadException: 
   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)

homeskillet.. 69

运行下面的SQL命令,问题似乎得到解决.

USE database_name
GO

EXEC sp_changedbowner 'sa'
ALTER DATABASE database_name SET TRUSTWORTHY ON 

sp_changedbowner修复了它!有关http://support.microsoft.com/kb/918040的更多详细信息 (2认同)


小智.. 8

使用任何CPU配置构建项目.在使用x86配置编译我自己的项目并尝试在x64 SQL服务器上运行时,我遇到了这个问题.



1> homeskillet..:

运行下面的SQL命令,问题似乎得到解决.

USE database_name
GO

EXEC sp_changedbowner 'sa'
ALTER DATABASE database_name SET TRUSTWORTHY ON 


sp_changedbowner修复了它!有关http://support.microsoft.com/kb/918040的更多详细信息

2> 小智..:

使用任何CPU配置构建项目.在使用x86配置编译我自己的项目并尝试在x64 SQL服务器上运行时,我遇到了这个问题.

推荐阅读
kikokikolove
这个屌丝很懒,什么也没留下!
DevBox开发工具箱 | 专业的在线开发工具网站    京公网安备 11010802040832号  |  京ICP备19059560号-6
Copyright © 1998 - 2020 DevBox.CN. All Rights Reserved devBox.cn 开发工具箱 版权所有