【发布时间】:2014-08-02 10:42:25
【问题描述】:
我在ASP.NET 中有一个webpage。
我有一个使用C# 创建的.exe 应用程序。
首先,用户必须下载.exe 应用程序并将其复制到C:\。
我可以在网页上给出说明。
在网页中使用link,我需要打开那个特定的.exe 应用程序。
我尝试了以下 代码:
using System.Diagnostics;
......
......
......
ProcessStartInfo info = new ProcessStartInfo(@"C:\app.exe");
Process.Start(info);
这在本地运行良好,但是当我将其上传到webserver 时,我得到了以下Exception。
Exception Details: System.ComponentModel.Win32Exception: The system cannot find the file specified
然后我在Google 中搜索,发现iTunes 是如何从网站启动的。
喜欢以下链接。
Launches iTunes.exe from here
然后我尝试使用以下link打开iTunes。
<a href="itunes:///">Open iTunes</a>
它运行良好,但我对我的.exe 应用程序进行了同样的尝试,它没有打开,同时显示以下错误。
HTTP Error 400 - Bad Request.
任何人都可以指导我从我的webpage 打开我的.exe 应用程序。
如果.exe 在server 的Bin 文件夹中,那我该怎么办。
谢谢
【问题讨论】:
-
检查服务器上exe文件的路径
-
@L-Three:我读过这个。我也试过。只有从这个链接我才知道 iTunes。
-
@PeterJ app.exe 在本地系统中。