Permissions to call LogonUser

Discussion in 'ASP .Net' started by kellygreer1, Nov 20, 2007.

  1. kellygreer1

    kellygreer1 Guest

    I have been troubleshooting writing a log file to a fileshare on
    another machine.... and I can't seem to find my way past the "Double
    Hop" issue. I seem have narrowed it down to a failure of the
    LogonUser call. On Windows 2000 with IIS 5 and ASP.NET 2.0 the
    LogonUser call returns 0. From a Windows Forms client I can get the
    LogonUser call to work fine (returns 1).

    So what allows me to call LogonUser? Is there something I need to do
    in the web.config or machine.config? I already tried the change where
    you give ASPNET account the right to "Act as part of the OS".

    Any other ideas? Articles? I'd like to get this working under IIS 5 if
    possible.

    Kelly Greer

    change nospam to yahoo
    kellygreer1, Nov 20, 2007
    #1
    1. Advertising

  2. you may need to revert to the process token, to allow impersonation.

    RevertToSelf();

    before calling logon

    -- bruce (sqlwork.com)


    "kellygreer1" wrote:

    > I have been troubleshooting writing a log file to a fileshare on
    > another machine.... and I can't seem to find my way past the "Double
    > Hop" issue. I seem have narrowed it down to a failure of the
    > LogonUser call. On Windows 2000 with IIS 5 and ASP.NET 2.0 the
    > LogonUser call returns 0. From a Windows Forms client I can get the
    > LogonUser call to work fine (returns 1).
    >
    > So what allows me to call LogonUser? Is there something I need to do
    > in the web.config or machine.config? I already tried the change where
    > you give ASPNET account the right to "Act as part of the OS".
    >
    > Any other ideas? Articles? I'd like to get this working under IIS 5 if
    > possible.
    >
    > Kelly Greer
    >
    > change nospam to yahoo
    >
    bruce barker (sqlwork.com), Nov 20, 2007
    #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. Mary Chipman

    Re: Impersonation in ASPNET and LogonUser

    Mary Chipman, Sep 3, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    451
    Mary Chipman
    Sep 3, 2003
  2. Jason

    impersonating and LogonUser

    Jason, Dec 30, 2003, in forum: ASP .Net
    Replies:
    7
    Views:
    437
    Jim Cheshire [MSFT]
    Jan 5, 2004
  3. Scott Allen
    Replies:
    0
    Views:
    426
    Scott Allen
    Jul 13, 2004
  4. Curt K
    Replies:
    0
    Views:
    554
    Curt K
    Nov 3, 2006
  5. Ken Varn

    Security permissions for Win32 LogonUser call.

    Ken Varn, Mar 28, 2005, in forum: ASP .Net Security
    Replies:
    4
    Views:
    254
    Dominick Baier [DevelopMentor]
    Mar 31, 2005
Loading...

Share This Page