0
votes

I have been stuck on this error and am unable to solve it since the past few days. I have googled all I could, but none of the solutions seems to work for me. I'll go through all the steps I've done and hopefully, someone might be able to catch a mistake. Also, I've been developing with SharePoint for quite a while now, but still a beginner in some parts.

I have created my site in my SharePoint and created a new Site Collection for it. I deployed my web part with the following command in powershell:

Update-SPSolution -Identity xxxxx.wsp -GACDeployment -LiteralPath "C:\Users\username\Desktop\xxxxx.wsp"

I then go to my created my site and add the web part. Which alerts me with the following message.

I tried many solutions including,

  1. I checked if my Web part is declared as Safe in the web.config or my root site. It looks like this:

<SafeControl Assembly="xxxxx, Version=1.0.0.0, Culture=neutral, PublicKeyToken=4a87d6fcb45f5672" Namespace="xxxxx.xxx" TypeName="*" Safe="True" SafeAgainstScript="False" />

  1. My class name SharePointProject1.WebPartName is declared as public.
  2. I've deployed the web part to the GAC by using -GACDeployment
  3. The namespace name is same as it is defined in my project.

I also checked my Application Logs in the Event Viewer, but there are no errors mentioned there as well.

After all this, I have a feeling maybe it might be a problem with my User Profile Service creation, though I'm not very familiar with this side of SharePoint.

I followed these two tutorials to create a User Profile Service & the My Site: http://sharepointgeorge.com/2010/configuring-the-user-profile-service-in-sharepoint-2010/ http://www.boostsolutions.com/blog/how-to-create-configure-my-sites-in-sharepoint-2010/

1

1 Answers

0
votes

I think the steps you have taken is proper and it should work. Cna you try one more thing. Can you just go and remove that * sign for the TypeName ?

  1. Go to your project and then in Package.package
  2. Go to Advanced tab,and click on Add to Add Existing Assembly
  3. Click on ... in source path and select your project dll file
  4. Select Deployment target as Gobal assembly cache
  5. Under Safe Control Section, Give a NameSpace for the assembly and under Assembly give a full dll name

Then try to deploy again

Let me know the result.

Edit:
As per Comments Use this command to deploy the solution "stsadm -o deploysolution -name xxxxx.wsp -immediate -allowGacDeployment -force -allcontenturls"