I have freshly installed ISS with SQL server and asp.net mvc application. I want my app to use windows authentication. On my application side, i know that i have good connection string, because i was running it on my local machine and it was working fine.
On my new remote server, it does not want to work - so i changed connection string to use credentials - sa, and it worked. So i obviously am lacking some configuration there for windows auth.
As far I did is I added network service to my sql server logins, and granted it admin privileges. Also, my application pool is running as network service. It still doesn't work, what did i miss?
Edit for clarification: WinAuth is enabled in my sql server.
I think the "Network Service" user is not working the way you expect.
Try setting the application pool to run as a particular user, and then add that same user to the slq server logins. Then under user mapping give that user the minimum set of permissions it needs to the particular DBs. Typically db_datareader and db_datawriter are sufficient.
Note, the user that you use doesn't need any special permissions on the machine. It could be a local user or a domain user that isn't a member of any security groups at all. If you create a new user specifically for this purpose, you can make it a standard user, then afterwards you can go into user manager and remove it from the users group so that it doesn't have any default access to the machine. This way you still get the advantage of using the Windows Authentication method in your connection string.