1

I want to publish my asp.net application to iis,but when i run the application i get this error:
enter image description here

i exert this link:
enter link description here

but i get this error now:
enter image description here


enter image description here

Community
  • 1
  • 1
elnaz irani
  • 277
  • 1
  • 3
  • 11
  • 1
    According to the stack trace, this error is coming from the database server. The user `behzad` doesn't have access to the database, the login is failing. – David May 16 '15 at 15:16

1 Answers1

1

It looks like you are using integrated authentication for your SQL connection and the user that the AppPool is running under has not been granted access to the database. If you intended to use integrated authentication, you should add the domain login corresponding to the AppPool id to your database and grant it access. If not, then update your connection string with the correct SQL credentials - probably in your release config transform - and redeploy.

tvanfosson
  • 524,688
  • 99
  • 697
  • 795
  • It's still a login issue. The user needs to have a login for the SQL server and needs to be associated with a user in that particular database. That user needs to be granted permission to read (and write, if necessary) to the database. – tvanfosson May 16 '15 at 15:57
  • You can use SQL Server Management Studio to connect to the database and add the login under the server `Security->Logins` as a Windows Login. When you create the login associate it with the database on the User Mapping tab and grant it `db_datawriter`, `db_datareader` permissions - or whatever permissions are appropriate for the user. – tvanfosson May 16 '15 at 16:14
  • i upload last image error,end of line my question,please review. – elnaz irani May 16 '15 at 16:26