Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ASP VBScript FTP filepath , +
I'm using vbscript in asp classic. I also used the FreeASPUpload class.. I want to upload file not in local, but to a server using its IP address as path..
 
Here is the code working if i will upload in local..
Dim uploadsDirVar
uploadsDirVar = Server.MapPath("../temp/")
 
Set Upload = New FreeASPUpload
Upload.Save(uploadsDirVar)
But i want to upload it in a path with an ip address.. Below are the codes I tried but its resulting in HTTP 500 Internal Server Error..
Dim uploadsDirVar
uploadsDirVar = "\\123.45.6.789\DocFolder\"
 
Set Upload = New FreeASPUpload
Upload.Save(uploadsDirVar)
I already mapped the folder \123.45.6.789\DocFolder\ in my local because of the login. I also tried codes with credentials but still same error.. See below:
Dim ServerShare 
Dim UserName 
Dim Password 
Dim NetworkObject 
Dim FSO
 
ServerShare = "\\123.45.6.789\DocFolder\"
UserName = "domain\username"
Password = "password"
 
Set NetworkObject = CreateObject("WScript.Network")
Set FSO = CreateObject("Scripting.FileSystemObject")
 
NetworkObject.MapNetworkDrive "", ServerShare, False, UserName, Password
 
Dim uploadsDirVar
uploadsDirVar = "\\123.45.6.789\DocFolder\"
 
Set Upload = New FreeASPUpload
Upload.Save(uploadsDirVar)
Still same result.. Can anyone help? I'm new in asp classic and vbscript especially in uploading of files and also its behavior. thanks
Posted 4-Feb-13 4:20am
Edited 4-Feb-13 4:28am
v2
Comments
ryanb31 at 4-Feb-13 14:47pm
   
Something about this is familiar from many year ago. Try using a mapped drive.
Mark Abriel Benedicto at 6-Feb-13 9:55am
   
I already tried that. Mapped drive didn't work.
jhez25 at 8-Mar-13 21:30pm
   
click this links..
http://stackoverflow.com/questions/14688762/how-to-upload-file-in-external-ip-address-vbscript
lailac88 at 21-Mar-13 21:49pm
   
there is some tips here--http://www.tek-tips.com/faqs.cfm?fid=1869

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 324
1 Maciej Los 224
2 Sergey Alexandrovich Kryukov 182
3 Richard MacCutchan 120
4 CPallini 120
0 OriginalGriff 5,474
1 Sergey Alexandrovich Kryukov 4,713
2 Peter Leow 2,944
3 DamithSL 2,465
4 Maciej Los 2,434


Advertise | Privacy | Mobile
Web01 | 2.8.140718.1 | Last Updated 6 Feb 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid