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.

Topics: User Forum
Jun 26, 2006 at 5:43 AM
Well, I've googled this and searched these forums without much luck. Alas, I've followed the installation procedure as closely as I could and checked everything and still, all I get is this message when I try and add a Sharepoint Forums webpart. So, in the hope of some useful aid here, here's what I have done (I followed all steps between attempts to use the web part but present my configuration step by step):

1) I have registered BilSimser.SharePoint.Common with gacutil. gacutil /l reveals that it's there and has (worryingly, because it's different to later steps) the following properties:
BilSimser.SharePoint.Common, Version=1.0.0.0, Culture=neutral, PublicKeyToken=24713753211b034a

Continued in a reply due to 2000 character limit on post …
Jun 26, 2006 at 5:44 AM
2) This step is ambiguous. To begin with there are three web sites in the IIS services plugin. They are:

Default Web Site
Sharepoint Central Administration
Team Foundation Server

I presume the latter two are irrelevant, but am concerned particularly about the last as it's a Team Foundation Server Project Portal I'm attempting to upgrade. But focussing on the first, under properties I can see it's home directory is:

c:\inetpub\wwwroot

So I copied:

BilSimser.SharePoint.WebParts.Forums.Core.dll
BilSimser.SharePoint.WebParts.Forums.dll

to this folder. As a second try after everything failed, and searching these forumsf or advice, I tried (at someone's apparent suggestion) moving them to:

c:\inetpub\wwwroot\bin

though am dubious and nuclear of why. It seems we're trying to put them somewhere that IIS will look for dlls. The problem I have is:
a) I don't know where it looks or how to divine where it looks and
b) this folder didn't exist, I had to create it (the bin folder that is).

either way I tried two scenarios, with the dlls in wwwroot and with them in wwwrrot\bin with a iisrestart before each attempt to use the web part. Both failed with the error message cited in the subject.

Continued in a reply due to 2000 character limit on post …
Jun 26, 2006 at 5:44 AM
3) I added as requested, these lines:

<SafeControl Assembly="BilSimser.SharePoint.WebParts.Forums, Version=1.0.0.0, Culture=neutral, PublicKeyToken=e516dadc23877c32" Namespace="BilSimser.SharePoint.WebParts.Forums.Controls" TypeName="*" Safe="True" />
<SafeControl Assembly="BilSimser.SharePoint.WebParts.Forums, Version=1.0.0.0, Culture=neutral, PublicKeyToken=e516dadc23877c32" Namespace="BilSimser.SharePoint.WebParts.Forums" TypeName="*" Safe="True" />
<SafeControl Assembly="BilSimser.SharePoint.WebParts.Forums, Version=1.0.0.0, Culture=neutral, PublicKeyToken=e516dadc23877c32" Namespace="BilSimser.SharePoint.WebParts.Forums.Controls.Common" TypeName="*" Safe="True" />
<SafeControl Assembly="BilSimser.SharePoint.WebParts.Forums, Version=1.0.0.0, Culture=neutral, PublicKeyToken=e516dadc23877c32" Namespace="BilSimser.SharePoint.WebParts.Forums.Controls.Base" TypeName="*" Safe="True" />

to the web.config file in c:\inetpub\wwwroot.

I have a profound concern here that these lines refer to the PublicKeyToken=e516dadc23877c32 whereas gacutil reports that the PublicKeyToken=24713753211b034a.

So I tried modifying the four lines above with the other public key token, but also to now avail. Restarted IIS and still the same error message.

Continued in a reply due to 2000 character limit on post …
Jun 26, 2006 at 5:45 AM
4) I added to the web.config file above:

<trustLevel name="WSSCustom" policyFile="C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\60\config\wsscustomtrust.config" />

I created the referred to file as instructed on the web installation page:

http://www.codeplex.com/Wiki/View.aspx?ProjectName=SPFORUMS&title=Step%204

but am puzzled by this comment:

Note: Your trust level might be set to Full or something else.

which I don't understand. I have certainly done everything as instructed having checked twice but am also concerned that these CodeGroup refer to PermissionSetName="FullTrust" which seems to relate to that comment.

Continued in a reply due to 2000 character limit on post …
Jun 26, 2006 at 5:46 AM
5, 6 and 7) Are all trivial steps.

What is wrong? It all seems to be in order but I have concerns especially around where the dll files should be copied and why, and what the Full trust level comment means.

Any help to get me rolling would be appreciated and I'll strongly recommend that a setup.exe be put together which makes the required changes as this process is so fiddly and apparently error prone it won't last ;-). Of course I'm sure that's on the agenda.

I hope I can get this working and express my deepest gratitude to Bil for offering it as it would seem to fill the niche at our end perfectly.

Cheers,

Bernd.

Finished at last (whoever thought of a 2000 word limit for conveying the details of a probel to empower any would be helper to lend meaningful advice without an endless round of questions about what I'd done? Suggest you up it.)
Coordinator
Jun 26, 2006 at 3:11 PM
Okay, there are a whack of posts here and I'll try to summarize problems with your install as best I can (quoting isn't avaiable on CodePlex so it's hard to reference topics).

2) This step is ambiguous. To begin with there are three web sites in the IIS services plugin.

