Link to home
Start Free TrialLog in
Avatar of VBBRett
VBBRett

asked on

A WebPart on this Page cannot be displayed

I have a web part that I am trying to show up on the Central Admin Page and for some reason I get this:

Web Part Error: A Web Part or Web Form Control on this Page cannot be displayed or imported. The type SiteCreateVisualWebPartSolution.VisualWebPart1.VisualWebPart1, SiteCreateVisualWebPartSolution, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5ca4be4793e0f56b could not be found or it is not registered as safe.

Show Error Details


I thought I added the webpart info to the Central Admin web.config file properly but maybe not.  Can somebody please provide for me how I should write the webpart into the web.config file?  Here is what I have put into the web.config file below:

<SafeControl Assmebly="SiteCreateVisualWebPartSolution.VisualWebPart1.VisualWebPart1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5ca4be4793e0f56b" Namespace="SiteCreateVisualWebPartSolution.VisualWebPart1.VisualWebPart1" TypeName="SiteCreateVisualWebPartSolution.VisualWebPart1.VisualWebPart1, SiteCreateVisualWebPartSolution" Safe="True" SafeAgainstScript="False"/>

What can I do to fix this issue where I am still getting problems?
Avatar of Member_6283346
Member_6283346

Hi!

It looks like your safe control element is incorrect.
The TypeName parameter is incorrect - it should class name (without namespace, namespace is specified in separate attribute) or * is all classes from specified namespace are safe.
Besides it looks like your namespace include class name as well.

So try this:
<SafeControl Assmebly="SiteCreateVisualWebPartSolution.VisualWebPart1.VisualWebPart1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5ca4be4793e0f56b" Namespace="SiteCreateVisualWebPartSolution.VisualWebPart1" TypeName="VisualWebPart1" Safe="True" SafeAgainstScript="False"/>
Avatar of VBBRett

ASKER

It didn't work.  What else should I do?
ASKER CERTIFIED SOLUTION
Avatar of Member_6283346
Member_6283346

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of VBBRett

ASKER

Sure, do you want to see the front end code or the back end code?  Which files would you like to see?  Thanks!