Request for the permission of type 'System.Data.SqlClient.SqlClientPermission failed

后端 未结 3 1951
既然无缘
既然无缘 2021-01-21 22:50

I have an ASP.NET application, using LINQ to connec to a SQL Server 2008 R2 databse.

My connection string:

Data Source=[SqlServerIp];Initial Catalog=[dat         


        
3条回答
  •  逝去的感伤
    2021-01-21 23:41

    I had faced the same problem, and I resolved this way:

    Changing the app pool identity that my application uses in IIS to pre-built account NetworkService.

    The default identity is ApplicationPoolIdentity, and looks like it doesn't have enough privileges to access network resources.

提交回复
热议问题