Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2006-06-10
4
Medium Priority
?
285 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 2000 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

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…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…
Suggested Courses

688 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