Posts

Showing posts from January, 2012

Running PowerShell Scripts from a SCOM Management Pack

http://blogs.technet.com/b/brianwren/archive/2008/02/20/running-powershell-scripts-from-a-management-pack.aspx

A Web Part or Web Form Control on this Page cannot be displayed or imported. The type could not be found or it is not registered as safe.

Image
When you create a Visual Webpart using Visual Studio 2010 you may see the following error: A Web Part or Web Form Control on this Page cannot be displayed or imported. The type could not be found or it is not registered as safe. The reason for this error is if we modify default namespace into custom namespace, Visual Studio 2010 Package is not generating webpart file properly. 1) Make sure your webpart is added into Safe Control list in Web.config file. 2) Open your .webpart file in your visual studio - Make sure type element name has proper namespace & class name. When you made changes to default name space which is being generated by  visual studio, you may not see updated namespace in type element. So make sure your webpart name space name & webpart class name placed correctly in type element's name attribute type name="WebpartNameSpace.WebPartClassName", $Sharepoint.Project.AssemblyFullName$   3) Access http://server/_layouts/ne