New msi package error

Topics: User Forum
Jul 5, 2006 at 7:21 AM
Bil,

Downloaded the new release but all I'm getting is an error when I try to run it telling me that it can't be openned.

JS
Jul 5, 2006 at 7:38 AM
Try Downloading it again. I was able to download and run it. Although I am facing A Web part not safe error when I add it.
Jul 5, 2006 at 8:16 AM
OK, worked the second time.

Thanks
Jul 5, 2006 at 1:09 PM
i've installed it via the msi and also get a '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.' message.
Coordinator
Jul 5, 2006 at 2:09 PM
Like I mentioned, there was a problem with an earlier package of the MSI which has this error.

I did update it and tested it on a clean system so it is fixed. Unfortuntately it's hard to tell which release you have but the MSI should be 192,512 bytes in size (although I can't remember if the old one is the same).

If in doubt, try downloading it again (after 08:00 July 5, 2006 MST), removing the old one, and re-installing. When installing make sure you add the web part to the GAC. You'll also want to remove (manually) the old (v1.0) version.

I will double check that the current MSI works correctly as I could have screwed things up last night (I had to repackage the files twice, first because the resource path was missing and second because it wasn't reading the path correctly).

I'm fairly confident that the current MSI installs correctly, but again, I might be wrong.
Jul 5, 2006 at 2:14 PM
I'm getting the same problem and I just downloaded the MSI. It doesn't look like my web.config was modified with any SafeControl changes.
Coordinator
Jul 5, 2006 at 2:32 PM
Hmmm, something is rotten in Denmark. I just did a clean install on two machines and neither of them are allowing the web part to be added.

What's odd is that the SafeControl entries are there, the assemblies are in the GAC, and I'm as puzzled as everyone.

Will come back later to see if my brain can figure this out.
Jul 5, 2006 at 2:36 PM
Can you post the web.config SafeControl entries? I'll see if manually adding them does anything.
Coordinator
Jul 5, 2006 at 3:17 PM
Okay, problem solved. Stupid error that I should have realized.

When an assembly with SafeControl entries is installed in the GAC (like this version is) the DWP file requires that the <Assembly> tag is a fully qualified one (with the public key token, etc.). This is to distinguish it from other assemblies.

So to fix this:
1. Navigate to your wpcatalog folder under c:\inetpub\wwwroot (or wherever SharePoint is installed to)
2. Manually edit the BilSimser.SharePoint.WebParts.Forums*.dwp file
3. Change the <Assembly> tag to be:
<Assembly>BilSimser.SharePoint.WebParts.Forums, Version=1.1.0.0, Culture=neutral, PublicKeyToken=e516dadc23877c32</Asssembly>

Now you can import the web part onto a page from the virtual gallery.
Jul 5, 2006 at 3:39 PM
After performing this step, I get - The file you imported is not valid. Verify that the file is a Web Part description file (.dwp) and that it contains well-formed XML.

Coordinator
Jul 5, 2006 at 3:44 PM
Here's what the DWP should look like (in full):

<?xml version="1.0" encoding="utf-8"?>
<WebPart xmlns="http://schemas.microsoft.com/WebPart/v2" >
<Title>SharePoint Forums</Title>
<Description>Replacement for SharePoint Discussion Boards using threaded forums, categories, and more.</Description>
<Assembly>BilSimser.SharePoint.WebParts.Forums, Version=1.1.0.0, Culture=neutral, PublicKeyToken=e516dadc23877c32</Assembly>
<TypeName>BilSimser.SharePoint.WebParts.Forums.SharePointForumWebPart</TypeName>
<!-- Specify initial values for any additional base class or custom properties here. -->
<FrameType>None</FrameType>
</WebPart>

I'm just posting a new MSI in a few minutes.
Coordinator
Jul 5, 2006 at 3:46 PM
Okay, the updated MSI has been posted which contains the correct DWP entry. You can download it from the releases tab.
Jul 5, 2006 at 7:55 PM
Thanks.. Somebody owes you an alcoholic beverage or 2.

The webpart is working rather well.
Coordinator
Jul 5, 2006 at 7:58 PM
Oh thank the maker. After the last few hours and dozens of messages of "it doesn't work" I was beginning to wonder how much of an idiot I was.

Thanks.
Jul 6, 2006 at 11:24 AM
yey, this is working now, top banana!