简体   繁体   English

System.Diagnostics.Process.Start无法使用IIS在asp.net上运行

[英]System.Diagnostics.Process.Start not work from on asp.net using IIS

I Have Asp.Net server, when I run it as debug on local its work fine. 我有Asp.Net服务器,当我在本地调试运行它时,它的工作正常。 But when I try to run it on IIS and get it from browser it does not work 但是,当我尝试在IIS上运行它并从浏览器获取它时,它不起作用

For example line : System.Diagnostics.Process.Start(@"c:\\Program Files (x86)\\Microsoft Office\\Office12\\excel.exe"); 例如:System.Diagnostics.Process.Start(@“ c:\\ Program Files(x86)\\ Microsoft Office \\ Office12 \\ excel.exe”);

I have tried System.Diagnostics.Process.Start not work from an IIS And does not helped me 我已经尝试过从IIS无法运行System.Diagnostics.Process.Start并且对我没有帮助

Thanks a lot 非常感谢

@Thomas is right. @托马斯是对的。 you shouldn't try to launch another process from an unmonitored process like w3wp.exe. 您不应尝试从不受监控的进程(如w3wp.exe)启动另一个进程。 This is against best practices. 这违反了最佳实践。

There are code samples available online which provide ways to read/write excel files. 在线提供了一些代码示例,这些示例提供了读取/写入excel文件的方法。

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

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