Click here to Skip to main content
13,085,936 members (89,667 online)
Rate this:
Please Sign up or sign in to vote.
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

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 = "\\\DocFolder\"
Set Upload = New FreeASPUpload

I already mapped the folder \\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 
ServerShare = "\\\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 = "\\\DocFolder\"
Set Upload = New FreeASPUpload

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
Updated 4-Feb-13 4:28am
ryanb31 4-Feb-13 14:47pm
Something about this is familiar from many year ago. Try using a mapped drive.
Mark Abriel Benedicto 6-Feb-13 9:55am
I already tried that. Mapped drive didn't work.
jhez25 8-Mar-13 21:30pm
click this links..
lailac88 21-Mar-13 21:49pm
there is some tips here--

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web04 | 2.8.170813.1 | Last Updated 6 Feb 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100