ASP.NET Impersonation

  • Thread starter Thread starter Prateek
  • Start date Start date
P

Prateek

Hi All,

I have the following scenario where I need your help.

1. An ASP.NET application installed on Win2K, IIS 5.0 and framework 1.1
2. This app accesses a database on separate database server using
Intergrated Auth.

I have granted the required rights to local ASPNET account on the database.
I am wondering if I will need to use impersonation since IIS and DB servers
are different or will this scenario work? Some explanation will be
appreciated.

One unrelated question.. what could be the reason behind error "Server
Application Unavailable" when running ASP.NET pages?

TIA
Prateek
 
If DB and IIS are on different machine you cannot use the aspnet account
that is a machine account.

There are different ways to accomplish this.
For example you can use a specific domain user (that is autorized on your
db).
You need this in your web config:
<identity impersonate="true" userName="domain\username"
password="password"/>
If you want you can encript this data (search for aspnet_setreg.exe in
microsoft site)
In the connection string put "integrated security=sspi" in place of user
name and password.
 
thanks for this information.. much needed!!

Cirrosi said:
If DB and IIS are on different machine you cannot use the aspnet account
that is a machine account.

There are different ways to accomplish this.
For example you can use a specific domain user (that is autorized on your
db).
You need this in your web config:
<identity impersonate="true" userName="domain\username"
password="password"/>
If you want you can encript this data (search for aspnet_setreg.exe in
microsoft site)
In the connection string put "integrated security=sspi" in place of user
name and password.
 
Back
Top