ASP.NET user control security exception
Updated: April 14, 2008
Applies To: Office SharePoint Server 2007
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>