Login  
Search All Forums
Dart Home | PowerTCP Web Enterprise for ActiveX | Custom Development Reply | PowerTCP Web Enterprise for ActiveX Topics | Forums   
AuthorForum: PowerTCP Web Enterprise for ActiveX
Topic: Error code 405 while posting a simple file....
karthiksp

From: West Palm Beach, FL USA
Posts: 60
Member Since: 08/04/05
posted November 9, 2006 5:16 PM

Hi All,

   I am checking the postfile functionality to post a simple file in our website. I am always getting status code = 405 at the end of code and the file is not uploaded in the site.

 Following is the command that I used to post a simple file. Application is Powerbuilder 10.5

ole_webasp.Object.Request.Url = "http://www.test.com"
ole_webasp.Object.Request.Username = "XXXX"
ole_webasp.Object.Request.Password = "YYYYY"

OLEOBJECT OLE_DartStreams
OLEOBJECT OLE_DartStream

OLE_DartStreams = Create OLEOBJECT
OLE_DartStreams.ConnectToNewObject("Dart.DartStreams")
OLE_DartStream = Create OLEOBJECT
OLE_DartStream.ConnectToNewObject("Dart.DartStream")

OLE_DartStream.FileName = "c:\upload.txt"
OLE_DartStream.Ref = "file1"

OLE_DartStreams.Add(OLE_DartStream)

ole_webasp.Object.Request.FilesToPost(OLE_DartStreams)
ole_webasp.Object.Post()
ole_webasp.Object.Response.Status()

always the last line return code 405.


Could someone tell me what am I doing wrong in the above code.

Appreciate any kind of small hint.

Thanks
Karthik
Amit

From: Rome, NY USA
Posts: 315
Member Since: 03/15/06
posted November 10, 2006 5:45 PM

Hello,

If the server returns 405, then it means that the method is known by the origin server but not allowed for the requested resource. I would suggest you to take a look at the URL as when posting you have to post to a specific page.

Thanks,
Amit
karthiksp

From: West Palm Beach, FL USA
Posts: 60
Member Since: 08/04/05
posted November 13, 2006 1:55 PM

Hi Amit,

   Thanks for the reply. My question is If I want to post a file directly to the root of the site lets say http://www.test.com then how will I post the file.

  Could you please explain to me.

Thanks
Karthik
Raj

From: Rome, NY, USA
Posts: 389
Member Since: 02/01/06
posted November 14, 2006 12:33 PM

You post files to pages, and then it is upto the page, to save the incoming files where it wants.

So, you will be posting files only to pages, which accepts file. And if you want the incoming files to be saved on a particular folder your page needs to handle this.

I hope this addresses your inquiries.

Regards,
Raj
Reply | PowerTCP Web Enterprise for ActiveX Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX