Map a shared drive

Last post 08-27-2008 8:21 PM by Bruce L. 1 replies.

Sort Posts:

  • Map a shared drive

    08-27-2008, 4:26 PM
    • Participant
      1,631 point Participant
    • pithhelmet
    • Member since 07-20-2002, 8:31 PM
    • Posts 388

    Hi everyone -

    Crazy question here...

     

    I am running server 2008 with iis 7.0

    ASP.NET with vb.net codebehind

     

    I am trying to execute a batch file that resides on a network share.

    I know my code works to execute a batch file from a physical drive attached to my system (i.e. c:\)

     But the same command fails when i try to access the network share directory.

    My assumptions are that the Z: drive is not being seen by the web server.

     

    Do i need to map the drive for the user context that that runs the web server under??  If so - what user is it???

     

    thanks in advance!!

     

    take care

    tony

     

  • Re: Map a shared drive

    08-27-2008, 8:21 PM
    Answer
    • Star
      11,278 point Star
    • Bruce L
    • Member since 02-08-2007, 1:53 PM
    • Posts 1,895

    I don't think you can use a mapped drive because the aspnet user isn't logged on interactively.  You can consider using the network path instead, eg. \\server\sharename

    Bruce
    DiscountASP.NET - ASP.NET Hosting Experts
    Voted 2009 "Best ASP.NET Hosting" by asp.netPRO Magazine
    Win2008/IIS7.0, ASP.NET 2.0/3.5 SP1, MVC, AJAX, Silverlight, SQL 2008/2005
Page 1 of 1 (2 items)