Read file from ASP.NET on the mapped network drive

Discussion in 'ASP .Net' started by Michal Valent, Nov 24, 2003.

  1. Hello,
    if I try to read a file on the mapped network drive,
    this error apears:

    Logon failure: unknown user name or bad password.

    How to set up permissions for IUSR_MACHINENAME
    on the mapped network drive?

    Thaks

    Miso
    Michal Valent, Nov 24, 2003
    #1
    1. Advertising

  2. You are better served to pull the file under another identity. This can be
    done in a variety of ways.

    1. Create an assembly that will sit in COM+ and set identity there
    2. Spawn a new thread and set it under an identity that has access

    If, however, you want to go the way you are heading, the easiest manner is
    to set up the password for the IUSR_ account and create an identical
    account, with the same password, on the other machine. This works well on
    many installs. The only other suggestion is to have the IUSR_ account as a
    domain account, but this would require a lot of registry tweaking, if it
    works at all.

    Of all of the suggestions, the first section contains the better options, as
    it adds a layer of protection from hacks.

    --
    Gregory A. Beamer
    MVP; MCP: +I, SE, SD, DBA

    **********************************************************************
    Think Outside the Box!
    **********************************************************************
    "Michal Valent" <> wrote in message
    news:%...
    > Hello,
    > if I try to read a file on the mapped network drive,
    > this error apears:
    >
    > Logon failure: unknown user name or bad password.
    >
    > How to set up permissions for IUSR_MACHINENAME
    > on the mapped network drive?
    >
    > Thaks
    >
    > Miso
    >
    >
    >
    Cowboy \(Gregory A. Beamer\), Nov 24, 2003
    #2
    1. Advertising

  3. ----- Cowboy (Gregory A. Beamer) wrote: -----

    You are better served to pull the file under another identity. This can be
    done in a variety of ways.

    1. Create an assembly that will sit in COM+ and set identity there
    2. Spawn a new thread and set it under an identity that has access

    If, however, you want to go the way you are heading, the easiest manner is
    to set up the password for the IUSR_ account and create an identical
    account, with the same password, on the other machine. This works well on
    many installs. The only other suggestion is to have the IUSR_ account as a
    domain account, but this would require a lot of registry tweaking, if it
    works at all.

    Of all of the suggestions, the first section contains the better options, as
    it adds a layer of protection from hacks.

    --
    Gregory A. Beamer
    MVP; MCP: +I, SE, SD, DBA

    **********************************************************************
    Think Outside the Box!
    **********************************************************************
    "Michal Valent" <> wrote in message
    news:%...
    > Hello,
    > if I try to read a file on the mapped network drive,
    > this error apears:
    >> Logon failure: unknown user name or bad password.
    >> How to set up permissions for IUSR_MACHINENAME

    > on the mapped network drive?
    >> Thaks
    >> Miso
    >>>



    Hi Gregory ,
    I do have the same problem but i need to do a context switch but I don'know how to do this.


    Test on:
    ----------------
    WebServer Windows 2000 Server sp4, IIS 5.0
    FileServer Windows 2000 Server sp4

    Problem:
    -------------
    aspx page is unable to read/write files that are located on a network share

    SetUp:
    ----------
    The WebServer has a share to the FileServer drive which is granted to
    the WebServer Administrator only and can not be granted to any other user!!

    changed:
    -------------
    Server Setup (Windows 2000 server only!)
    - Logon to the server as an administrator
    - Open up the machines local security policy (start>run>secpol.msc)
    - Expand Security Settings, Local Policies, User Rights Assignment
    Double click Act as part of the operating system
    Click Add User or Group, enter the worker process account name (ASPNET) and click OK, and OK again

    In order for this change to become effective, the web server will have to be rebooted.

    my application web.config
    <identity impersonate="true" userName="Administrator" password="enter_Your_PASSWORD_here"/>


    if you like I can send you the project file as well
    what ever I tried nothing worked, I can check for FileExist but OpenRead will give access denied

    thanks in advanced
    reinhard
    =?Utf-8?B?cmVpbmhhcmQ=?=, Nov 27, 2003
    #3
    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. Hrvoje Vrbanc
    Replies:
    1
    Views:
    757
  2. Kruq
    Replies:
    0
    Views:
    619
  3. John
    Replies:
    1
    Views:
    2,481
    Chris Uppal
    Dec 1, 2006
  4. shailesh
    Replies:
    1
    Views:
    764
    Tim Golden
    Mar 28, 2007
  5. king
    Replies:
    1
    Views:
    265
Loading...

Share This Page