Re: WINSOCK Question.



mk:@MSITStore:C:\Program%20Files\Microsoft%20Visual%20Studio\MSDN98\98VSa\1033\vbcon98.chm::/Html/vbconusinginternettransfercontrol.htm

The help file shows the following browser command line:

"h ttp : / /www.yippee.com/cgi-bin/find.exe?find=Hangzhou"

Which would be encoded as follows for the ITC:

Dim strURL As String, strFormData As String
strURL = "//www.yippee.com/cgi-bin/find.exe"
strFormData = "find=Hangzhou"
Inet1.Execute strURL, "POST", strFormData

This again indicates that the POST command is doing the same
thing that the HTML POST command does.

It sends the command to the server, the server then starts
processing the command based upon what the server sees
and knows. The .asp code on the server-side then processes
the request according to the rules and such as known to the
server.

So in the case above, you'd be connecting to an executable
which then could present an HTML document back to the
client. It's the .asp code or the PERL or the ColdFusion
code on the server that interprets what's to get done with
the file.

So much for the list of commands I was looking for. It's all
server-side processing of what comes after the ? in the http
www.connecttoserver.com/cgi-bin/appname.pl? string.

And the help file continues on:

"If you are expecting a result back from a server (as in the
example above), you must use the GetChunk method to
retrieve the resulting HTML document."

So if you are trying to connect to the server and send
a file to the server, right now, the only way I'm seeing
this getting this done is to connect through FTP and use
the appropriate FTP SEND command to copy the file from
the client to the IIS.

I imagine if the file is a text file, it could be read, placed into
the clipboard on the client side (assuming that the ITC
control is on the client side) then pasted into strData via
code. This might be workable with binary code as well:

BF:filesize:data string:EOF

The server would read the BF: (via .asp encoding or what
not), then start processing the information accordingly. If you
need to know what the file size is, you could encode it as a
number in the above string between the ":". You could always
encode the string using Hex function for each character in the
data file and then decode it once it gets back to the server.

Am I following along correctly now? I think I'm pretty close
now. Forget about what I mentioned in my last babbling.
Some of the stuff there was a little offbase and typed out
wrong.

--
Jim Carlock
Please post replies to newsgroup.

"Jim Carlock" <anonymous@localhost> wrote:
If you have MSDN installed or the help files from VB6:

mk:@MSITStore:C:\Program%20Files\Microsoft%20Visual%20Studio\MSDN98\98VSa\1033\inet98.chm::/html/vbobjinternetcontrol.htm

mk:@MSITStore:C:\Program%20Files\Microsoft%20Visual%20Studio\MSDN98\98VSa\1033\inet98.chm::/html/vbmthinetexecutemethod.htm

>From the information in two different places:

"Using the HTTP protocol, you can connect to World Wide Web servers to
retrieve HTML documents. With the FTP protocol, you can log on to FTP
servers to download and upload files."

Some of the examples they provide a demonstration of using a SEND
command (for FTP). I see their list of HTTP commands, ie:

object.Execute url, operation, data, requestHeaders

GET Retrieve data from the URL specified in the URL property.
HEAD Sends the Request headers.
POST Posts data to the server. The data is located in the data
argument. This is an alternate method to GET, for which additional
instructions are specified in the data argument.
PUT Put operation. The name of the page to be replaced is located
in the data argument.

The "data" argument when used with POST holds "additional" commands
for the IIS server to operate with.

I'm throwing stuff up as I'm seeing it inside of the Microsoft docs and
what not. Maybe you'll see something or a flag will be tripped.

One other thing, is that the IIS server itself might be handling the
errors itself. IF that is an HTML POST or PUT, then I would
think the server starts processing the command LOCALIZED to
the server rather than the remote host. The html POST and PUT
are typically used inside of <form> tags, along with <input> tags,
as specified by server side code (.asp/perl). So I think what's
happening, is that the server gets the list of commands, in the
"data" argument and then starts operating on the list of commands.

So that means there's another list of commands that the server is
working with. I've seen the FILE:// attribute used to indicate that
a particular file is to be operated on. I don't know what that list
of commands would be called right off the top of my head...
but I'm thinking along these lines:

sData = "SEND FILE://pathtofile/file.txt"

You'll see events in the Server Events maybe, depending upon how
the IIS server is configured, rather than errors being presented in the
client side server.

