IIS用户访问被拒绝为本地文件&用户计算机的文件夹 [英] IIS User access denied for local files & folder from User computer
问题描述
我已在iis上部署应用程序并从我的matchin访问应用程序并将文件和文件夹从我的matchin复制到wwwroot(IIS服务器)内的其他文件夹,但我无法做到这一点。请帮忙!!!
错误:
System.UnauthorizedAccessException:访问路径
'\ \ MyMatchinName \ C $ \ Users \ MyyserId \Desktop \ Project_Published'被拒绝。
在System.IO .__ Error.WinIOError(Int32 errorCode,String maybeFullPath)
在System.IO.FileSystemEnumerableIterator`1.CommonInit()
在System.IO.FileSystemEnumerableIterator`1..ctor
(String path,String originalUserPath,String searchPattern,SearchOption searchOption,SearchResultHandler`1
resultHandler,Boolean checkHost)at System.IO中的System.IO.Directory.InternalGetFileDirectoryNames
(String path,String userPathOriginal,String searchPattern,Boolean includeFiles,Boolean includeDirs,
SearchOption searchOption,Boolean checkHost)。 Directory.InternalGetDirectories在DeplloyedApps._Default.CopyAndPasteFromLocal上
(字符串路径,字符串searchPattern,SearchOption searchOption)
(String SourcePath,String DestinationPath)
I have deployed application on iis and access the application from my matchin and copy files & folder from my matchin to other folder inside wwwroot (IIS Server), But i am not able to do that. Please help !!!
Error:
System.UnauthorizedAccessException: Access to the path
'\\MyMatchinName\C$\Users\MyUserId\Desktop\Project_Published' is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileSystemEnumerableIterator`1.CommonInit()
at System.IO.FileSystemEnumerableIterator`1..ctor
(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler`1
resultHandler, Boolean checkHost) at System.IO.Directory.InternalGetFileDirectoryNames
(String path, String userPathOriginal, String searchPattern, Boolean includeFiles, Boolean includeDirs,
SearchOption searchOption, Boolean checkHost) at System.IO.Directory.InternalGetDirectories
(String path, String searchPattern, SearchOption searchOption) at DeplloyedApps._Default.CopyAndPasteFromLocal
(String SourcePath, String DestinationPath)
推荐答案
\ Users \ MyyserId \Desktop \ Project_Published'被拒绝。
在System.IO .__ Error.WinIOError(Int32 errorCode,String maybeFullPath)
在System.IO.FileSystemEnumerableIterator`1.CommonInit()
在System.IO.FileSystemEnumerableIterator`1..ctor
(String path,String originalUserPath,String searchPattern,SearchOption searchOption,SearchResultHandler`1
resultHandler,Boolean checkHost)at System.IO中的System.IO.Directory.InternalGetFileDirectoryNames
(String path,String userPathOriginal,String searchPattern,Boolean includeFiles,Boolean includeDirs,
SearchOption searchOption,Boolean checkHost)。 Directory.InternalGetDirectories
DeplloyedApps._Default.CopyAndPasteFromLocal上的
(字符串路径,字符串searchPattern,SearchOption searchOption)
(String SourcePath,String DestinationPath)
\Users\MyUserId\Desktop\Project_Published' is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileSystemEnumerableIterator`1.CommonInit()
at System.IO.FileSystemEnumerableIterator`1..ctor
(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler`1
resultHandler, Boolean checkHost) at System.IO.Directory.InternalGetFileDirectoryNames
(String path, String userPathOriginal, String searchPattern, Boolean includeFiles, Boolean includeDirs,
SearchOption searchOption, Boolean checkHost) at System.IO.Directory.InternalGetDirectories
(String path, String searchPattern, SearchOption searchOption) at DeplloyedApps._Default.CopyAndPasteFromLocal
(String SourcePath, String DestinationPath)
i会建议,
Hi,
i would suggest,
->Check the folder permissions to wwwroot whether IUSR, IIS_IUSRS etc are given if needed.
->check user application pool is running under which account.Give that account full permissions to your wwwroot folder.
希望这会有所帮助。
Hope this helps.
这篇关于IIS用户访问被拒绝为本地文件&用户计算机的文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!