Solved

A WebPart on this Page cannot be displayed

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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Sharepoint 3.0 migration 4 68
Sharepoint nonfunctional - Emergency 6 34
SharePoint List Calculated Field 4 34
Create Task List as an icon on Home Page 6 29
If you create your solutions on SharePoint sooner or later you will come upon a request to set  permissions of the item depending on some of the item's meta-data - the author, people assigned as approvers, divisions, categories etc. The most natu…
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…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

777 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