I am working on visual web parts. I created a sharepoint project in VS2010 and added one visual web part to it.Built this and deployed.I am able to see the web part added and I can drag that to any page on site.
Now I created a new solution redirecting to same site (site to which first solution was pointing). Added one visual web part to it.Built this and deployed too.now when I see the site though I can add this new webpart to the page but the webpart added from previous solution are throwing error.
Web Part Error: A Web Part or Web Form Control on this Page cannot be displayed or imported. The type TestWebPart1.Testwebpart.Testwebpart, TestWebPart1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=02dc69d4b9065085 could not be found or it is not registered as safe.
Looks Like I can not work with more than one solution for a single site. May I get the reason for this?
This usually means your webparts assembly isn’t registered among the safecontrols in the sharepoint web.config OR that you didn’t create a strongly typed assembly
To register in safecontrols
To fix open your web.config located in the iis root site of your sharepoint server, usual path is something like
Add the following in the <SafeControls> section
Signing assemblies
http://msdn.microsoft.com/en-us/library/ms247123(v=vs.80).aspx