Jul 19, 2011 at 11:41 AM
Edited Jul 19, 2011 at 7:43 PM
I'm having problems adding a very simple web part - created with SPSF - to a page. I get the (in)famous error:
"unable add selected web part
A Web Part or Web Form Control on this Page cannot be displayed or imported
The type could not be found or it is not registered as safe"
I created a SP2007 SPSF Application, then added the SharePoint WebPart artifact, then left it as it comes out from the template. I've also tried adding a simple Label during CreateChildControls.
I tried both with and then without Resources, and both with GAC and Bin deployment. Anyway with no luck.
I checked web.config and wss_custom_wss_minimaltrust: they seem to have the correct SafeControl and PermissionSet entries... and anyway they are generated by SPSF.
The SP 2007 server is remote, so the deploy process goes like this:
1. build solution in VS2010
2. get WSP from ...\ApplicationDeployment\Output\Debug\\\Solutions
3. copy WSP over SP server by remote desktop
4. run stsadm -o addsolution .... successfully
5. deploy solution from Admin portal in IE
6. activate feature on site collection from Site Settings in IE
7. preview the web part from the site web part gallery, or try to add it to a page
I basically did nothing on the Visual Studio/ SPSF side of things. Just left all as it is.
Is there anything you can suggest? Thanks all
EDIT: Note: The problem occurs when adding a SharePointWebPart artifact. It does NOT happen when adding an ASPNetWebPart artifact. Thus: changing item is fine for me, but maybe this could be an open issue for SPSF. Please let me know if
you need more info.