IIS无法打开exe文件,例如calc.exe,outlook.exe,notepad.exe [英] IIS doesnt open exe file like calc.exe,outlook.exe,notepad.exe

查看:152
本文介绍了IIS无法打开exe文件,例如calc.exe,outlook.exe,notepad.exe的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在vb.net中有一个程序,因为我使用Outlook参考,并且我调用该Outlook的所有字段都会自动归档(例如)以解决地址,主题,消息和附件.我从该网站获取该代码(打开默认电子邮件客户端).如果我在本地驱动器中运行该程序,它将运行良好并打开Outlook并填充所有字段,但是我将该程序粘贴到IIS上,如果我运行该程序,则会显示错误.

由于以下错误,为具有CLSID {0006F03A-0000-0000-C000-000000000046}的组件检索COM类工厂失败:80070005访问被拒绝. (来自HRESULT的异常:0x80070005(E_ACCESSDENIED)).

请回答以上问题

在IIS中检入的简单代码
System.Diagnostics.Process.Start("calc")只需将此代码粘贴到click事件中并在本地驱动器中运行.您可以获取计算器,但是您可以从IIS运行,但无法打开计算器,但是如果您在任务管理器中看到了计算器,就可以看到计算器.exe在进程中运行

I have a one program in vb.net in that i use outlook reference and i call that outlook with all fields are automatically filed (i.e)to address,subject,message and attachment.I take that code from this web site (open default email client). If i run that program in local drive it works well and open outlook and filled all fields but i paste that program on IIS and if i run that program it show the error.

Retrieving the COM class factory for component with CLSID {0006F03A-0000-0000-C000-000000000046} failed due to the following error: 80070005 Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)).

pls reply for above question

simple code to check in IIS
System.Diagnostics.Process.Start("calc") just paste this code in click event and run.in local drive u get calculator but u run from IIS it doesn''t open calculator but if u see in task manger u see calc.exe is run in the process

推荐答案

噢,真可惜!
这是一个非常普遍的问题,由不知道自己在做什么的人提出...当执行方法Process.Start时,它是否在后面的代码中执行.它运行在服务器上,而不是客户端上.因此,您启动的任何进程以及运行的任何可执行文件都在服务器而不是客户端上运行.因此您的用户看不到它.

在本地计算机上进行测试时,服务器和客户端是同一台计算机,因此看起来好像可以正常工作.没有.没有在客户端计算机上运行程序的实际方法-您甚至无法确定客户端是PC,MAc,移动电话还是可访问互联网的冰箱.请注意,我说的是实用的"-有两种方法可以使用,但是它们都需要用户的事先同意和热情帮助,在99.999%的情况下将不会出现.

放弃主意.不会起作用.
Oh good grief!

This is a very common question, raised by people who have no idea what they are doing... When you execute the method Process.Start, is it executed in the code behind. Which runs on the server, not the client. So any process you start, and any executable file that runs, runs on the server, not the client. So your user cannot see it.

When you tested this on your local machine, the server and and the client were the same computer, so it looked as if it worked. It doesn''t. There is no practical way to run programs on a client computer - you cannot even tell if the client is a PC, a MAc, a mobile phone or a refrigerator with internet access. Note that I say "practical" - there are a couple of ways to do it, but they all require the prior consent and enthusiastic help of the user, which is not going to be forthcoming in 99.999% of cases.

Drop the idea. It won''t work.


是的.
我有同样的问题.
我想用服务器上的消息打开记事本,但拒绝这样做!
这似乎是某种安全措施.您需要授予更多权限:

http://stackoverflow.com/questions/4679561/system- diagnostics-process-start-not-work-fos-an-iis [ http://forums.asp.net/t/1277084.aspx [ http://stackoverflow.com/questions/8414514/iis7-does-not-start-my-exe-file-by-process-start [
Yeah.
I have the same problem.
I want to open the notepad with a message on the server and it refuses to do it!
It seems to be some sort of security measure. you need to grant more premissions:

http://stackoverflow.com/questions/4679561/system-diagnostics-process-start-not-work-fom-an-iis[^]

http://forums.asp.net/t/1277084.aspx[^]

http://stackoverflow.com/questions/8414514/iis7-does-not-start-my-exe-file-by-process-start[^]


解决方案是在相同情况下,如果您的该应用程序已在Windows 7上的iis 7.5下部署,无法正常工作;但是,如果您在Windows 8.1的iis 8.5下部署相同的应用程序,则可以100%确保运行.我有一个MVC 4应用程序,该文件调用file.exe进行pdf生成.相同的部署在Windows 8.1的iis 8.5下运行,但在Windows 7的iis 7.5下未运行.它在Process.start()中崩溃. IIS 8.5优于iis 7.5.这是解决方案,但是由于这个原因,我无法解决iis 7.5的问题.这不好笑.我会接受其他解决方案.
The solution is that in the same situation if your application was deployed under iis 7.5 on Windows 7 it won''t work; but if you deploy the same application under iis 8.5 on Windows 8.1 it will work 100% guaranteed. I have a MVC 4 application that calls a file.exe for pdf generation. The same deploy run under iis 8.5 on Windows 8.1 but doesn''t run under iis 7.5 on Windows 7. It crashes in Process.start(). By few words IIS 8.5 is better than iis 7.5. This is the solution, but because of this I can''t solve the issue with iis 7.5. It''s not funny. I''ll accept other solutions.


这篇关于IIS无法打开exe文件,例如calc.exe,outlook.exe,notepad.exe的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