简体   繁体   English

在开发服务器上运行但不在IIS上运行时,COM对象会加载到MVC项目中吗?

[英]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.

相关问题 使用本地 IIS 运行 asp mvc 项目时显示错误 - when running the asp mvc project with local IIS is shown error ASP MVC项目需要永久加载到IIS中 - ASP MVC project takes forever to load in IIS 如何将WCF项目中的Com对象带到服务器 - How took Com objects that are in WCF project to the server ASP.NET 项目在 VS 运行时在本地运行,但不在本地计算机或服务器上的 IIS 上运行 - ASP.NET project works locally on build when VS is running but not on IIS on my local machine or my server 配置 IIS 10 以在 Windows 服务器上运行运行 dot net 4.0 的 MVC2 项目。 目前只返回500 - Configure IIS 10 to run an MVC2 project running dot net 4.0 on a Windows Server. Currently only returns 500 在 Visual Studio 上通过 IIS Express 运行时可以加载图像,但通过 IIS 运行时无法加载 - Image can load when running by IIS Express on Visual studio, but can't load when running by IIS 无法在IIS服务器上部署ASP.NET MVC项目 - Unable to deploy asp.net mvc project on the IIS server 将MVC项目部署到IIS后出现500(内部服务器错误) - 500 (Internal Server Error) after deploy MVC project to IIS 为什么我的MVC 4项目部分在生产IIS 7服务器上运行 - Why does my MVC 4 Project Partially Run on Production IIS 7 Server 代码在开发服务器上运行,但不在IIS上运行 - Code runs on development server but not on IIS
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM