Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to copy file from one to another machine through asp

Status
Not open for further replies.

2314

Programmer
Joined
May 19, 2001
Messages
69
Location
IN
Dim Cfile As New Scripting.FileSystemObject
Dim str As String
Copyfile = "Success..."
On Error GoTo err:
Cfile.Copyfile "\\venus\c\geeta\test.doc", "\\prime\c-prime\", True
Set Cfile = Nothing
err:
If err.Number <> 0 Then
Copyfile = &quot;error : &quot; + err.Description + CStr(err.Number)
End If
Set Cfile = Nothing



this is vb code which works properly copies file test.doc from machine venus to machine prime

But when i call the same in ASP either by VB dll or directly using filesystemobjcet it gives error Permission denied


Can anybody help?

 
Those folders have the right permissions to be able to read form one and write to the other? A+, MCP, CCNA
marbinpr@hotmail.com

Keep fighting for your knowledge!

 
ya it works well when i call from vb app
 
The problem is when you run it from VB it runs with the logged on user rights. When you run it from a web site it runs with the default website user, something like IWAM_SERVERNAME which has very limited rights.
 
CoolClark must be right, maybe you have to include in your code the use of a different username(seesion) than the default one (IWAm...) A+, MCP, CCNA
marbinpr@hotmail.com

Keep fighting for your knowledge!

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top