从asp.net网站的跨平台和浏览器中打开文件夹视图 [英] Open folder view from asp.net website cross platforms and browser

查看:211
本文介绍了从asp.net网站的跨平台和浏览器中打开文件夹视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

工作的一个网站解决方案,并需要给本地计算机上的不同文件夹的用户的链接。 (打开资源管理器文件查看)

Working on a website solution and need to give user links for different folders on local computer. (Open explorer fileview)

我曾两种方式。

1)简单的链接寻找somting是这样的:

1) Simple link looking somting like this:

<a href="file:///H:/THEFOLDERTOOPEN/" target="_blank">Link</a>

在IE,但没有其他的浏览器。

Works in IE but no other browsers.

2)用于:System.Diagnostics程序

2) Used: System.Diagnostics

Process.Start(@"file:///" + THEFOLDERTOOPEN);

这可以跨本地机器上工作的浏览器。但随着HTTP使用的时候://我得到错误:

This works across browsers working on local machine. But when using with http:// I am getting error:

Exception: System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified

如何解决这个问题?
在此先感谢

How to solve this issue?? Thanks in advance

推荐答案

的Process.Start 运行在您的本地计算机上的进程(例如一个程序或打开某个文件夹Windows资源管理器)。它不能与HTTP的使用。你所试图实现实际上是不可能没有使用Silverlight,Flash或任何其他第三方技术。你不能简单的从HTTP访问文件系统。

Process.Start Runs a process on your local computer (for example a program or opening a folder in windows explorer). It cannot be used with HTTP. What you are trying to achieve is actually not possible without using of Silverlight, Flash or any other Third Party Technology. You cannot simply access the file system from HTTP.

这篇关于从asp.net网站的跨平台和浏览器中打开文件夹视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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