Web Service using Impersonation

Posted on 2005-04-21
Last Modified: 2011-09-20

I currently have the following architecture:

On an internal network: I have a windows forms client connecting to a web service on another computer, all on the same network and domain. The web service is in-turn connecting to a SQL server database using windows integrated security (SSPI).

The problem: Windows integrated security is required throughout the whole architecture.

The web service can only run in one named user account and a password is required to do this i.e. using the following in the web.config file:

<identity impersonate="true" userName="MyDomainName\MyUsername" password="MyPassword"/>

How can I carry the credentials of ANY user on the client through to the database without providing a windows password from the outset?

Your suggestions are greatly appreciated.

Thanks in advance.

Question by:KaptainRAD
    LVL 37

    Accepted Solution

    you could impersonate through code ...

    little class in C#



    Author Comment


    I managed to get it all working by enabling Kerberos on our network.
    This meant allowing the connecting machines between the tiers and specified users to delegate credentials between them. (And setting the Web.config file to Impersonate=TRUE)



    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
    It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now