简体   繁体   English

无法从C#代码访问GAC

[英]Cannot access GAC from C# code

I have a third-party .net DLL that I installed and registered, and appears in the GAC (c:\\windows\\assembly). 我有一个我安装并注册的第三方.net DLL,它出现在GAC(c:\\ windows \\ assembly)中。 I am able to successfully access the GAL in my development and my test environments, but not in production. 我可以在开发和测试环境中成功访问GAL,但不能在生产环境中访问。

My web service is written in C#.Net, .Net 2.0 framework. 我的Web服务是用C#.Net,.Net 2.0框架编写的。 I can only assume that the problem occurs during the line where Assembly.LoadWithPartialName() is called 我只能假设问题发生在调用Assembly.LoadWithPartialName()的行中

My development environment is Windows XP Pro; 我的开发环境是Windows XP Pro。 test is Windows Server 2003; 测试是Windows Server 2003; and production is Windows Server 2003. The only difference between test and production is that production is running over https, whereas test is in http. Windows Server 2003和生产版本。测试和生产之间的唯一区别是生产通过https运行,而测试在http中。 Is it possible that there is some other permissions error? 是否有其他权限错误?

I've even tried importing the DLL into the project, but with no luck of success. 我什至尝试将DLL导入到项目中,但没有成功。

Any help or insight is much appreciated! 非常感谢您的帮助或见解!

Ok, here it is: for some reason on the server, when I installed the component, it was running as a "Server application" instead of a "library application" 好的,这里是:由于某种原因,在服务器上,当我安装组件时,它作为“服务器应用程序”而不是“库应用程序”运行

Administrative Tools --> Component Services Console Root --> Component Services --> Computers --> My Computer --> COM+ Applications 管理工具->组件服务控制台根目录->组件服务->计算机->我的电脑-> COM +应用程序

Right click the utility in question, and select properties. 右键单击有问题的实用程序,然后选择属性。 Under activation, select library application; 在激活下,选择库应用程序; then restart. 然后重新启动。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM