IIS Server - HTTP PUT Method and IIS

This is Interesting: Free IT Magazines  
Home > Archive > IIS Server > February 2004 > HTTP PUT Method and IIS





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author HTTP PUT Method and IIS
Ron Sochanski

2004-02-25, 5:34 pm

Hello. To make use of the HTTP PUT method on IIS, do I need to configure or install anything special?

Thank you.

Ron Sochanski
Net Mongrel

2004-02-26, 4:34 am

Ron Sochanski wrote:
> To make use of the HTTP PUT method on IIS, do I need to
> configure or install anything special?


Nope, but you will need a script to read/manipulate the data.

--
Net


Ron Sochanski

2004-02-26, 9:34 am


----- Net Mongrel wrote: -----

Ron Sochanski wrote:
> To make use of the HTTP PUT method on IIS, do I need to
> configure or install anything special?


Nope, but you will need a script to read/manipulate the data.

--
Net

Thanks for responding!

Could you please provide (i.e., point me in the direction of) such a script (for reading/manipulating HTTP PUT data)?

Thank you.

Ron Sochanski

Net Mongrel

2004-02-26, 10:34 am

Ron Sochanski wrote:
> ----- Net Mongrel wrote: -----
>
> Ron Sochanski wrote:
>
> Nope, but you will need a script to read/manipulate the data.
>
> Thanks for responding!
>
> Could you please provide (i.e., point me in the direction of) such a
> script (for reading/manipulating HTTP PUT data)?


That all depends on what you're trying to achieve, but to test your form is
sending meaningful data:

<%
dim x
For each x in Request.Form
Response.Write x & " = " & Request.Form(x) & "<br>"
Next
%>

e&oe

--
Net


Ron Sochanski

2004-02-26, 11:34 am

I've been attempting to use HttpSendRequest in a VB6 application to perform an HTTP PUT to a Windows 2000 Server Web server (IIS 5.0). The code looks something like:

Public Declare Function HttpOpenRequest Lib "wininet.dll" Alias "HttpOpenRequestA" (ByVal hConnect As Long, ByVal sVerb As String, ByVal sObjectName As String, ByVal sVersion As String, ByVal sReferer As String, ByVal sAcceptTypes As String, ByVal lFlags
As Long, ByVal lContext As Long) As Long

Public Declare Function HttpSendRequest Lib "wininet.dll" Alias "HttpSendRequestA" (ByVal hRequest As Long, ByVal sHeaders As String, ByVal lHeadersLength As Long, ByVal sOptional As String, ByVal lOptionalLength As Long) As Integer
..
..
..

hHTTPOpenRequestHandle = HttpOpenRequest(hInternetConnectHandle, "PUT", "/test.txt", sVersion, sReferrer, sAcceptTypes, lFlagsHttpOpenRequest, lContextHttpOpenRequest)

iHttpSendRequestEx = HttpSendRequest(hHTTPOpenRequestHandle, "", 0, "Test_string", Len("Test_string"))

When I run this code, HttpSendRequest returns TRUE as desired, indicating (I believe) that the request was sent to the Web server machine. But the file test.txt does not get written to the machine! What am I doing wrong? Please help or advise where I m
ight find help.

Thank you.

Ron Sochanski


Net Mongrel

2004-02-26, 2:34 pm

Ron Sochanski wrote:
> I've been attempting to use HttpSendRequest in a VB6 application
> ...
> Please help or advise where I might find help.


a vb6 newsgroup would seem to be favourite.

my server carries news:comp.lang.visual.basic which looks promising. I
suspect there are several on the microsoft news servers.

--
Net


Ron Sochanski

2004-02-26, 5:34 pm

Please allow me to step away from the coding aspects of my problem for a moment.

I used the program "wfetch" (version 1.2) to attempt to perform an HTTP PUT to a virtual directory on the target Web server. This directory does not permit anonymous access but does permit reads & writes. I do not have a certificate on the server.

Using Basic authentication, I get a "401 Access Denied message" from the server. Using NTLM authentication, I get a "501 Not Supported" message. I feel, thus, that the machine is not configured properly for HTTP PUT.

Any thoughts?

Thank you.

Ron Sochanski

Net Mongrel

2004-02-26, 6:34 pm

Ron Sochanski wrote:
> Please allow me to step away from the coding aspects of my problem
> for a moment.
>
> I used the program "wfetch" (version 1.2) to attempt to perform an
> HTTP PUT to a virtual directory on the target Web server. This
> directory does not permit anonymous access but does permit reads &
> writes. I do not have a certificate on the server.
>
> Using Basic authentication, I get a "401 Access Denied message" from
> the server. Using NTLM authentication, I get a "501 Not Supported"
> message. I feel, thus, that the machine is not configured properly
> for HTTP PUT.
>
> Any thoughts?


yep - stop making it hard on yourself.

allow anonymous access and place two files on the server. The first
containing a simple HTML form with at least one input element and a submit
button - which when submitted sends the data to the second page which is an
asp page that contains the trivial script to display the data.

Is this a public server? Does it have a URL?

--
Net


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com