---
title: "What are safe controls, and what type of information, is placed in that element in a SharePoint web.config file?"  
description: "What are safe controls, and what type of information, is placed in that element in a SharePoint web.config file?"  
author: "Anonymous User"  
published: 2011-11-15  
updated: 2020-09-20  
canonical: https://www.mindstick.com/interview/1360/what-are-safe-controls-and-what-type-of-information-is-placed-in-that-element-in-a-sharepoint-web-config-file  
category: "sharepoint"  
tags: ["sharepoint"]  
reading_time: 2 minutes  

---

# What are safe controls, and what type of information, is placed in that element in a SharePoint web.config file?

When you deploy a WebPart to SharePoint, you must first make it as a safe control to use within SharePoint in the web.config file. Entries made in the safe controls element of SharePoint are encountered by the SharePointHandler object and will be loaded in the SharePoint environment properly, those not will not be loaded and will throw an error.\
In the generic safe control entry (this is general, there could be more), there is generally the Assembly name, the \
namespace, the public key token numeric, the typename, and the safe declaration (whether it is safe or not). There are other optional elements.

## Answers

### Answer by Anonymous User

When you deploy a WebPart to SharePoint, you must first make it as a safe control to use within SharePoint in the web.config file. Entries made in the safe controls element of SharePoint are encountered by the SharePointHandler object and will be loaded in the SharePoint environment properly, those not will not be loaded and will throw an error.\
In the generic safe control entry (this is general, there could be more), there is generally the Assembly name, the \
namespace, the public key token numeric, the typename, and the safe declaration (whether it is safe or not). There are other optional elements.


---

Original Source: https://www.mindstick.com/interview/1360/what-are-safe-controls-and-what-type-of-information-is-placed-in-that-element-in-a-sharepoint-web-config-file

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