You mentioned this is a TFS server so are you trying to install the forums on TFS (untested and not sure if it would work due to the way TFS modifies WSS). If it's just a WSS site, it will be running under the Default Web Site.

You mentioned copying the dlls to the wwwroot folder, however .NET assemblies have to be added to the "bin" directory. If you've never installed a 3rd party web part, this folder might not exist so create it first.

The gacutil public key is for the common dll, and it will report a different public key blob. The safecontrol entries is keyed to the assembly names so the ones that are listed for each assembly is what's used (again, if you've never installed a web part this won't make much sense).

The steps are not trivial or unnecessary. It may be confusing, especially to anyone who's never a) installed a web part or b) configured a custom policy. I am trying to fix this for an updated install, but there are some steps that have to be manual due to the number of moving parts that SharePoint has to manage (and can't on an install say from a .cab file).

In any case, please email (bsimser@shaw.ca) the following files:

web.config (from c:\inetpub\wwwroot)
wsscustomtrust.config (from your 60 hive)

I'll take a look and see what the issue might be. Hopefully we can get this fixed up for you asap.

Thanks.
Jun 26, 2006 at 3:55 PM
I have done the Forums Web Part install twice now and discovered both times that all 3 of the .dll files need to be added to the GAC. If you follow Bil's directions to the tee and then add the other 2 .dll's to the GAC you should be just fine. This rookie can't expain why but works for me.

Awesome webpart Bil!!

Jim
Coordinator
Jun 26, 2006 at 7:54 PM
Hi Jim,

The other 2 dlls really don't need to be added to the GAC. Assemblies in the GAC assume full trust which does get past issues, but also creates others (and most admins are picky about what goes in the GAC).

It still sounds like something in the configuration isn't being followed (or isn't correctly documented) with regards to the custom policy file.

In any case, I'm glad you got it going but it would be better to not have it in the GAC.
Oct 8, 2007 at 9:26 AM
Where exactly are BilSimser.SharePoint.WebParts.Forums.Core.dll and BilSimser.SharePoint.WebParts.Forums.dll located? I cant find those files anywhere.

~J


bsimser wrote:
Hi Jim,

The other 2 dlls really don't need to be added to the GAC. Assemblies in the GAC assume full trust which does get past issues, but also creates others (and most admins are picky about what goes in the GAC).

It still sounds like something in the configuration isn't being followed (or isn't correctly documented) with regards to the custom policy file.

In any case, I'm glad you got it going but it would be better to not have it in the GAC.

Oct 15, 2007 at 6:37 PM
Hi bsimer,
I am also facing trouble to locate the DLL's named BilSimser.SharePoint.Common.Service,BilSimser.SharePoint.WebParts.Forums.Controls
Where can I get these Dll's so that SharePointForum.WebPart can be Build

I have verified under all the directories of the downloaded code 'SharePointForums-11.2.0.0-Source'
Are we(Gibbs and my self) missing anything after New Version of Visual studio 2005 converting soultions to open those in VS2005 ???
or is there any specific steps of compling this project?
I didn't found any way of generating the BilSimser.SharePoint: dll from the given code for Forum webPart
pls could you tel us where can I find this referenced dll's (using BilSimser.SharePoint;)
Thanks In Advance
Apr 4, 2008 at 9:02 AM
Edited Apr 4, 2008 at 9:03 AM
Is anybody alive here?

I have the same problem as Gibbs has: I cannot find BilSimser.SharePoint.WebParts.Forums.Core.dll

I've found BilSimser.SharePoint.WebParts.Forums.dll at SharePointForums-1.2.0.0_Bil Simser.cab file, but where is the first dll?

Jul 22, 2008 at 6:06 AM
Edited Jul 22, 2008 at 8:36 AM
Hi bsimer,

first of all thanks for the nice posts that you provided.

but I did not understand the steps provided for SPForum

 

Would you please send the steps step by step with / without a screen shots will be appreciated,<?xml:namespace prefix = o />

Can you tell me what is the mean of GAC.

 

What I have done exactly I installed the zip file “SharePointForums-1[1].2.0.0-Source.zip

Then I unzip it on the server, it shows three file

First one: SharePointForums-1[1].2.0.0.msi

Second one:  DrinkMe.txt

Third one:  SharePointForums-1[1].2.0.0-Source folder

Also I don’t have the old version of the forum.

All what I have done only run the msi file then I added the following code in web.config

<runtime>

<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">

<dependentAssembly>

<assemblyIdentity name="BilSimser.SharePoint.WebParts.Forums" publicKeyToken="e516dadc23877c32" />

<bindingRedirect oldVersion="1.1.0.0" newVersion="1.2.0.0" />

</dependentAssembly>
</assemblyBinding>

</runtime>

 

To be honest I got confused.

 

Can you also tell me what is the use of SharePointForums-1[1].2.0.0-Source folder.

 

So please help me and send me the all steps solution on my email: kamal.m.ayoub@gmail.com

 

Thanks in advance for your kind cooperation.

 

Regards,

Kamal