Application cannot open SQL connection when on IIS

Viewed 8947

I have a connection string that looks like this:

Server=.;Database=mydbname;Trusted_Connection=True;

This works fine when I run/debug my application using Visual Studio (IIS Express) but after deployment over IIS-8 it throws me an exception while opening connection that:

Login failed for user 'IIS APPPOOL\mysite'.

I am confused why this is happening why IIS is adding its user in the middle when the database doesn't require one, and why this is not happening with IIS Express?

3 Answers
Related