Cannot find Path

Feb 4, 2009 at 1:24 PM
Hi everyone,

I have installed SmartPart v1.3 and have followed the installation steps in the video. But when I go to edit the webpart in edit mode, I get the following error:

Could not open user control path: System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Inetpub\wwwroot\wss\VirtualDirectories\80\UserControls'. 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)

Could someone plz guide me on how to solve this.


Feb 13, 2009 at 11:32 PM
I am getting this same error.  Has anyone been able to come up with a solution?
Feb 25, 2009 at 3:10 PM
I am getting the same error as well.  I believe it is a permission issue with the account adding the SmartPart.  I am able to do this fine logging in as the Sharepoint admin but owners of a site cannot do this.
Feb 25, 2009 at 6:13 PM
I believe I might have found a solution for this issue however I am wondering if this is the way the Smart Part was designed and if there are security implications to this fix.

Here is what I know:
Adding the folder usercontrols under C:\Inetpub\wwwroot\wss\VirtualDirectories\80 will end up with these permissions in a default Sharepoint install:
- SYSTEM - Full control
- Administrators (Server\administrators)- Full Control
- WSS_Admin_WPG - Full Control
- WSS_WPG - (Read, Execute, List)

WSS_ADMIN_WPG contains Builtin\Administrators, NETWORK SERVICE, and Sharepoint Farm admins

I know that people contained in the WSS_ADMIN_WPG can add the smartpart to this page without this error.
Normal owers of the site cannot.

There are two ways I can make a security change to allow this:
Less secure way: Add users that need to add the smart part web part to the WSS_WPG group on the server.
More secure way: Add uesrs directly to the usercontrols Folder or a new group to the usercontrols folder with only (Read, Execute, List)

I say the second way is more secure since you are not giving more user access to the WSS_WPG that most likely has permissions elsewhere.

So I am wondering.  I have not seen this as a requirement in the installation instructions.  What security issues might this cause and why does this change allow this smartpart to work?

I hope this is helpful to some and helps answer some questions.  i have seen this issue frequently on other forums as well.
Jul 27, 2009 at 4:48 PM

Eventually, we solved the problem.  We were working on a server farm, so the usercontrols folder had to be placed on each server.