Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Connecting web service to sql server using app pool account

Status
Not open for further replies.

dragonfly99

Programmer
Jun 15, 2010
3
US
Hello,

I have a web service in which i am making connection to the database to get data..now i want that the app pool account should be used to make the connection and not the current user's credentials..can somebody tell me step by step what changes do i need to make like setting impersonation=true or web.config change etc...i am really confused how to set it up so if somebody can guide me step by step I would really appreciate it.



Thanks
 
Thanks JBenson..the link was good..but here are my problems..i cannot enable the site to have anonymous access..and i have to set impersonation=true because my webservice runs under sharepoint web app and so impersonation has to be there and it is the logged on user credential...but what i wanted is that in my web service how do i take the app pool account and pass it to sql server..is there some setting for this in connection string.

Thanks
 
Application pool account ...the credentials which the web application uses for running..i have a domain account specifically for the web application's application pool and i wanted that this account should be passed always to access sql server no matter which user logs in...let me know if i need to explain more.
 
you want the website/IIS to use impersonation except when the service connects to the database. this seems overly complex. why not:
1. use the user's account to connect to the database?
2. use sql server account and configure the connection string to use the account?

this is much easier to manage and makes more sense given your constraints.

Jason Meckley
Programmer
Specialty Bakers, Inc.

faq855-7190
faq732-7259
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top