Home > DeveloperSection > Interviews > What are safe controls, and what type of information, is placed in that element in a SharePoint web.config file?

Posted on    August-29-2011 12:42 AM

 SharePoint SharePoint 
 1 Answer(s)
  1499  View(s)
Rate this:

Arun Singh

Total Post:310

Posted on    August-29-2011 12:00 AM

When you deploy a Web Part 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 Share Point Handler 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 type name, and the safe declaration (whether it is safe or not). There are other optional elements.

Don't want to miss updates? Please click the below button!

Follow MindStick