NHibernate in IIS 7, SQLClientPermissionException

I am developing an MVC application using nHibernate; through VS the built-in web server the application starts without errors. When configuring and running through IIS7 on localhost, the application throws an SQlClientPermission exception after calling System.Data.SqlClient.PermissionDemand (SqlClient calls this internally)

I have included the application to run under full trust, but it does not seem to affect the result.

+3
source share
1 answer

From the description, I assume that you are using Integrated Security in your connection string. Maybe something similar to the lines below.

Data Source=myServerAddress;Initial Catalog=myDataBase;Integrated Security=SSPI;

VS - .

IIS,

  • IIS,
  • sql.

( , , )

+1

Source: https://habr.com/ru/post/1735998/


All Articles