Custom Webpart doesn't show up in Sharepoint 2010 after deploying from VS2010
-
Tuesday, November 02, 2010 11:36 AMI have created a visual webpart in VisualStudio 2010 as Farm Solution and after deploying the webpart doesnt show under Categories(Custom) when i click insert webpart
- Moved by Clayton Cobb - MVP Tuesday, November 02, 2010 1:15 PM Visual Studio question (From:SharePoint 2010 - Using SharePoint Designer, Infopath, and other customization)
All Replies
-
Tuesday, November 02, 2010 12:17 PM
-
Tuesday, November 02, 2010 12:45 PMWhat is meant by changing the Feature name, i dint get that
-
Tuesday, November 02, 2010 1:14 PM
I have created a visual webpart in VisualStudio 2010 as Farm Solution and after deploying the webpart doesnt show under Categories(Custom) when i click insert webpart
This is the SPD and InfoPath forum. Your question is regarding custom code in Visual Studio 2010, so I'm moving it to the Visual Studio 2010 forum.Did you activate the feature in your site collection?
SharePoint Architect || Microsoft MVP || My Blog
Planet Technologies || SharePoint Task Force -
Tuesday, November 02, 2010 2:07 PM
Have you checked in the elements.xml file the group is still set as how you wanted it to be named (within the "file" element)
<Property Name="Group" Value="<Custom group name>" />
Alternativly, within the webparts gallery have you changed/checked the group your webpart is set to within their?
Is it even listed in the webparts gallery, if not then you may wish to load the page http://<app>/_layouts/newdwp.aspx and select your new webpart to be added to the gallery.
Hope this helps
Thanks
Dean
-
Wednesday, November 03, 2010 4:26 AM
Hey Clayton, ya it is showing when i activated the webpart in site collection,
but when i add it, it is showing a error as
A web part or web form control on this page cannot be displayed or imprted. This type is not registerd as safe.
-
Wednesday, November 03, 2010 6:45 AM
Check the below posts it's taking about the same error you got.
http://store.bamboosolutions.com/kb/article.aspx?id=10006
Good Luck
Ahmed Naji SharePoint Geek
MCP|MCTS
My Blog | DotnetFinder -
Wednesday, November 03, 2010 9:11 AM
have you checked its marked as safe within the web.config file?
Thanks
-
Wednesday, November 03, 2010 9:23 AM
i could not find the web.config file
I have developed this webpart using VisualStudio 2010 and file->NewProject->Visual Webpart
i dont find any web.config file,
-
Wednesday, November 03, 2010 11:21 AM
If you have deployed using VS2010 then when creating the project initially, you would of been promted with a wizard asking what sharepoint app you wish to deploy too.
When you select deploy, an entry will auto be added to that applications web.config file to confirm that webpart as being safe to render.
If you have deployed manually, then you will need to add the below line to the applications web.config file found at the below location to allow this webpart to render.
Within the "Safecontrols" sections of web.config:
<SafeControl Assembly="<Assembly name>, Version=<assembly version>, Culture=neutral, PublicKeyToken=<assembly id if added to the GAC>" Namespace="<project namespace>" TypeName="*" Safe="True" SafeAgainstScript="False" />
Each web.config file can be found at the following location:
C:\inetpub\wwwroot\wss\VirtualDirectories\80 (80 being the application of which you want to deploy too)
even if you have deployed using VS2010 then you may want to check the config file to be sure all settings are ok.
I hope this helps,
Dean
-
Thursday, November 04, 2010 11:22 PM
- Marked As Answer by Aaron Han - MSFT Friday, November 12, 2010 1:24 AM

