ASP .NET 2.0 cannot open SQLConnection

Posted by user162117 on Stack Overflow See other posts from Stack Overflow or by user162117
Published on 2009-08-24T15:20:25Z Indexed on 2010/03/22 4:01 UTC
Read the original article Hit count: 473

Filed under:
|
|

Using: IIS 6; Anonymous Authentication (with a user that belongs to the administrators group); SQL Server 2005; .NET 2.0

Web.config:

<system.web>
    <securityPolicy>
      <trustLevel name="Full" policyFile="internal" />
    </securityPolicy>
  </system.web>

<identity impersonate="true"/>

I have this exception when I try to Open a SQLConnection:

Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.

Exception Details: System.Security.SecurityException: Request for the permission of type 'System.Data.SqlClient.SqlClientPermission, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

What could it be?

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about iis6