Change the credential in C# web application

Posted on 2009-04-16
Last Modified: 2012-05-06
I have a C# web application running on sever A. After the user updates his password, this application needs to create a text file on sever B. Then another application will read this text to excute some windows jobs.
As I know the account run the C# web application is the sever A machine account "ASPNET". We can't make this account have the right to write a file on server B. Is it possible I can change the credential to a windows account so the application can write a file on server B?

Many Thanks,
Question by:Jinghui Li
    LVL 33

    Assisted Solution

    by:Todd Gerbert
    I think you can add an <indentity impersonate=userName password=thePassword /> to your web.config.

    I find identities a little confusing under ASP.Net, so I could be wrong...
    LVL 12

    Assisted Solution

    In the folder where the text file is to be created on "B"  give NETWORK_SERVICE full rights


    Accepted Solution

    Actually we give the machine account the right to access that folder and it works.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Training Course: Java/J2EE and SOA

    This course will cover both core and advanced Java concepts like Database connectivity, Threads, Exception Handling, Collections, JSP, Servlets, XMLHandling, and more. You'll also learn various Java frameworks like Hibernate and Spring.

    Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
    Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…

    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