How to host asp.net application using Window authentication using window servicing account

960 views Asked by At

I am working into an organization which uses Active directory for any kind of application authentication.

We recently created a web application on ASP.NET using Sql Server for database connectivity. During development process we used window authentication for connecting to Sql Server 2008. When application got completed it was a time to host this application on IIS.

Challenges

We have been asked to use window servicing account to host this application on server. We are not supposed to use any kind of username passwords anywhere. It should be active directory driven and window authentication driven.

Now I don't have any idea how to proceed with this. Do I need to make any changes to web config to configure impersonation, or I need to change my connection string.

I only know we have to use Window authentication.

Any guidelines would be a big help

2

There are 2 answers

0
Gromer On

This is what I've always done:

  1. Create an application pool for the site to use. You can use a pool that is already created if you want.
  2. Set the Identity of the application pool to the AD service account your IT staff wants you to use.
  3. Ensure that service account also has access to the database resources
  4. Configure your connection string to use Integrated Security.
  5. Configure Windows authentication & impersonation in your web.config.

For #4 & 5: http://msdn.microsoft.com/en-us/library/bsz5788z(v=vs.100).aspx

0
Gregor Primar On

Inside connection string use trusted connection, other configuration can be found here:

WindowsIdentity and Classic .Net App Pool

Just make sure you set Impersonation to Enabled.