SmartPart with Ajax (only) Not Registered As Safe

Jul 20, 2009 at 3:12 PM

Hi:

I have downloaded and installed Return of SmartPart v 1.3 in my MOSS 2007 environment. I went through the automatic install and I found that it did not add a safecontrol entry pointing to the ReturnofSmartPart dll in the GAC. Additionally I didn't see anything in the manual configuration section, either, but after searching on the Web I found the entry and was able to successfully add a Smart Part Web part to my page. I have gotten a user control file to work as well.

<SafeControl Assembly="ReturnOfSmartPart, Version=1.3.0.0, Culture=neutral, PublicKeyToken=9f4da00116c38ec5" Namespace="SmartPart" TypeName="SmartPart" Safe="True" />

Whenever I try to ADD the SmartPart for Ajax Web Part to my SharePoint site I receive the following pop-up dialog:

Unable to add selected web part(s)

    SmartPart: A Web Part or Web Form Control on this Page cannot be displayed or imported.  The type is not registered as safe.

Again, this is only for the one with Ajax. I have added all of the Ajax control entries in the documentation but cannot figure out what the problem might be. Any help is appreciated. Thanks!

Apr 30, 2010 at 9:29 PM

I'm running into the same issue with the "type is not registered as safe."  I'll post here if I find a solution.

Apr 30, 2010 at 9:32 PM

I found, BTW, that I culd use the non-ajax smart part and put ajax controls in the regular smart part Web part.

Apr 30, 2010 at 9:37 PM

Well, that's good news for you,. but I was getting the same error message while trying to use the non-ajax smart part.

 

Apr 30, 2010 at 10:44 PM

I'm not sure what is wrong.  I checked my web.config file in the folder C:\inetpub\wwwroot\wss\VirtualDirectories\(my web application)\wpresources

and it has a SafeControl line for SmartPart:

<SafeControl Assembly="ReturnOfSmartPart, Version=1.3.0.0, Culture=neutral, PublicKeyToken=9f4da00116c38ec5" Namespace="SmartPart" TypeName="*" Safe="True" />

but I still get error, "Web Part or Web Form Control on this Page cannot be displayed or imported. The type is not registered as safe."

Apr 30, 2010 at 11:02 PM

Wow, it turns out that I can add the SmartPart web part to my page, even though it gives me an error when I click on it in the Web Parts Gallery.

:-/

OK, moving on to creating user controls!