Re: Exporting & Installing WebParts

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Daniel Neilsen (dneilsen.REMOVE_at_THIS.davislangdon.com.au)
Date: 03/17/04


Date: Wed, 17 Mar 2004 16:16:18 +1000

I got one working ok early on, but now I cannot seem to get any more
working.

These are the steps I am following.
1) Compile assembly with strong name
2) Put assemply in GAC to get public key token and then remove
3) Enter public key token into dwp file
4) Compile assembly into cab file (with manifest.xml and dwp file)
5) Install cab with
stsadm.exe -o addwppack -filename myWebPart.CAB -globalinstall -force

Now this installs the assembly into the gac and sets up the web.config file
correctly and the webpart shows up in the Virtual Server Gallery. I try and
add it to a portal and I get the message "A Web Part or Web Form Control on
this Web Part Page cannot be displayed or imported because it is not
registered on this site as safe."

I am obviously doing something wrong but I cant see what it is. I have been
reading heaps of docs on this and it seems I am doing it correctly. Any
help would be appreciated.

"Kevin Spencer" <kevin@takempis.com> wrote in message
news:uiU$AO2CEHA.2824@TK2MSFTNGP12.phx.gbl...
> You have a couple of issues here. First, a WebPart consists of 2 "parts" -
> the assemby (DLL) and the .dwp file. The assembly must reside on the
server,
> either in the \bin folder of your web application or in the GAC. In
addition
> to registering it as a SafeControl, it must be Trusted. If it is in the
GAC,
> it is automatically given Full Trust. If it is in the \bin folder, you
must
> edit the web.config file to grant Trust to the assembly. See the SPS 2003
> SDK for complete instructions regarding editing the web.config file,
> creating custom Trust files, etc, for this aspect.
>
> --
> HTH,
> Kevin Spencer
> .Net Developer
> Microsoft MVP
> Big things are made up
> of lots of little things.
>
> "Daniel Neilsen" <dneilsen.REMOVE@THIS.davislangdon.com.au> wrote in
message
> news:uKzFgauCEHA.596@TK2MSFTNGP12.phx.gbl...
> > I have the situation where I am attempting to create Sharepoint webparts
> on
> > a win2k machine which is in a separate location (5000km away) from our
> > sharepoint server.
> >
> > I have followed two tutorials which seem to compile the webparts ok but
> > thats as far as I get. Both times I have followed the tutorial
> instructions
> > and neither webpart works.
> >
> > I have been following this procedure:
> > - Edit web.config file to include safecontrol detail
> > - Import dwp file into sharepoint portal.
> > - Attempt to add file to sharepoint page and I get an error "A Web Part
or
> > Web Form Control on this Web Part Page cannot be displayed or imported
> > because it is not registered on this site as safe."
> >
> > Obviously something I am doing is not right. I suspect it has something
> to
> > do with the export location. ie. The dll needs to be put somewhere on
the
> > server, right?
> >
> > Thanks in advance
> > Daniel Neilsen
> >
> >
>
>



Relevant Pages

  • RE: Infragistics WebPart
    ... It should work if your assembly is strong named and not in the gac. ... also require a higher trust level-- see if it runs in full trust (set the ... > I am trying to create a webpart using the Infragistics UltraWebTree control.. ... > It doesnt work if i I dont place the .dll in teh GAC. ...
    (microsoft.public.sharepoint.portalserver.development)
  • Cant get a 3rd praty WebPart to be safe
    ... Did you drop the assembly in the GAC on the portal ... Did the webpart come as a CAB file? ... >I've having a problem getting my Sharepoint 2003 server ...
    (microsoft.public.sharepoint.portalserver.development)
  • Re: Trust requirements for TS License Server in a different domain
    ... Licensing Server needs to trust the domain containing the Terminal ... only thinking about the Terminal Server and the TS Licensing ... have to be in trust relationship with License Server Domain ...
    (microsoft.public.windows.terminal_services)
  • Re: Not able to establish trust with another window 2003 domain
    ... The time of the two server is the same. ... MVP - Directory Services ... I had follow exactly the same that stated in your article but still fail. ... I try to remove the trust that created at my Source and re-create again. ...
    (microsoft.public.windows.server.active_directory)
  • Re: OLAP and VPN / authentication / trust
    ... You need Network 2 to trust Network 1 users to access the resources on ... This is the essence of a "Trust Relationship". ... attempt to connect to a SQL server on Network2 using credentials like ...
    (microsoft.public.sqlserver.olap)