| Dart Home | PowerTCP Web for ActiveX | Custom Development | Reply | PowerTCP Web for ActiveX Topics | Forums |
| Author | Forum: PowerTCP Web for ActiveX Topic: Is this correct |
| computeronsite From: Calgary, AB Canada Posts: 45 Member Since: 06/12/02 |
posted August 7, 2006 8:58 PM Using the trial version of the Web Tool was just wondering why i cant get it to complete On Error GoTo OnError ' use intrinsic error handling Dim Result As String Http1.Timeout = 60000 'give it up to 60 seconds Http1.Url = "http://www.somewebsite.com/Avatars" Http1.Version = "HTTP/1.1" Http1.Put "c:\Me.jpg", , Result, , "user", "free" Debug.Print Result Exit Sub OnError: ' Any error jumps here Debug.Print "Error #" + CStr(Err.Number) + ": " + Err.Description The error i get is: </HEAD><BODY> <H1>Forbidden</H1> You don't have permission to access /Avatars on this server.<P> <P>Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request. </BODY></HTML> Now i have added a password for the Avatars folder and can access it via a web browser.Just wondered what im doing wrong. BTW the website "Somewebsite" isnt the actual website |
| Raj From: Rome, NY, USA Posts: 389 Member Since: 02/01/06 |
posted August 8, 2006 2:12 PM The response that you are getting from the server simply shows that access is denied to the Avatars folder. I will need access to your website and the folder, to look further into the issue. Please email the web address, and login credentials to support@dart.com, with same subject as for this thread. Regards, Raj |
| Raj From: Rome, NY, USA Posts: 389 Member Since: 02/01/06 |
posted August 8, 2006 3:51 PM Here is some more info that might help: Hardly any servers permit PUTs. Usually, to upload files, you must use POST. Please try this, if this does not help, I will need access to your website, as stated in my previous post. Thanks, Raj |
| computeronsite From: Calgary, AB Canada Posts: 45 Member Since: 06/12/02 |
posted August 8, 2006 6:54 PM Okay i used the Post method and get a different error. This time i tried posting to the main domain www.somewebsite.com instead of a folder. <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <HTML><HEAD> <TITLE>405 Method Not Allowed</TITLE> </HEAD><BODY> <H1>Method Not Allowed</H1> The requested method POST is not allowed for the URL /index.htm.<P> </BODY></HTML> I just wondering if the code im using is the correct way and also if this is something i have to modify on my website or in the code? Im using Cpanel 10.8.2 and wonder if i have to change something there. Thanks |
| computeronsite From: Calgary, AB Canada Posts: 45 Member Since: 06/12/02 |
posted August 9, 2006 8:56 PM Okay i tried some suggestions. I renamed index.htm to index.html I am getting somewhere but not sure what the new Result means <BODY> <H1>Index of /Home/Avatars</H1> <PRE><IMG SRC="/icons/blank.gif" ALT=" "> <A HREF="?N=D">Name</A> <A HREF="?M=A">Last modified</A> <A HREF="?S=A">Size</A> <A HREF="?D=A">Description</A> <HR> <IMG SRC="/icons/back.gif" ALT="[DIR]"> <A HREF="/Home/">Parent Directory</A> 09-Aug-2006 20:16 - </PRE><HR> </BODY></HTML> The file Me.jpg doesnt show up on the website. I was wondering if i am using the code correctly The samples only show how to post data but not files. Does the Post command allow taking a file from the hard drive directly or does it have to be loaded into an array? If so can you give me the example to how i would send a file from the hard drive. I know i could FTP this file however if i buy the Web Control for downloading files it would be nice to use it for uploading as well. |
| Raj From: Rome, NY, USA Posts: 389 Member Since: 02/01/06 |
posted August 10, 2006 1:01 PM I think you are hitting a directory Listing Page. 1) Do you have rights for writing into the directory? 2) Do you have permission to upload files? 3) Does the webpage accept files? 4) Can IE Browser upload files using through the webPage? If yes, you might want to try a packet sniffer (for example, Ethereal) to see the structure of the message being sent out. Unfortunately, the WebControl will not upload files itself. You need to format the message and the headers, making its structure same as that of the IE. you may refer our sample (MultiPartPost) that demonstrates how to construct a multipart message, which is required when uploading files with POST. Thanks, Raj |
| Reply | PowerTCP Web for ActiveX Topics | Forums |
This site is powered by
PowerTCP WebServer for ActiveX
|