user3221816
user3221816

Reputation: 135

I can not log in to SQL Server database after deployment

I have an asp.net site that stores information from textboxes to a database. It works fine when I run it from visual studio, but once I deploy it to IIS I get the following error message

[SqlException (0x80131904): Login failed for user 'LORENZNT\TLC08$'.]

This is my connection string.

Data Source=tlc08;Initial Catalog=SingableSolutions.com;Integrated Security=true

I have been through dozens of forums and tried everything I can think of. If anyone could help me out, I would greatly appreciate it. Thanks.

Upvotes: 0

Views: 62

Answers (1)

Ross Presser
Ross Presser

Reputation: 6255

When you run under IIS, if the application pool is set to use "Application Identity" then it will the IIS computer's account to try to log into SQL Server. If you have not created a User in SQL Server corresponding to that computer account, then access will be denied.

You can either create a User in SQL Server for that account, or you can change your IIS Application Pool so it runs using a domain user account, or you can change your connectionstring to use a SQL account instead of Integrated Security.

Upvotes: 4

Related Questions