Those are my thoughts of what's going on. I could be way off base,
so think of it as a stab in the dark. I myself, would like to know what
the "list of commands" are called for the server side operations of the
POST command.

--
Jim Carlock
Please post replies to newsgroup.

"Wiley Coyote" <wiley@xxxxxxxxxxxxx> wrote:
Jim, I am trying to SEND a file to IIS using the Internet Transfer Control
PUT method.

I get no errors, but nothing is deposited onto the server. strPostData is
the data extracted from the Birnay Read (prior code).

Wiley.

"Jim Carlock" <anonymous@localhost> wrote in message
news:eE2KXQ%23NFHA.3336@xxxxxxxxxxxxxxxxxxxxxxx
> Not sure if your talking about an html <input / submit "POST"
> as opposed to a "PUT" command, if so, you might want to try
> the file:// attribute on the front of the file path, as it looks like
> you are trying to send a file.
>
> --
> Jim Carlock
> Please post replies to newsgroup.
>
> "Jim Carlock" wrote:
> Port 80 is the http port that all websites are sent over when a
> browser sends a GET command to it.
>
> Once you establish a connection you need to send the GET command
> with a couple other things...
>
> The link below shows how to use WinSock to connect successfully
> and grab a webpage from an http server.
> http://www.vbip.com/winsock/winsock_http_02_01.asp
>
> Hope that helps.
>
> --
> Jim Carlock
> Please post replies to newsgroup.
>
> "Wiley Coyote" <newbie@xxxxxxxxxxxxx> wrote in message
> news:eAoYy47NFHA.2736@xxxxxxxxxxxxxxxxxxxxxxx
> I have a VB app that Up and Downloads files from an IIS server. The
> download
> works great (using ITC). As I could not get ITC to post to the server, I
> decided to use winsock.
>
> I successfully create a connection to the server (winsock1.state = 7)
> that's
> all good. However, when I try to use the SENDDATA method, my laptop Beeps,
> then everything justs hangs.
>
> Here is a snippet of code:
> StartClock
> MsgBox ("State: " & wsUpload.State)
> wsUpload.SendData strPostData
> DoEvents
> blnConnected = wsUpload.State
> MsgBox (blnConnected)
>
> RemotePort is 80 (i.e. IIS default port). No security (NTFS etc) issues as
> this is on my laptop.
>
> Does anyone have any ideas as to what is gone goofy? Do I need to run a
> Server Side app that listens for and responds to my Winsock app?
>
> Alternatively, if somone could tell my why the POST method of ITC isn't
> working that would helpful as well.
>
> Here is code snippet from the ITC test app:
> .Execute , "PUT ", "c:\temp\return.htm"
>
> Thanks in advance.
>
> :)
> Wiley
>
>
>
>




.



Relevant Pages

  • Re: dcdiag - advertising errors on newley promoted domain controller
    ... Can you do the following on uksccmads01 ... The problem may actually have nothing to do with the new server but the ... From a command prompt try and see if you get any additional info ... Skipping site UK-CCM, this site is outside the scope ...
    (microsoft.public.windows.server.active_directory)
  • Re: dcdiag - advertising errors on newley promoted domain controller
    ... Can you do the following on uksccmads01 ... The problem may actually have nothing to do with the new server but the ... Active Directory Forest Replication GUIDs Found: ... From a command prompt try and see if you get any additional info ...
    (microsoft.public.windows.server.active_directory)
  • Re: dcdiag - advertising errors on newley promoted domain controller
    ... Default Server: uksccmads01.jw-uk.jameswalker.co.uk ... Output from dnslint on uksccmads01: No erros found, ... Active Directory Forest Replication GUIDs Found: ... From a command prompt try and see if you get any additional info ...
    (microsoft.public.windows.server.active_directory)
  • Re: dcdiag - advertising errors on newley promoted domain controller
    ... Both forward and reverse zones and server records have the correct IP ... Once you have found the error then on both servers, from a command ... Skipping site UK-CCM, this site is outside the scope provided ...
    (microsoft.public.windows.server.active_directory)
  • Re: dcdiag - advertising errors on newley promoted domain controller
    ... Both forward and reverse zones and server records have the correct IP ... Once you have found the error then on both servers, from a command prompt, ... Skipping site UK-CCM, this site is outside the scope provided by ...
    (microsoft.public.windows.server.active_directory)