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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Winsock - VB6 web server on Win2K

Status
Not open for further replies.

jacksonmacd

Programmer
Aug 24, 2001
18
CA
Using the book "High Performance Visual Basic 5 Web Development" by Scott Jarol as the basis to develop a VB6 web server using the Winsock control.

Essentially, I use the Winsock1_ConnectionRequest and Winsock1_DataArrival events to control the program flow. Works great on my Windows 98 development machine, but continually bungs up on its eventual home, a Win2K server. With IE 5 browser, it continually returns the standard "Can't display that page". Under Netscape browser, it says "network connection was dropped by peer". Sometimes, either browser causes a VB error, which I trap in the program and return an "error occurred" page. Arghhhh....

Placed debugging statements in the two events so they log their activity into a text file. I've debugged it to the point where I am convinced that the DataArrival event sometimes fires BEFORE the ConnectionRequest event. That shouldn't ever happen. ConnectionRequest should always precede DataArrival. When the program susequently tries to send some bytws via a socket that hasn't been requested yet, it generates an error that I can trap.

Can anybody shed any light on the subject? What's started out as an interesting learning project has turned into a nightmare!!!

Thx.

 
Need more detail. For example, is IIS installed on Win2K and using the same port (80) that your VB program is trying to serve on?

You ARE using BIND to serve the port right? So that your program becomes the only program that listens on that port?

Do your web pages have any graphics in them? Anything at all (external stylesheets, etc.) besides the HTML page itself? Browsers will attempt parallel connections to a server (more than one port open) to obtain all the page components - usually only 2 to 3 though.

Just some random thoughts.

You might also check out TCPTap for debugging homebrew IP servers - though the beta that's posted right now handles only one connection at a time. Saves me a lot of debugging code to monitor the sequence of events and traffic over TCP ports though!
Esepcially invaluable to me for EBCDIC mainframe connections, but you won't need that feature.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top