Drive Mapping

Author Message
LoneRegister

  • Total Posts : 2
  • Scores: 0
  • Reward points : 0
  • Joined: 1/4/2008
  • Status: offline
Drive Mapping Friday, January 04, 2008 8:44 AM (permalink)
0
I am having an interesting issue.

I have the following code:

   'We've uploaded the picture - now copy it to the 123 directories across our servers
   'Now copy the source to the other systems cache folders
      On Error resume next
          objNetwork.RemoveNetworkDrive "L:"
          objNetwork.RemoveNetworkDrive "M:"
          objNetwork.RemoveNetworkDrive "N:"
      on error goto 0

       objNetwork.MapNetworkDrive "L:", "\\WEBa1\123", false
       objNetwork.MapNetworkDrive "M:", "\\WEBa2\123", false
       objNetwork.MapNetworkDrive "N:", "\\WEBa3\123", false

       Set filesys = CreateObject("Scripting.FileSystemObject")
     
       filesys.CopyFile strFolder & FileName, "L:\" & FileName, true
       filesys.CopyFile strFolder & FileName, "M:\" & FileName, true
       filesys.CopyFile strFolder & FileName, "N:\" & FileName, true
      
       filesys.deletefile strFolder & FileName, true
      
       objNetwork.RemoveNetworkDrive "L:"
       objNetwork.RemoveNetworkDrive "M:"
       objNetwork.RemoveNetworkDrive "N:"

If I set our system IIS to AspExecuteInMTA = "1" - the above code fails

If I set our system IIS to AspExecuteInMTA = "0" - The above code works.

I need our system to run with AspExecuteInMTA = "1" as the perfomance benefits are huge.  Anyone have suggestions or comments on how I could do the network copies successfully?

Kevin
 
#1
    webber123456

    • Total Posts : 58
    • Scores: 0
    • Reward points : 0
    • Joined: 9/20/2007
    • Status: offline
    RE: Drive Mapping Saturday, January 05, 2008 6:16 AM (permalink)
    0
    This is not ASP code. 

    ASP has nothing to do with removing network drives as that would be a security risk. 

    I suspect that is your problem.


     
    #2
      LoneRegister

      • Total Posts : 2
      • Scores: 0
      • Reward points : 0
      • Joined: 1/4/2008
      • Status: offline
      RE: Drive Mapping Monday, January 07, 2008 5:30 AM (permalink)
      0
      The error is

      "Path not found" on the line:

      filesys.CopyFile strFolder & FileName, "L:\" & FileName, true


      If I set our system IIS to AspExecuteInMTA = "1" - the above code fails

      If I set our system IIS to AspExecuteInMTA = "0" - The above code works.

      Does anyone have any idea why the AspExecuteInMTA would cause this kind of problem?



       
      #3

        Online Bookmarks Sharing: Share/Bookmark

        Jump to:

        Current active users

        There are 0 members and 1 guests.

        Icon Legend and Permission

        • New Messages
        • No New Messages
        • Hot Topic w/ New Messages
        • Hot Topic w/o New Messages
        • Locked w/ New Messages
        • Locked w/o New Messages
        • Read Message
        • Post New Thread
        • Reply to message
        • Post New Poll
        • Submit Vote
        • Post reward post
        • Delete my own posts
        • Delete my own threads
        • Rate post

        2000-2012 ASPPlayground.NET Forum Version 3.9