Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Web Part is not registered on this site as safe?

  Asked By: Tommie    Date: Oct 12    Category: Sharepoint    Views: 2181

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.

That is the error I get when I try to use simple chart web part from
this site

I followed the instructions and put the dll in the
c:\program....\60\BIN dir as well as edited the web.config file and added:

<SafeControl Assembly="ListCharts, Version=, Culture=neutral,
PublicKeyToken=ab88d84dcd5bf20e" Namespace="ListCharts"
TypeName="SimpleChart" Safe="True" />

There are other items in the instructions I did as well but for some
reason sharepoint says it isn't safe. Does anyone know why it is
doing this?



9 Answers Found

Answer #1    Answered By: Jasper Hatfield     Answered On: Oct 12

More likely, the dll  needs to go in c:\inetpub\wwwroot\bin, or the bin
folder in wherever your web  root folder is located.

Answer #2    Answered By: Rashawn Hopper     Answered On: Oct 12

That is probably it.

I don't have a BIN folder in the dir  of C:\Inetpub\wwwroot

Would I create a bin folder and place it in there?

Also what web.config file  am I supposed to edit? There is one at
C:\Inetpub\wwwroot but there is also one at c:\program....\60\CONFIG

Answer #3    Answered By: Horace Coffey     Answered On: Oct 12

You can create a BIN and wpcatalog folder,

And if u r fresh to sharepoint  you can put  your .dll file  in windows\assembly

Answer #4    Answered By: Rigoberto Beard     Answered On: Oct 12

Yes, you can go ahead and just create the bin folder, and the web.config should be the one at the wwwroot as well.

Answer #5    Answered By: Alphonso Mckay     Answered On: Oct 12

I can not get this to work and it is driving me crazy. I am going
to list what I have done and you guys point out maybe where I am
making the mistake.

1. Added this string to web.config located in

<SafeControl Assembly="ListCharts, Version=, Culture=neutral,
PublicKeyToken=ab88d84dcd5bf20e" Namespace="ListCharts"
TypeName="SimpleChart" Safe="True" />

<trustLevel name="WSS_Custom" policyFile="C:\Program Files\Common
Files\Microsoft Shared\Web Server
Extensions\60\config\wss_customtrust.config" />
<trustLevel name="WSS_Medium" policyFile="C:\Program Files\Common
Files\Microsoft Shared\Web Server
Extensions\60\config\wss_mediumtrust.config" />
<trustLevel name="WSS_Minimal" policyFile="C:\Program Files\Common
Files\Microsoft Shared\Web Server
Extensions\60\config\wss_minimaltrust.config" />

2. Created a new virtual directory called Charts that isn't managed by
Sharepoint. That is where the the charts and image maps are stored.

3. I have tried putting the dll  in the c:\inetpub\wwwroot\BIN as well
as the windows\assembly but I don't think the dll is even causing the
error at this point.

It still just says that the control  is not registered  on this site  as

Answer #6    Answered By: Daron Oneill     Answered On: Oct 12

See if this article helps … http://www.devx.com/webdev/Article/29352/0

Answer #7    Answered By: M Juarez     Answered On: Oct 12

I finially got this to work.

Used IntallAssemblies to install the assembly but the dwp it added
didn't have all the right information. I then took the original dwp
and copied the missing data into the dwp that was created during the
install of the assembly and now it seems as if it is working. The 3
day nightmare is hopefully over.

Answer #8    Answered By: Marty Mcdowell     Answered On: Oct 12

First make sure that your Namespace, Classname, Assemblyname, Version,
Culture, and PublicKeyToken are correct in all the right places. Rob
sums it up in his article:

Instead of using a custom policy config  file, Temporarily set your
<trust level="Full" /> (I'm typing that from memory) near the bottom of
your SharePoint web.config. Although unlikely to be the solution, this
will eliminate CAS trust as your issue.

You might try moving the image maps into your web  Part as resources. If
that worked, I would then try using an excluded managed path for the
image maps, and finally I would try an entirely different IIS Web Site.
There are lots of gotcha's when trying to cross virtual directory, and
web site  boundaries.

Perhaps you debug your project or remove pieces of your code until you
determine which line(s) are causing the abend and then post again.

Answer #9    Answered By: Dakota Shaffer     Answered On: Oct 12

Putting assemblies into the GAC should only be done when you have no
security concerns or you have no other option. The recommendation is to
put all Web Part DLLs into the bin and setup a custom policy config

Didn't find what you were looking for? Find more on Web Part is not registered on this site as safe? Or get search suggestion and latest updates.