Click here to Skip to main content
15,887,477 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
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)
Posted
Updated 9-Jul-15 8:34am
v2
Comments
ZurdoDev 9-Jul-15 14:45pm    
How can we help? You're permissions are not correct.
Pramod Singh (C) 10-Jul-15 12:42pm    
I have gave the all types of access but still not working,
1) Impersonate true
2) give the local matchin folder full access
3) Use window authentication enabled on IIS
but still not, please suggest what i forgotted...
ZurdoDev 10-Jul-15 13:37pm    
The user you are using for impersonation needs the permissions.
Pramod Singh (C) 10-Jul-15 23:01pm    
i have already enable impersonate on iis.
ZurdoDev 10-Jul-15 23:38pm    
The user you are using for impersonation needs the permissions.

1 solution

Hi,

i would suggest,

SQL
->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.
 
Share this answer
 
Comments
Pramod Singh (C) 13-Jul-15 10:51am    
I have already gave the window authentication enable & Impersonate Enables in the IIS server. But still not working.
I have also gave the IIS_IUSRS & Everyone Full permission on the Application folder which is deployed on the IIS.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900