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上对客户端计算机运行代码。