impersonation problem

Discussion in 'ASP .Net Security' started by ulrik@pragmasoft.dk, Nov 10, 2006.

  1. Guest

    I want to save a file to another computer (via an UNC / mapped network
    drive) from an ASP.NET 1.1 application running on win xp iis 6.0. I
    have created an ASPNET account on the remote machine and given this
    account permissions to write to the folder and I'm able to write the
    file if I have the following in my web.config:
    <identity impersonate="true" userName="ASPNET" password="1234"/>
    ....but if I remove this (and use the default impersonation) it fails...
    eventhough I've set the password of the aspnet account (on the machine
    im trying to write from) to 1234 (under computer administration ->
    Accounts). WindowsIdentity.GetCurrent().Name returns "ASPNET" so it
    impersonates correct so I think it uses another password... I've read
    that this must be set in the machine.config, but this does'nt help. Is
    there another place where I have to set the password of the ASPNET
    account or....?
     
    , Nov 10, 2006
    #1
    1. Advertising

  2. Guest

    I found the solution...
    If af set username=ASPNET and password=1234 in the machine.config and I
    have an ASPNET user account on both machines with the password 1234 and
    I restart IIS after making these changes (very important (-:), then it
    works without the entry in the web.config.

    skrev:
    > I want to save a file to another computer (via an UNC / mapped network
    > drive) from an ASP.NET 1.1 application running on win xp iis 6.0. I
    > have created an ASPNET account on the remote machine and given this
    > account permissions to write to the folder and I'm able to write the
    > file if I have the following in my web.config:
    > <identity impersonate="true" userName="ASPNET" password="1234"/>
    > ...but if I remove this (and use the default impersonation) it fails...
    > eventhough I've set the password of the aspnet account (on the machine
    > im trying to write from) to 1234 (under computer administration ->
    > Accounts). WindowsIdentity.GetCurrent().Name returns "ASPNET" so it
    > impersonates correct so I think it uses another password... I've read
    > that this must be set in the machine.config, but this does'nt help. Is
    > there another place where I have to set the password of the ASPNET
    > account or....?
     
    , Nov 10, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kelly D. Jones

    Problem with impersonation and delegation

    Kelly D. Jones, Sep 4, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    1,826
  2. Thomas

    problem using impersonation

    Thomas, Oct 24, 2003, in forum: ASP .Net
    Replies:
    4
    Views:
    450
    Thomas
    Oct 27, 2003
  3. jm
    Replies:
    1
    Views:
    1,936
    bruce barker
    Dec 20, 2003
  4. Replies:
    0
    Views:
    410
  5. hellrazor

    problem with aspnet "impersonation"

    hellrazor, Nov 19, 2004, in forum: ASP .Net
    Replies:
    5
    Views:
    7,826
    Willy Denoyette [MVP]
    Nov 19, 2004
Loading...

Share This Page