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    November-15-2011 3:13 AM

 SharePoint SharePoint 
Ratings:
 1 Answer(s)
  1888  View(s)
Rate this:

Awadhendra Tiwari

Total Post:510

Points:2550
Posted on    November-15-2011 1:00 AM

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.

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

Follow MindStick