Posted on: 1/12/2015 6:42:57 AM | Views : 738

Hello,
I have ASP.NET web application started under PC\UserName account, and Windows Service Application that runs under Local System Account (NT\System). Both applications should access MS SQL database simultaneously. They are using same connection string:
<add name="DefaultConnection" connectionString="Data Source=(LocalDb)\v11.0;AttachDbFilename=|DataDirectory|\mydb.mdf;Initial Catalog=mydb;User=MyUser;Password=MyPassword;" providerName="System.Data.SqlClient" />
The problem occurrs every time when second app tries to fetch data from database. So, app which connects first can fetch data normally, but the other one gets "Login for MyUser failed" exception every time.
Everything works as expected when i start windows service app under PC\UserName credentials. But the problem is that i have to do that login every time manually ...

Go to the complete details ...