Click here to Skip to main content
15,892,161 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi people if anyone can help me i am running a helpdesk website in a big infrastucture. just added a uploading files function. the website runs on a server pc and im trying to upload the files from the website users to a differnt server pc but i keep on getting a permission denied error can anyone help me please

dim CallID,lConn,UserQuery,objcmd4,sqlText,intrecords
callID = session("ACallID")
Dim uploadsDirVar
uploadsDirVar="\\spmrfnp1\Attachments\"& CallID &""
Dim myFSO
'Initialize myFSO as a file system object
SET myFSO = Server.CreateObject("Scripting.FileSystemObject")

'If the folder does not already exist then create the folder
If NOT myFSO.FolderExists("\\spmrfnp1\Attachments\"& CallID &"") Then
myFSO.CreateFolder("\\spmrfnp1\Attachments\"& CallID &"")
Set lConn = Server.CreateObject("ADODB.CONNECTION")
lConn.Open "Provider=sqloledb;Data Source=AIWPH2CWESSELS;User Id=GCLS;Password=GCLSMGR;Initial Catalog=GCLS"
Set objCmd4 = Server.CreateObject ("ADODB.Command")
SQLText = "insert into [GCLS].dbo.Attachments (CallID,FolderURL) values ('"&CallID&"','"&UploadsDirVar&"')"
objCmd4.ActiveConnection = lconn
objCmd4.CommandType = &H0001
objCmd4.CommandText = SQLText
objCmd4.Execute intRecords
Set objCmd4 = Nothing
lconn.close
End If

and i know asp.net is 10000000 times better im in the process to take the website over to asp.net but they want this to be ready by end of the week
and i didnt create the website only got it to edit it

and the servers is on the same network and same domain
Posted
Updated 4-Jan-10 20:28pm
v2

1 solution

ASP is, obviously, an utter disaster. ASP.NET is 1000 times better. However, if you're copying files between servers, it's impossible to help based on what you said. Are the servers on the same network ? Are you using FTP ? What does your code look like ? Please edit your post and add some code so we can help you fix it.

OK, so the files are on the same network. So you don't have a code issue, you have a permissions issue between the two computers.
 
Share this answer
 
v2

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900