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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Impersonation Question

Status
Not open for further replies.

pmegan

Programmer
Aug 29, 2005
1,186
US
Hi,
Is it possible to impersonate an authenticated user from a web service?

Here's my situation. I'm upgrading a windows application that transfers files to a central location and accesses a SQL Server database. It runs as a scheduled task about half the time, but also has a GUI that our accountants use to make adjustments. Right now its a standalone program installed on a couple dozen pc's around my company and I'm thinking that since I've got to rewrite it anyway, moving the common logic and data access layers to a web service will make future upgrades much easier. The problem I'm running into is accessing the database as the user on the client end. The database uses windows authentication, and a generic login won't cut it.

I've already got windows authentication working to access the web service. It seems like you should be able to pick up these credentials and use impersonation to create a connection as that user, but every sample and tutorial I can find uses form authentication. Even those that are meant to use windows auth are written as forms with a blurb saying "in practice, windows authentication should be used".

Can anybody help me out with this, or if its at least possible?

Thanks,
Pat
 
I forgot to add this. I'm using .Net 2.0, most likely VB, but can work my way through C# if i have to. Also, if this would be easier using .Net 3.5 I can upgrade.
 
Thanks jbenson. I started going through that article and then our priorities shifted and this project was put on the back burner. I'll check it out when I can get back to this.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top