![](/img/trans.png)
[英]Web API application restricts to access the files from local physical path
[英]Open a file from physical path from web
string ImageFilePath = "c:\\picture\\test.jpg"; System.Diagnostics.ProcessStartInfo procInfo = new System.Diagnostics.ProcessStartInfo(); procInfo.FileName = ("mspaint.exe"); procInfo.Arguments = ImageFilePath; System.Diagnostics.Process.Start(procInfo);
此代碼在開發時有效,當我將其部署在Web中時,它不起作用嗎? 請幫助我解決此問題。
首先,您應該使用相對路徑,並且圖片應位於部署文件夾(托管應用程序的位置)中。
其次,用戶是否具有C:\\ Picture的權限?
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.