I have a pretty typical .NET app that uses Entity Framework, MS SQL, and IIS. The app was developed with the expectation that the SQL server would run local to IIS and with SQL authentication for the database connection. The users will logon to the app via Windows authentication.
Recently, I’ve been tasked with separating the web and SQL servers onto two servers; however, I’m not allowed to use SQL authentication any longer, but instead, it must use Windows Authentication.
My new connection string is now something like:
<add name="MyDbConn2" connectionString="Initial Catalog=MyDb;Data Source=MyServer;Integrated Security=SSPI;"/>
I’m my local dev environment, I’ve tried setting the AppPool user to a service account (e.g. "domain\User"), and set the
<identity/> in the web.config to use the same AppPool user like so:
<identity impersonate="true" userName="domain\User" password="****"/>
Provided the user has the permissions on the SQL box, this works. But now, I’m also being told that I cannot use a service account either since the user/pass would have to be stored in the config file.
I can’t even fathom how this would work without a service account, so I’m hoping this community has some ideas.