Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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=1.0.0.0, 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
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
add comment

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.