I recently had this error:
A user had the rights to edit a page, and to select edit webpart for a smartpart. When the edit webpart panel showed up the following error where shown:
"Cocould not open user control path: System. unauthorizedAccessException: Access to the path 'C: \ Inetpub \ wwwroot \ wss \ VirtualDirectories \ 80 \ UserControls 'is denied. at System. IO. _ Error. winIOError (Int32 errorCode, String maybeFullPath) at System. IO. directory. internalGetFileDirectoryNames (String path, String userPathOriginal, String searchPattern, Boolean includeFiles, Boolean includeDirs, SearchOption searchOption) at System. IO. directory. getFiles (String path, String searchPattern, SearchOption searchOption) at System. IO. directory. getFiles (String path) at SmartPart. userControlToolpart. renderToolPart (HtmlTextWriter output )"
After having tried out a few different solutons I found out that it cocould be solved simply by changing the securitysettings on the folder: 'C: \ Inetpub \ wwwroot \ wss \ VirtualDirectories \ 80 \ UserControls'
- Right click on the folder and select properties
- Select the Security panel
- Click add
- Type "everyone" and click OK
- Make sure that read is allowed
Quick and dirty