Solved

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

Posted on 2006-06-10
4
280 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

911 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now