Using Web Service to initiate a socket connection

Discussion in 'ASP.NET 2.0' started by cmctrack, May 15, 2008.

  1. I am pretty much a newbie with respect to webservices, so I am not even sure if what I am trying to do can be accomplished with the site I have at discountasp.net. Any guidance or help would be greatly appreciated.</o:p>
    </o:p>
    I am trying to use a webservice that will initiate a socket connection on a specified port. Basically for testing purposes, I want the application running on local machine to call webservice and pass port number, which would then initiate the server to bind to that port and listen for data packets. Once the server has binded the connection I will have my local application connect to the port and create a socket connection that will allow for data to be passed to local machine. </o:p>
    </o:p>
    The basic idea is that multiple users will be updating files using webservices and I need my local application to be notified immediately when the system has been updated. </o:p>
    </o:p>
    So I guess my questions are, with my service here at discountasp.net, do I have the ability to bind a web application to a port and create a socket connection? If so is there any information you might be able to point me too to help build this. I am familiar with C++, C# and VB.</o:p>
    </o:p>
    Thanks in advance</o:p>
     
  2. You won't be able to open socket connections on the DiscountASP servers to listen to. Our firewall also blocks all incoming connections from non-typical ports (80, 21, 443, etc.).

    I recommend instead to also create a webservice on your local machine. Then have your DiscountASP application call that webservice when an update occurs.

    Aristotle

    DiscountASP.NET
    www.DiscountASP.NET
     
  3. Aristotle,


    I guess this is where my newbie begins to really shine through, how can I go about creating a webservice at a local machine? My application will be running on my laptop, not a server. This seems like a great idea, I just didnt realize something like this was possible. Can you give me any guidance on how to accomplish this? My goal is to have the ability to take my laptop to any location and "log on" to the discountasp.net server and begin to recieve updates as they arrive.
     
  4. Can you point me in a direction to get started working with IIS? Is there a simple project I can do that will get basic functionality down?



    Post Edited (cmctrack) : 5/16/2008 3:34:55 PM GMT
     
  5. You need IIS on your laptop + real IP address +24/24 laptop running, according with your initial post.
    The best solution in my opinion is a desktop application which consume web serviced from DASP. The desktop application should use web services periodically (e.g. every 5 min.)
    Alexei.
    http://www.californiadreamhomesandland.com
     
  6. So let me see if understand and if this is possible. Is it possible to set up an application that will run on my local computer as a web server that will call my discountasp.net server and notify it of my current WAN IP. Then have the discountasp.net server contact my local application using HTTP web service calls.


    My main issue is that I am trying to get away from polling the discountasp.net server to see if a change has been made, I need to be notified intantly if a change has been made, if my laptop is logged into the application. So any way that I can get the instant notification that an update has been made, is what I am looking for. I appreciate any comments and suggestions that you make in helping me try to meet this goal


    Thanks for the help
     
  7. If 5 min is critical for your business then web services on your laptop would not help.
    Alexei.</o:p>
     
  8. Any other suggestions then?
     
  9. Search serious companies which develop time critical application (when one minute means thousands dollars )
    Alexei.</o:p>
     
  10. I have been reviewing the comments and looking at a way to implement the idea of running a local web service, butI had a question. If I have a client running on my laptop, is there a way to have it listen to the incoming HTTP port and take and try to decode any messages that are passed in on this port? Another questionis should this be generalXML over HTTP or should I be looking atSOAP?</o:p>
    </o:p>
    My goal is to have my client application call a web service on the discountasp.net server and give my local IP address and "log in" to the system. Then when the server receives an update it will send an HTTP POST message to my local machine via the IP address I logged in with. This seems to be a viable solution and would allow for the quick response that I require, but where I am having the trouble is how to actually listen to the incoming HTTP traffic and how to direct it to my local application. Any guidance on this would be greatly appreciated.</o:p>
    </o:p>
     
  11. A simpler solution would be to have the web service on the DiscountASP server just email you after an update. You do check your email often, correct?

    Aristotle

    DiscountASP.NET
    www.DiscountASP.NET
     

Share This Page