Solved

A WebPart on this Page cannot be displayed

Posted on 2012-03-25
4
344 Views
Last Modified: 2012-08-14
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?
0
Comment
Question by:VBBRett
  • 2
  • 2
4 Comments
 
LVL 18

Expert Comment

by:ivan_vagunin
ID: 37764499
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"/>
0
 

Author Comment

by:VBBRett
ID: 37765445
It didn't work.  What else should I do?
0
 
LVL 18

Accepted Solution

by:
ivan_vagunin earned 500 total points
ID: 37765460
Can you post code of webpart, so I check that namespace and class are correct? BTW check assembly name and publickeytoken (assembly name is name of dll file, without extension).

And you have a misprint is word Assembly in safecontrol element.
0
 

Author Comment

by:VBBRett
ID: 37768574
Sure, do you want to see the front end code or the back end code?  Which files would you like to see?  Thanks!
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

The vision: A MegaMenu for a SharePoint portal home page The mission: Make it easy to maintain. Allow rich content and sub headers as well as standard links. Factor in frequent changes without involving developers or a lengthy Dev/Test/Prod rel…
We had a requirement to extract data from a SharePoint 2010 Customer List into a CSV file and then place the CSV file into a directory on the network so that the file could be consumed by an AS400 system. I will share in Part 1 how to Extract the Da…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now