I am working on a project which consists of a web server (xampp) running on a Windows XP machine. The web server receives a stream from our hosting company when a customer requests a product drawing. A php program converts the stream to a text file which one of my VB.NET program senses using FileSystemWatcher and takes the appropriate actions. When the VB.NET program is completed it sends an html stream back to the hosting company to let them know the files are ready for pickup. Here is that code:
After the hosting company receives the stream they send another stream back which says if everything is ok or if there was a problem. Now, my challenge is that while this xampp webserver is running ok, it has certain problems, like if some a$$hole in the IT dept reboots the Windows XP machine, which they seem to do all the time. The xampp program does not always restart on boot or even on login like it's supposed to. In fact, most of the time it doesn't restart at all and I have to manually restart it. Now the question is why did we do it this way...because it was the only way the guys in the IT dept knew how to.
My question: Is there a method by which when the confirmation stream is returned by the hosting company a VB.NET program could intercept this stream instead of letting it go to the web server. In fact, I'd like to get the xampp program, or IIS if the move it over to a Windows Server, out of the way all together and just use VB.NET to handle the whole thing. Any suggestions for improvement on this process will be welcomed.
Code:
Sub Send2HostingCo()
Dim strResponse As String = "http://my_clients_url.com/client_folder/my_phpscript.php?id=" & _
Form1.UniqueIDNum & "&loc=http://xxx.xxx.xxx.xxx:177/out/" & Form1.UniqueIDNum & ".zip"
Dim myRequest As WebRequest = WebRequest.Create(strResponse)
' Return the response.
Dim myResponse As WebResponse = myRequest.GetResponse()
Dim ResponseText As String
Dim myStreamReader As StreamReader
myStreamReader = New StreamReader(myResponse.GetResponseStream())
ResponseText = myStreamReader.ReadToEnd
' Close the response to free resources.
myResponse.Close()
End SubMy question: Is there a method by which when the confirmation stream is returned by the hosting company a VB.NET program could intercept this stream instead of letting it go to the web server. In fact, I'd like to get the xampp program, or IIS if the move it over to a Windows Server, out of the way all together and just use VB.NET to handle the whole thing. Any suggestions for improvement on this process will be welcomed.