G
Guest
Hi there,
I've got a web app that uses impersonation and makes calls to a SQL Server
backend. I'd like to be able to automate the setting of database security for
the web app upon deployment. What I'd like to do during installation is the
following:
- run the database creation script
- determine the user context that the ASP.NET worker process is running under
- assign privileges for that user in the new database
Can anyone tell me if it is possible to programmatically determine the user
context that the ASP.NET worker process is running under and if so, how?
Under IIS5 this would be a case of interrogating the <ProcessModel> node in
Machine.config would it not? However, I'm not so sure if this is
deterministic and also, the same method won't work for machines running IIS6.
Thank you,
Danny
I've got a web app that uses impersonation and makes calls to a SQL Server
backend. I'd like to be able to automate the setting of database security for
the web app upon deployment. What I'd like to do during installation is the
following:
- run the database creation script
- determine the user context that the ASP.NET worker process is running under
- assign privileges for that user in the new database
Can anyone tell me if it is possible to programmatically determine the user
context that the ASP.NET worker process is running under and if so, how?
Under IIS5 this would be a case of interrogating the <ProcessModel> node in
Machine.config would it not? However, I'm not so sure if this is
deterministic and also, the same method won't work for machines running IIS6.
Thank you,
Danny