Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Interacting betweens web application and console application

Interacting betweens web application and console application

Scheduled Pinned Locked Moved ASP.NET
game-devquestion
8 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    Blue_Skye
    wrote on last edited by
    #1

    Hi, i am doing a project about stock game. I have a web application let user sell order or buy order stock and a console that check if the time now is on time to process and take out price. Is there anyway to let the console app ask the web app for halting some web pages (order web page,...) while it's processing and then give a message to web app that the process finished to let those web pages work again? Thanks!

    G 1 Reply Last reply
    0
    • B Blue_Skye

      Hi, i am doing a project about stock game. I have a web application let user sell order or buy order stock and a console that check if the time now is on time to process and take out price. Is there anyway to let the console app ask the web app for halting some web pages (order web page,...) while it's processing and then give a message to web app that the process finished to let those web pages work again? Thanks!

      G Offline
      G Offline
      gnjunge
      wrote on last edited by
      #2

      Try using webservices. The console app will send the webservice some kind of command "stop page1 page2" or something like that, the webservice puts this in the application object. Everytime a page loads it will check the application object to see whether it is allowed to be shown. After the update is done, the console app will send the webservice a new command "play" or something like that, and the webservice will empty the application object and that's it. Just gave you a general outline, maybe you don't want to use the app object but modules (in VB.NET) or it's C# alternative. And probably you want the webservice to be a bit more advanced, than simply a command string. Hope this gives you a direction. Gidon

      B 1 Reply Last reply
      0
      • G gnjunge

        Try using webservices. The console app will send the webservice some kind of command "stop page1 page2" or something like that, the webservice puts this in the application object. Everytime a page loads it will check the application object to see whether it is allowed to be shown. After the update is done, the console app will send the webservice a new command "play" or something like that, and the webservice will empty the application object and that's it. Just gave you a general outline, maybe you don't want to use the app object but modules (in VB.NET) or it's C# alternative. And probably you want the webservice to be a bit more advanced, than simply a command string. Hope this gives you a direction. Gidon

        B Offline
        B Offline
        Blue_Skye
        wrote on last edited by
        #3

        I think that this should be the best solution for my project. I haven't known anything about web service yet so i think i should read some articles for more information... By the way, do you know any good article about webservice? Thanks you very much. Your help is very important to me :)

        G 1 Reply Last reply
        0
        • B Blue_Skye

          I think that this should be the best solution for my project. I haven't known anything about web service yet so i think i should read some articles for more information... By the way, do you know any good article about webservice? Thanks you very much. Your help is very important to me :)

          G Offline
          G Offline
          gnjunge
          wrote on last edited by
          #4

          First of all, Webservices are not so difficult to make, don't worry. I just did a quick search on the internet for articles, and I found two articles, one describes the creating of a ASP.net webservice, and the other one how to consume (invoke) one from a windows app. Since i did only a quick search, i am sure that there are more and maybe better articles out there. Creating a webservice: http://www.oreilly.com/catalog/prognetws/chapter/ch02.html[^] Consuming a webservice: http://www.codeproject.com/cs/webservices/cpwebserviceconsumer.asp[^] If you need any more help, let me know. Gidon

          B 2 Replies Last reply
          0
          • G gnjunge

            First of all, Webservices are not so difficult to make, don't worry. I just did a quick search on the internet for articles, and I found two articles, one describes the creating of a ASP.net webservice, and the other one how to consume (invoke) one from a windows app. Since i did only a quick search, i am sure that there are more and maybe better articles out there. Creating a webservice: http://www.oreilly.com/catalog/prognetws/chapter/ch02.html[^] Consuming a webservice: http://www.codeproject.com/cs/webservices/cpwebserviceconsumer.asp[^] If you need any more help, let me know. Gidon

            B Offline
            B Offline
            Blue_Skye
            wrote on last edited by
            #5

            Thanks!I greatly appreciate your kindness :)

            1 Reply Last reply
            0
            • G gnjunge

              First of all, Webservices are not so difficult to make, don't worry. I just did a quick search on the internet for articles, and I found two articles, one describes the creating of a ASP.net webservice, and the other one how to consume (invoke) one from a windows app. Since i did only a quick search, i am sure that there are more and maybe better articles out there. Creating a webservice: http://www.oreilly.com/catalog/prognetws/chapter/ch02.html[^] Consuming a webservice: http://www.codeproject.com/cs/webservices/cpwebserviceconsumer.asp[^] If you need any more help, let me know. Gidon

              B Offline
              B Offline
              Blue_Skye
              wrote on last edited by
              #6

              Hi, i've found that webservice are object and method that can be invoked (and i think that it must be invoked) from client over HTTP. In case of my console app, i want it autostart when start up server and run on background all the time (check if now is on time. If it's, the console will call a function...). Does WebService work in this situation? Waiting your reply. Thanks!

              G 1 Reply Last reply
              0
              • B Blue_Skye

                Hi, i've found that webservice are object and method that can be invoked (and i think that it must be invoked) from client over HTTP. In case of my console app, i want it autostart when start up server and run on background all the time (check if now is on time. If it's, the console will call a function...). Does WebService work in this situation? Waiting your reply. Thanks!

                G Offline
                G Offline
                gnjunge
                wrote on last edited by
                #7

                Yep you are right abouth the object story. Webservice act just like object with methods, and I see no reason why it cannot be invoked from a program running in the background. Btw you don't have to create a console app, what you are looking for is a Windows Service (that is the same Services that you will find under control panel -> administrative tools -> services). You will find some good articles about how to create a Windows Service in .NET by googling for ".net windows service" Hope this helps.

                B 1 Reply Last reply
                0
                • G gnjunge

                  Yep you are right abouth the object story. Webservice act just like object with methods, and I see no reason why it cannot be invoked from a program running in the background. Btw you don't have to create a console app, what you are looking for is a Windows Service (that is the same Services that you will find under control panel -> administrative tools -> services). You will find some good articles about how to create a Windows Service in .NET by googling for ".net windows service" Hope this helps.

                  B Offline
                  B Offline
                  Blue_Skye
                  wrote on last edited by
                  #8

                  I've just found some articles about Windows Service. I thinks this will help. Thanks your help! :)

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups