ASP.NET user control security exception
Updated: April 14, 2008
Applies To: Office SharePoint Server 2007
This Office product will reach end of support on October 10, 2017. To stay supported, you will need to upgrade. For more information, see , Resources to help you upgrade your Office 2007 servers and clients.
Topic Last Modified: 2016-11-14
An ASP.NET user control loaded in Microsoft Office SharePoint Server 2007 generates a security exception related to connection security, as in the following example:
This control does not allow connection strings with the following keywords: 'Integrated Security', 'Trusted_Connection'.
When you load an ASP.NET user control in a SharePoint Web part or Web form, a security exception occurs if the code uses NTLM authentication in the connection string. The security exception does not occur if Integrated Windows authentication is not used.
Controls or assemblies loaded from outside the global assembly cache are not trusted by default.
Clear the tagMapping properties of the control by inserting the following lines in the Web.config file:
<code> <tagMapping> <clear/> </tagMapping> </code>