SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I followed the Instructions on msdn and also this one here but unfortunatley nothing seems to work.

I've built a custom webpart and packaged it into a .wsp file since i'm trying to import this webpart onto another sharepoint instance i'm always getting "File not found" error on calling the site containing the webpart.

I added the .wsp via "Add-SPSolution" and installed it with "Install-SPSolution". I want to use it both on the regular Sharepoint and the mysites. Since we have two different urls for the standard sharepoint and mysites i deployed it on both.

After adding it to the GAC i made the safecontrols entry in the web.config file.

I can't find anymore hints or steps that i could have missed during the deployment..

web.config entry: <SafeControl Assembly="Beraterprofil, Version=, Culture=neutral, PublicKeyToken=a1202f7ace683fb7" Namespace="Beraterprofil.VisualWebPart1" TypeName="*" Safe="True"/>

I suppose the SP-Server can't find the .dll but i can't figure out why...

my references: using System; using System.ComponentModel; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using Microsoft.SharePoint; using Microsoft.SharePoint.WebControls; using Microsoft.SharePoint.Portal; using Microsoft.Office.Server.UserProfiles; using Microsoft.Office.Server;

share|improve this question
Check the ULS Trace logs for any errors, and then report back. – Wictor Wilen MCA MCM MVP Sep 16 '11 at 11:03
Here is a log view.. if i'm reading it right there seem to be existing references to my local sharepoint instance "itm-ps"; i first figured there might be some wrong informations in the manifest.xml or sth. like that but then i realized that i had the Server hardcoded in my webpart.. this should be helpful! any idea how it's possible to figure this out dynamically? using (SPSite site = new SPSite("")) big thanks though! – Peter Sep 16 '11 at 11:57
Use the SPContext.Current.Site to get the current site collection – David Lozzi Sep 16 '11 at 12:10
Do you have a code sample you can provide? – Tim Gabrhel Sep 16 '11 at 13:50
Side bar: Rather than having to manually add a safe controls entry (especially when you have multiple web front ends that you'd have to manually update), add a safe control entry within your solution. That way, when you deploy your WSP, SharePoint will handle adding the safe controls element to every WFE web.config. I have a blog post here ( (it's a wordpress shortened URL) that talks about another topic, but scroll down to the heading that says 'Empty SharePoint Element'. It shows you how to add one. – Tim Gabrhel Sep 16 '11 at 13:52

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.