Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/svg/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 从web中的物理路径打开文件_C#_Asp.net - Fatal编程技术网

C# 从web中的物理路径打开文件

C# 从web中的物理路径打开文件,c#,asp.net,C#,Asp.net,string ImageFilePath=“c:\picture\test.jpg”; System.Diagnostics.ProcessStartInfo procInfo=new System.Diagnostics.ProcessStartInfo(); procInfo.FileName=(“mspaint.exe”); procInfo.Arguments=ImageFilePath; 系统.诊断.过程.启动(procInfo) 这段代码在开发阶段可以工作,当我在web上部署它时,它

string ImageFilePath=“c:\picture\test.jpg”;
System.Diagnostics.ProcessStartInfo procInfo=new System.Diagnostics.ProcessStartInfo();
procInfo.FileName=(“mspaint.exe”);
procInfo.Arguments=ImageFilePath;
系统.诊断.过程.启动(procInfo)


这段代码在开发阶段可以工作,当我在web上部署它时,它不工作吗?请帮助我解决此问题。

首先,您应该使用相对路径,图片应该位于部署文件夹(应用程序所在的位置)中


第二,用户对C:\Picture有权限吗?

通常您不能在web上对客户端计算机运行代码。