Cannot access user control in sharepoint.
I have created web application http://spserver:19578 and extend a web application http://spserver:19579. I extended web applicaition i am using form based authentication.
in extended application when i click on open the tool pane for the smart part it is giving me following. i get the following error.
"Could not open user control path: System.UnauthorizedAccessException: Access to the path 'C:\Inetpub\wwwroot\wss\VirtualDirectories\19579\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)"
Please tell me what is the error?
June 7th, 2010 12:38pm
The error it seems permission related. Could you check log?
What you were trying to do? are you adding usercontrol in webpart?
If yes, then refer below link how to do this.
http://www.codeproject.com/KB/sharepoint/wbparts.aspx
http://www.codeproject.com/KB/sharepoint/WebParticles.aspx
Thanks & Regards, Neerubee
Free Windows Admin Tool Kit Click here and download it now
June 7th, 2010 1:05pm
when i am trying the same method in http://spserver:19578 work is fine but the error occur in the extended web application. i have not any problem by adding user controls to my site.
June 7th, 2010 1:11pm
Dont add the user control at intepub folder "permission problem to folder" add ascx files on "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\CONTROLTEMPLATES"
After adding the user control to this folder with special permissions you can use on code the follow reference to ascx:
"usercontrol= Page.LoadControl("~/_controltemplates/file.ascx"); "Andr Lage Microsoft SharePoint, CRM and Sybase Consultant
Blog:http://aaclage.blogspot.com
Codeplex:http://spupload.codeplex.com/http://simplecamlsearch.codeplex.com/
Free Windows Admin Tool Kit Click here and download it now
June 7th, 2010 2:27pm
Put your user controls in \12\TEMPLATE\CONTROLTEMPLATES folder and in Custom webpart you just load that control. Don't create in Inetpub folders(it is virtual folder specific).
Please follow below link
http://www.codeproject.com/KB/sharepoint/wbparts.aspx
Thanks & Regards, Neerubee
June 8th, 2010 7:36am


