ASP.NET application cannot access network drive

Discussion in 'ASP .Net' started by James N, Jul 16, 2003.

  1. James N

    James N Guest

    My ASP.NET application needs read/write permissions for drive "Z:",
    which is mapped to my Linksys Gigadrive (Network Attached Storage...if
    anyone is familiar with that).

    If I configure the Gigadrive with "Guest" access rights, then everything
    works fine, BUT this leaves the drive vulnerable to everyone/everything
    including network viruses. Lately, my drive has had several attacks by
    the Lovegate virus.

    Eliminating such attacks requires making my drive private, meaning I
    must remove "Guest" access rights and only allow logged-in users to
    access the drive through the ASP.NET applicaiton.

    The problem is that without "guest" access rights, the ASP.NET
    application itself cannot access the drive!

    Is my ASP.NET application a "user" that I must add to the list of
    priviledged users on the Gigadrive? Well, I tried adding users "ASPNET"
    and "IUSR_MyComputer" to the Gigadrive, but it didnt seem to work.

    Again, if I allow the "Everyone" group (which includes the user "Guest")
    to have persmission to the drive, then everything works.

    Can someone please help me?

    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
     
    James N, Jul 16, 2003
    #1
    1. Advertising

  2. James N

    Jeff Trotman Guest

    I believe that giving permissions to ASPNET (assuming you're using the
    default settings) is who needs the permissions. Drive mappings are user
    specific so not only do you need to have Z mapped to the share, but the
    ASPNET user has to have it mapped as well. I don't know if this is your
    problem but this has bitten me in the past.

    Also, you could try using a UNC path to access the drive which wouldn't
    require a drive mapping.

    Hope this helps.

    Jeff Trotman
    Westglenn Software


    "James N" <> wrote in message
    news:...
    >
    >
    > My ASP.NET application needs read/write permissions for drive "Z:",
    > which is mapped to my Linksys Gigadrive (Network Attached Storage...if
    > anyone is familiar with that).
    >
    > If I configure the Gigadrive with "Guest" access rights, then everything
    > works fine, BUT this leaves the drive vulnerable to everyone/everything
    > including network viruses. Lately, my drive has had several attacks by
    > the Lovegate virus.
    >
    > Eliminating such attacks requires making my drive private, meaning I
    > must remove "Guest" access rights and only allow logged-in users to
    > access the drive through the ASP.NET applicaiton.
    >
    > The problem is that without "guest" access rights, the ASP.NET
    > application itself cannot access the drive!
    >
    > Is my ASP.NET application a "user" that I must add to the list of
    > priviledged users on the Gigadrive? Well, I tried adding users "ASPNET"
    > and "IUSR_MyComputer" to the Gigadrive, but it didnt seem to work.
    >
    > Again, if I allow the "Everyone" group (which includes the user "Guest")
    > to have persmission to the drive, then everything works.
    >
    > Can someone please help me?
    >
    > *** Sent via Developersdex http://www.developersdex.com ***
    > Don't just participate in USENET...get rewarded for it!
     
    Jeff Trotman, Jul 17, 2003
    #2
    1. Advertising

  3. James N

    James N Guest

    Jeff,

    Im not sure what you mean when you said "the ASPNET user has to have it
    mapped as well". Do you mean this:

    Under "my computer" right-click the mapped drive and select
    "properties". On the security tab, add "ASPNET" to the list of users?

    Well, I tried doing that but it does not allow me to modify the list.
    Currently, I have 3 users/roles: administrator(NASDRIVE\administrator),
    Everyone, everyone(NASDRIVE\everyone). I checked the "full control"
    option for all of them. However, when I click "apply", all the
    checkboxes become unchecked again. Only the administrator still has
    full control ( as how it was initially ).



    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
     
    James N, Jul 18, 2003
    #3
  4. James N

    James N Guest

    I was playing around with the NAS a little more and I notice that
    whenever I create a new user with the name "aspnet", I receive the same
    error: "Could not find a part of the path 'z:\'". The odd thing is even
    though "aspnet" is a member of the "everyone" group in NAS, and that the
    "everyone" group does have R/W access to the share folder, the
    application is still not able to write to the folder. Now if I delete
    the "aspnet" user altogether, everything works like normal (where
    "everyone" has access).

    By the way, for your info (but im sure everyone here probably knows this
    already) "ASPNET" is actually the user account that the asp.net worker
    process (aspnet_wp.exe) is configured to runs as in IIS/windows. There
    seems to be some correlation, but I just dont know exactly what. If
    this info has shedded some light on this problem, please let me know.
    THanks.

    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
     
    James N, Jul 18, 2003
    #4
    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. James N
    Replies:
    1
    Views:
    799
    Jeff Trotman
    Jul 18, 2003
  2. shailesh
    Replies:
    1
    Views:
    789
    Tim Golden
    Mar 28, 2007
  3. James N

    ASP.NET application cannot access network drive

    James N, Jul 16, 2003, in forum: ASP .Net Security
    Replies:
    0
    Views:
    152
    James N
    Jul 16, 2003
  4. benny
    Replies:
    1
    Views:
    376
    Jim Cheshire [MSFT]
    Jul 16, 2004
  5. king
    Replies:
    1
    Views:
    281
Loading...

Share This Page