Access Network Share with ASP.NET

Discussion in 'ASP .Net' started by Steve Roszko, Oct 22, 2003.

  1. Steve Roszko

    Steve Roszko Guest

    Accessing Network Share with ASP.NET


    FILESERVER1 (file server)
    E:\WWWexport\
    Shared as WWWExport

    WEBSERVER2 (webserver)
    I created virtual directory to
    \\FILESERVER1\WWWExport\
    When creating the virtual dir named "ReportExport" , I gave "connect as"
    rights as a domain user with full rights to the share.


    Response.Write(Server.MapPath("ReportExport"))

    Returns

    \\FILESERVER1\WWWExport

    as expected.


    IO.Directory.CreateDirectory(Server.MapPath("ReportsExport") & "\TEST")

    Returns

    Could not find a part of the path \\FILESERVER1\WWWExport.


    Seems to be a permission thing of local ASPNET user, but why does it not
    access the share as the domain user I specified the Connect As in the
    virtual dir setup?

    Is there any way to give the user WEBSERVER2\ASPNET permissions on
    FILESERVER1 ?

    It appears that I could solve this by specifying the impersonate user in
    web.config but I don't want my entire app to run as that domain user.

    Suggestions?

    Thanks,

    -Steve








    --

    Thanks for registering online with BikeReg.com!

    -Steve Roszko

    Pioneer Registration Services, LLC
    Sport Specific Online Event Registration Services
    www.BikeReg.com <http://www.BikeReg.com>
    www.SkiReg.com <http://www.SkiReg.com>
    www.RunReg.com <http://www.RunReg.com>
    www.PioneerReg.com <http://www.PioneerReg.com>
    Steve Roszko, Oct 22, 2003
    #1
    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. Andrew Shitov

    How to access a network share folder?

    Andrew Shitov, Sep 13, 2004, in forum: ASP .Net
    Replies:
    9
    Views:
    22,991
    GrantMagic
    Sep 13, 2004
  2. Scott Nicholson

    using Access database on network share?

    Scott Nicholson, Nov 5, 2004, in forum: ASP .Net
    Replies:
    4
    Views:
    7,093
    Steve C. Orr [MVP, MCSD]
    Nov 6, 2004
  3. Yuriy Galanter

    Access network share from ASP.NET

    Yuriy Galanter, Mar 10, 2008, in forum: ASP .Net
    Replies:
    4
    Views:
    1,865
  4. Jerry C
    Replies:
    5
    Views:
    734
    Alexey Smirnov
    Apr 24, 2008
  5. Saraswati lakki
    Replies:
    0
    Views:
    1,287
    Saraswati lakki
    Jan 6, 2012
Loading...

Share This Page