Problem updating web parts (Best practice?)

From: JeyLey (JeyLey_at_nospam.nospam)
Date: 12/08/04


Date: Wed, 8 Dec 2004 05:59:03 -0800

Hi All
This was originally posted in microsoft.public.sharepoint.windowsservices,
but is now transferred here. See below for the orignal thread.

When we compile the web part on different machines then they get different
PublicKeyToken. I think this is what causing the problem when updating web
parts.
Can't we use Strong Named in this scenario? Any suggestion?

We are running Full Trust, and using Virtual Server Gallery. The DLL are
stored in the \bin-folder and not in the GAC. For installing we use stsadm -o
addwppack

--JeyLey

Old thread:
********
We are running SPS 2003 and experience problems when updating web parts
(after bug fixes). The problem is that we get the message ”Not safe….” after
updating (If the web part is used on a site it does not display anymore).

Here’s how we update:
1. We do the bug fixes
2. Compile the web parts with SNK (Strong Name Key)
3. All Web Parts are compiled into a CAB-file
4. We uninstall the web parts on the front end server using the STSADM tool
5. We install the newly compiled web parts on the front end server using
the STSADM tool

This work when we always use the same machine and user to compile the web
parts. If we use another user then the web parts will not be updated. Instead
they show up as new web parts.

What are we doing wrong?

--JeyLey

Hi JeyLey,

"get the message ”Not safe��after updating"
For this error message, I'd suggest you can check whether the safe control
entry has been added into the SPS portal site web.config. It should be as
below for one strong-named assembly: [As you have strong-named the assembly
which should be deployed into the GAC (global assembly cache).]
<SafeControl Assembly="Microsoft.SharePoint, Version=11.0.0.0,
Culture=neutral, PublicKeyToken=71e9bce111e9429c"
Namespace="Microsoft.SharePoint" TypeName="*" Safe="True" />

Furthermore, then you can check which security policy your SPS site are
using now. You can configure it to Full for the troubleshooting to see
whether the error message will disappear.
<trust level="Full" originUrl="" />

Then, you can check which web part gallery you are deploying the part into.
I'd suggest you can deploy the part into the Virtual Server Gallery which
exposes the part to all site at one vritual server.

Another way for the delopment, you can test the utility InstallAssemblies
which is one automatic deployment tool. You can use this to deploy your
part to see whether this error message will be raised.
http://www.microsoft.com/sharepoint/downloads/components/detail.asp?a=431

Expect your reply.

Best Regards,
Wei-Dong XU (WD.XU)
Microsoft Product Support Services
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights



Relevant Pages

  • Problem updating web parts (Best practice?)
    ... below for original thread. ... machines then the PublicKeyToken is different. ... This work when we always use the same machine and user to compile the web ... For this error message, I'd suggest you can check whether the safe control ...
    (microsoft.public.sharepoint.portalserver.development)
  • Re: [SLE] Please! I could use some help!
    ... I don't know what SuSE distribution you are running -- I came in late on ... "NULL" error message ... to ensure he was getting a working installation. ... and do some simple compile development exercises until you gain the ...
    (SuSE)
  • Re: Error exiting database
    ... without error if you choose 'Compile ' form the Debug ... > The Load Event looks like this but I don't understand why it would fire ... >> The error message, though, indicates that the problem is in the Load ... >> GlobalSign digital certificate is a forgery and should be deleted without ...
    (microsoft.public.access.formscoding)
  • Re: using #ifndef
    ... > gone to the newsgroup as well. ... that was ERT's fault for sending his response both by ... but nothing that anyone else could actually compile. ... cut-and-paste the actual error message. ...
    (comp.lang.c)
  • Re: Make Exe problem
    ... When compiling an ActiveX component with binary compatibility set to the ... LINK fatal error LNK1104 cannot open file. ... Set binary compatibility to the copied file, and compile ... If you click "Yes," the following error message appears: ...
    (microsoft.public.vb.bugs)