EXE 文件的超链接
我创建了一个简单的 Windows .EXE,它将文件从目标计算机上的一个位置复制到另一个位置。
但是,在我正在测试的网站上,我创建了一个超链接:
<a href="CustomApp.exe">Here</a> is the download.
但是,当我单击该链接时,它会尝试启动 CustomApp.exe,这不是我想要发生的情况。我想提示接受用户文件,然后运行它。
这是我需要在 IIS 7 计算机上还是在我的 ASP.NET 页面中配置的内容吗?
I have created a simple windows .EXE that copies files from one location to another on a target computer.
However, on the website that I'm testing this on, I created a hyperlink:
<a href="CustomApp.exe">Here</a> is the download.
However, when I click on the link, it attempts to start CustomApp.exe which is not what I want to happen. I want to prompted to accept the user file, then run it.
Is this something I need to configure on an IIS 7 machine, or in my ASP.NET page?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这就是您的服务器为该 mime 类型提供服务的方式。可能需要进行不同的配置或使用 php/asp.net 页面提供下载并编辑标头。
asawyer 关于如何在 asp.net 中执行此操作的更多说明:
http://msdn.microsoft.com/en-我们/库/dhy78ycf(v=vs.71).aspx
It's the way your server serves that mime-type. Might have to configure it differently or serve the download using a php/asp.net page and edit the headers.
Some more explanation on how to do this in asp.net from asawyer:
http://msdn.microsoft.com/en-us/library/dhy78ycf(v=vs.71).aspx