Interacting betweens web application and console application
-
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!
-
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!
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
-
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
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 :)
-
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 :)
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
-
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
-
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
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!
-
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!
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.
-
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.