[英]COM objects load in MVC project when running on development server but NOT on IIS?
I am referencing a COM API in my MVC 3 project, and when I run the project on VS development server I can interact with the API fine. 我在MVC 3项目中引用了COM API,当我在VS开发服务器上运行该项目时,可以很好地与API进行交互。 However, when I run on IIS 7.5, the API only returns null objects. 但是,当我在IIS 7.5上运行时,API仅返回空对象。 No error is thrown it simply returns null for everything. 没有引发任何错误,它仅对所有内容返回null。
I have no idea if there are security issues surrounding COM, I assumed any user on a machine could interact with a COM reference installed on the machine? 我不知道COM周围是否存在安全问题,我假设计算机上的任何用户都可以与计算机上安装的COM引用进行交互?
COM is prone to permissions/rights issues when used from a Service (IIS is just a special one)... IF the COM objects do something "desktop-like" (ie Excel or similar) this is even more locked down since Vista... 当从服务中使用COM时,COM容易出现权限问题(IIS只是一个特殊的问题)...如果COM对象执行“桌面式”操作(例如Excel或类似功能),则自Vista以来,这种情况就更加难以解决。 ..
You could try to circumvent that somehow but I wouldn't recommend that... 您可以尝试以某种方式规避该问题,但我不建议您...
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.