This is a very common error that SharePoint Developers often face. As stated in the error message, this is due to SafeControl Elements in Web.Config file of your SharePoint Application not being added correctly, or perhaps pointing to the wrong type name.
To solve this issue, you’ll need to make sure that the SafeControl Entries in your SharePoint solution projects is configured correctly.
Step 1 – Find out what is the correct type name.
- Navigate to your .webpart file in Visual Studio that you’ve misconfigured.
- Double clicking it to open the webpart file.
- Copy the Type Name and exclude the last node
- Alternatively, go to your web part .cs file and copy the Namespace
Now that you have the correct type name. You need to…
Step 2 – Specify the right Safe Entry
- Click on the Web Part
- Under Properties panel, click on the … icon beside Safe Control Entries
- Enter the value found in Step 1 into Namespace field as shown below.
- Deploy and Done!