Web Part 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 - error in Sharepoint 2010
Deployed solution using powershell in production, and activated the feature in the site collection.
But when trying to add the webpart, it shows "Web Part 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"
Checked in the webpart gallery and when trying to open the webpart, it is the same error.
In web.config the entry is present for the custom webpart and it is set as Safe = True
On further anlaysis found that the namespace mentioned in the web.config entry is not correct and corrected the same.
Change the namespace in web.config to the name mentioned in .webpart file. Open the .webpart file in notepad and check the entry, the namespace is available under type name. Just remove the text after the last period.
Refreshed the page - It worked !!
Comments
Post a Comment