Re: Exporting & Installing WebParts
From: Daniel Neilsen (dneilsen.REMOVE_at_THIS.davislangdon.com.au)
Date: 03/17/04
- Next message: Sonal: "RE: Adding document Metadata"
- Previous message: KL: "Search Problems"
- In reply to: Kevin Spencer: "Re: Exporting & Installing WebParts"
- Next in thread: Bryant Likes: "Re: Exporting & Installing WebParts"
- Reply: Bryant Likes: "Re: Exporting & Installing WebParts"
- Messages sorted by: [ date ] [ thread ]
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
> >
> >
>
>
- Next message: Sonal: "RE: Adding document Metadata"
- Previous message: KL: "Search Problems"
- In reply to: Kevin Spencer: "Re: Exporting & Installing WebParts"
- Next in thread: Bryant Likes: "Re: Exporting & Installing WebParts"
- Reply: Bryant Likes: "Re: Exporting & Installing WebParts"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|