impersonation (form based logins on Windows Vista)

Posted on 2009-04-16
Last Modified: 2012-05-06
I get an error:
Could not create Windows user token from the credentials specified in the config file

It is associated with this line in the web.config:
<identity impersonate="true" userName="username" password="password"/>

the username and the password are correct.

I read on another site that you need to set the account to have os priviledges. I don't know where to set this in vista though. Logged in as administrator on vista.

I have a second question also: Will impersonation work when the application is running on a server (windows server 2003 I think) and being accessed from a different computer?
[I'll need to put the application on a server for demonstration. It will need to have no login for the demo, but I don't want to remove the login feature, as it bases the content on the logged in user, role etc. So I want to use impersonation.]

Question by:peterdungan
    1 Comment
    LVL 22

    Accepted Solution

    Sounds like these settings:
    Run GPEDIT
    Drill to Local Computer Policy>Computer Configuration>Security Settings>Local Policies>User Rights Assignment>Create a token object
    Add the account you are using to that attribute.
    Also, under the same tree:
    Impersonate a client after authentication
    Add your account there.
    For your second question...if the computer is RDPing into the server, it would probably work just changing the server settings, but if you are running an executable from the server on the workstation, you would probably need to set the above GP settings on the workstation(s) as well.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Suggested Solutions

    In my previous article ( we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
    Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
    The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…
    Need more eyes on your posted question? Go ahead and follow the quick steps in this video to learn how to Request Attention to your question. *Log into your Experts Exchange account *Find the question you want to Request Attention for *Go to the e…

    759 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

    7 Experts available now in Live!

    Get 1:1 Help Now