locked
Custom WebPart in SharePoint 2007 RRS feed

  • Question

  • Hi everyone, 

    I have a quick question in regards to custom webparts in SharePoint 2007. My team created a custom webpart on our development server. We moved the webpart from our development server to our production server by taking a copy of the .dll and putting that into the GAC on the production server and adding a line for it to the SafeControls in the web.config. 

    The webpart now works on the production server when we remote desktop into the machine and view the site containing the webpart. However, if we access the site from another computer the webpart shows an error saying that it cannot be found or is not safe. All the settings are exactly the same on both development and production. 

    Does anyone have an idea on why we would not be able to see the webpart when we access the site from another computer ? 

    Thanks in advance. 

     

     

    • Moved by Mike Walsh FIN Thursday, August 18, 2011 4:40 PM This isn't a customization q (From:SharePoint - Design and Customization (pre-SharePoint 2010))
    Thursday, August 18, 2011 2:58 PM

Answers

  • When you created the custom webpart did you create a .wsp file (or was one created for you in Visual Studio)?

    You can use the .wsp file and stsadm to deploy the solution into SharePoint.  I would think that this is a better way to get custom webparts installed into SharePoint. 

    You first have to add the solution and then deploy it

    stsadm -o addsolution -filename c:\Mysolution.wsp
    stsadm -o deploysolution -name Mysolution.wsp -local -allowGacDeployment -force -url http://MyServer:3333/

    By using the -allowGacDeployment will place the .dll into the GAC and make the solution global


    Rob C
    Thursday, August 18, 2011 5:31 PM