I followed the Instructions on MSDN and also this one here but unfortunately 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;

  • 4
    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" pastebin.com/W2qPyKSM 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("mysitesstage.itm-consulting.de")) big thanks though! – Peter Sep 16 '11 at 11:57
  • 3
    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
  • 1
    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 (wp.me/p17id5-1op) (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 clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.