WebPartManager Import method

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



I am trying to import a webpart that has been developed as a standalone
project - single webpart class in an assembly.

I've read up on the web (Fredrik Normén's Blog etc) that it is possible to
import a web part by providing a .webpart file and having the assembly dll
copied to the /bin folder (or in the GAC).
This got me excited as it is just what I am after - delivering a portal
application and allowing others to develop and import their own webparts ....
I just cannot get the damn thing to work!! All I get is the error message I
specified in the .WebPart file out from the method call.

How can I debug what is going on here?

I've tried several things.

If I add the webpart class to the App_Code folder of the project I can use
the WebPartManager.AddWebPart method without a problem - but this is not what
I want, I need to be able to drop in assemblies and import the webparts
contained within.

I've tried stong naming the assembly, also putting it into the GAC.

Still does not work for me!?!!?!?

Please help!



--------------------------
Shaun Venus

emailid: sunevnuahs
domain: hotmail.com
--------------------------
.



Relevant Pages

  • Re: Including a custom web control - coming from a different assembly - in a web part
    ... Because by default Webpart is not full trusted(it is not in the GAC), ... As for building a customized policy file, ... need to set the WebControl and the other assemblies in GAC we may need to ...
    (microsoft.public.sharepoint.windowsservices)
  • Re: Including a custom web control - coming from a different assembly - in a web part
    ... > Because by default Webpart is not full trusted, ... > the assembly in the GAC is full trusted by CLR. ... other assemblies in the GAC because I was using a customized policy file ... If I just use the wss_mediumtrust.config file as policy file, ...
    (microsoft.public.sharepoint.windowsservices)
  • Re: Webpart installed on GAC gives error!
    ... only in some bin folders. ... > I have a problem of deploying the webpart treeview control on GAC. ... > to deploy the webpart treeview by placing the assemblies on Bin directory. ...
    (microsoft.public.sharepoint.portalserver.development)
  • Re: Webpart with external dll
    ... So your referenced DLL's are packaged in the CAB with the WebPart? ... part was referencing the GAC'd assemblies). ... >>> i am developing a webpart, and i'm using some dlls i created time ago. ...
    (microsoft.public.sharepoint.portalserver.development)
  • Re: Unable to access existing project assemblies using Custom Web Part
    ... I use some existing assemblies (added the details of the assemblies along ... WebApplication) in the webpart. ... to go through an authentication process. ... proxy to the remoting object. ...
    (microsoft.public.sharepoint.windowsservices)