Windows AUTH w/ASP.net

  • Thread starter Thread starter Frustrated....
  • Start date Start date
F

Frustrated....

My db admin has decided that he does not like sql logins. I would like to
know if it is possible to have asp.net connect to a MSSQL datasource. But I
was curious if it was possible for me to have it connect as the visitor to
the site with out setting up asp.net to impersonate the connected user?
Sorry if this does not make since or if I posted the question in the wrong
location.
 
Hi,

Yes, there are two ways:
1. Use sql server authentication (passing username, password within
connection string), something like:
Data Source=Aron1;Initial Catalog=pubs;User Id=sa;Password=asdasd
2. Run aspnet application under another user account:
Just put a line into
web.config file somewhere under
<system.web> node:

<identity impersonate="true" userName="USER" password="PASSWORD"/>
 
Back
Top