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. Advertisements

  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. Advertisements

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,954
  2. Thomas

    problem using impersonation

    Thomas, Oct 24, 2003, in forum: ASP .Net
    Replies:
    4
    Views:
    602
    Thomas
    Oct 27, 2003
  3. jm
    Replies:
    1
    Views:
    2,068
    bruce barker
    Dec 20, 2003
  4. Replies:
    0
    Views:
    521
  5. hellrazor

    problem with aspnet "impersonation"

    hellrazor, Nov 19, 2004, in forum: ASP .Net
    Replies:
    5
    Views:
    8,233
    Willy Denoyette [MVP]
    Nov 19, 2004
  6. Zdenek Drlik
    Replies:
    0
    Views:
    541
    Zdenek Drlik
    Jan 25, 2005
  7. Ram P. Dash

    ASP.NET Impersonation Problem

    Ram P. Dash, May 27, 2005, in forum: ASP .Net
    Replies:
    7
    Views:
    756
    Willy Denoyette [MVP]
    May 28, 2005
  8. Impersonation Problem

    , Mar 29, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    970
Loading...