Solved

How to invoke activx/DLL that can create HTTPS posting wait reply type of applicaitons

Posted on 2006-06-10
4
282 Views
Last Modified: 2010-05-18
I have need to write an applicaitons that will runs on my 2003 NT servers. that will communicate with another external web site.  that accept https posting a commnad string... (following their format), then it will respond a message (in certain format).

The requirement of my program will

1. run continusously in the OS (no users interfaces).
2. it listen to request from a MSMQ, when there is a request.  it will
    a. format the request into a string.
    b. Open the winsocket with given IP address of remote web site,
       (I hope I use the right terms here)
    c. write the request string/message to that port.
   d.  wait for response from remote web site.
       d-1.  if no response within x seconds (time out),  it will drop the
               socket connect. do something else.
       d-2. get response.  drop the socket connection, return the message to
             requestor to MS-message queue.

    repeat step 2.  until a new request read with "stop".  it will then quiet.

This is very similar to 3 tier applications.  I just wondering

1. What tools, or sample code that you knows that support this type of situations?
2. IS vb6 better or vb.net better to use

I also know this type of things can be done in the ASP, but that require users
presence.   My requiredment does not need User presense.

I am looking for your input and advise.  sample code with example will be very helpful.

regards,

mshox1
0
Comment
Question by:mshox1
  • 2
  • 2
4 Comments
 
LVL 1

Expert Comment

by:ronklein
ID: 16882429
Hi there,

If I understand you correctly, the terminology is as follows:
1. Windows service, that runs constantly.
2. The service polls the MSMQ for its messages, and transfers (parses) them into an inner format.
3. After a successful parsing, the service invokes a web request (https protocol), using a timeout wrapping.
4. The response from the web request is parsed into an inner format.
5. The parsed result is sent into the MSMQ.

Implementing all these is very easy using the dot net framework. Therefore, vb.net is by far a better implementation.
Some reasons:
1. Writing a system (Windows) service in VB6 is almost impossible. In vb.net you have a very nice project template for such thing.
2. In the dot net framework (version 2.0), you can easily create a class and parse it from / convert it to XML format (or binary format) using the default, out-of-the-box utilities that come with the framework.
3. There are some classes the deal with networking in the dot net frameworks that simplify the whole process of a web request. Furthermore, you can easily implement a timeout using an asynchronous handles so that the executing code uses a non-blocking thread that simply waits for the response from the web server.

In other words, work with dot net, and save a lot of development time...
0
 

Author Comment

by:mshox1
ID: 16882770
thank you very much for your advise.

do you know any sample codes of vb.net in the way you just described.  it seems the exact things I need.   In other words, I am looking ways to get me a quick start and shortest learning curve on this.   I used to use another platform for this sort of things,
the way you describe the .net framework 2.0 seems familer or me.  

thanks
0
 
LVL 1

Accepted Solution

by:
ronklein earned 500 total points
ID: 16886570
Hi again,

FOA, thanks for the feedback. I'm glad that my reply was useful.
As requested, here are a few links and ideas to get you started.
* 101 vb.net code examples, including: Windows service, MSMQ, Web requests (or services), multi-threading. It is THE jump-start:
http://msdn.microsoft.com/vbasic/downloads/code/101samples/

* Creating a Windows service is quite simple. The Visual Studio 2005 provides a template for such project. If you want to learn more:
http://www.developerfusion.co.uk/show/3441/2/

* Connecting to MSMQ - Try the follownig:
http://www.w3coder.com/vbnet/intromsmq.aspx

* A Web request is done using the object "HttpWebRequest", found in System.Net. You can find an example in the "101 examples" or here:
http://www.w3coder.com/ws/HttpWebRequest.aspx

Cheers,

Ron
0
 

Author Comment

by:mshox1
ID: 16886656
That is excellent.  I will follow up on this.  thank again.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question