SQL integrated security using computer name instead of user name

Viewed 18645

I am trying to an SQL Express instance on the same network, authenticating with my domain user. It works just fine with Windows Authentication in SSMS. I verified that I can use the MyDB database, including editing tables.

However, when I try the following connection string:

Server=ipaddress\SQLExpress; Database=MyDB; Integrated Security=SSPI;

I get back an error:

Cannot open database "MyDB" requested by the login. The login failed. Login failed for user 'ROMANIA\MONSTER2$'

The problem is that MONSTER2 is the name of my computer, not my username. (ROMANIA is the domain.) What am I doing wrong?

[Edit] I forgot something that might be relevant: I am trying to open the connection from a webservice running on my computer.

5 Answers

I had the same problem, and for a similar reason. (blush).

Even though I correctly set up my application pool to use the service account credentials instead of the LocalService/NetworkService etc, for some reason the Application itself was not using that application pool. It was set to DefaultAppPool. Very easy to miss, if one continues to assume that IIS was set up correctly.

Check that the applications hosted on IIS are running under the correct application pool rather than the DefaultAppPool.

Related