Solved

A WebPart on this Page cannot be displayed

Posted on 2012-03-25
4
346 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Last week I faced a strange issue recently, i have deployed SharePoint 2003 servers for one project and one of the requirements was to open SharePoint site from same server. when i was trying to open site from the same server i was getting authentic…
Microsoft SharePoint Foundation 2010 and Microsoft SharePoint Server 2010 do not offer the option to configure the location of the SharePoint diagnostic trace log files during installation.  This can, however, be configured through Central Administr…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

867 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

22 Experts available now in Live!

Get 1:1 Help Now