Request for the permission of type 'System.Data.SqlClient.SqlClientPermission failed
Posted
by
Richmond
on Stack Overflow
See other posts from Stack Overflow
or by Richmond
Published on 2010-11-04T11:47:56Z
Indexed on
2011/01/10
19:53 UTC
Read the original article
Hit count: 197
ASP.NET
|sql-server
Hi All!
I have asp.net application, using LINQ to connecto to SQL Server 2008 R2 databse.
My connection string: Data Source=[SqlServerIp];Initial Catalog=[databaseName]User Id=newLogin;Password=newPassword;
When I deploy application on my local IIS (which is not the same machine as database server) it works fine, but when I deploy application on other IIS (the same machine as sqlServer) it throws an exception:
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.
Anyone knows how to fix it? Maybe it is due to some bad configuration of IIS? Please help.
© Stack Overflow or respective owner