Solved

A WebPart on this Page cannot be displayed

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

Suggested Solutions

Title # Comments Views Activity
Sharepoint Home Page (companyweb) blank 3 121
SharePoint integration. 1 62
How to code SharePoint 2013 online 4 81
Sharepoint KB 2 84
The Scenario: Let’s say you have a quote worksheet in Excel that you use to work up sales figures and such for your clients. You utilize SharePoint to manage and keep track of these documents. You would like values from your worksheet to populate Sh…
For SharePoint sites, particularly public-facing ones, there are times when adding JavaScript, Meta Tags, CSS Styles or other content to the page <head> section is more practical than modifying master pages.  For instance, you could add the jQuery l…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

830 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