0
在我的SharePoint應用程序頁面,我試圖將文件從網絡共享文件夾複製。而我的代碼的下面一樣..遠程文件從SharePoint應用程序訪問頁面
try
{
File.Copy("\\MShare\Public\Test.txt", "C:\Temp\Test.txt", true);
LblMessage.Text = "File copied.";
}
catch (Exception ex)
{
LblMessage.Text = ex.ToString() + " - " + ex.Message;
}
,如果我它的工作好測試在ASP.NET網站相同的代碼。但我收到提示與SP應用程序頁面遵循..
System.UnauthorizedAccessException: Access to the path '\\MShare\Public\Test.txt' is denied. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.File.InternalCopy(String sourceFileName, String destFileName, Boolean overwrite) at System.IO.File.Copy(String sourceFileName, String destFileName, Boolean overwrite) at TestApp.PullingFile.ButGet_Click(Object sender, EventArgs e) - Access to the path '\\MShare\Public\Test.txt' is denied.
我試着按照this後..不..工作和 實現模擬我嘗試通過更改web.config與<trust level="WSS_Medium" originUrl="" />
也.. ..