473,378 Members | 1,395 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

C# executable with ASP.NET webpage to monitor status

84
Hi Guys,
I am working on a new project to provide some kind of monitor on a webpage. Basically i have a c# application which does task A, B....X, Y, Z.

Now we would like to view what task it is doing / state in a web page and maybe trigger something in the application to stop all it is doing and do task T and then continue etc. Can someone guide me in the right direction?

Thanks in advance.
Apr 6 '10 #1
6 2886
jkmyoung
2,057 Expert 2GB
Is task T interconnected to tasks A,B,C, ... Y, Z in resources, memory, other?
It may be better to let the given task finish, and run process T before the next task completes.

1. Are you making the monitor responsible for calling each task after the next one is done, or is a pure monitor thus far?
2. You will have to code each of your tasks so that it is interruptable, and can be resumed. Depending on the complexity of your tasks, you may even have to temporarily roll-back, causing you to have to "Save State" at the beginning of some of the tasks, and when it is interrupted.
3. Have your monitor send a interrupt message to the target tasks thread, causing an InterruptedException. The handler for the task should catch this error, and determine why the Exception was sent. You will need to handle special cases such as the Thread finishing before the Exception is processed.

This is a wide-reaching question and greatly depends on the complexity of your system and what you're doing with it.
Apr 6 '10 #2
alag20
84
Thanks for your quick reply. All the tasks are mutually exclusive so it doesnt make a difference. The basic thing I would like to know to start with is if I have an exe and ASP.Net page, how can i communicate from ASP.NET to exe and get status?
Apr 6 '10 #3
jkmyoung
2,057 Expert 2GB
Since the monitor appears to be completely seperate from your tasks, you need to build in a method to contact the tasks within each task itself, eg some sort of monitor. Otherwise, it's not really easy to pause a task as then you could interfere with any random program's execution.
Possible methods include: communication on some port, implementing a FileSystemWatcher, etc.

Honestly, the systems I've worked with have had the monitor controlling the start and stop of tasks, so that the code overhead of being able to pause tasks was on the monitor itself.
Apr 6 '10 #4
alag20
84
How about if i simplify it to say that the webpage will trigger each task. Next task can only be triggered once the previous task is completed. So keeping this in mind, what would be the best way to communicate between the webpage and the exe?

Can you possibly give some sample code?

Thanks in advance.
Apr 7 '10 #5
alag20
84
Please help!!!! Any idea??
Apr 8 '10 #6
jkmyoung
2,057 Expert 2GB
Probably Windows messaging http://ryanfarley.com/blog/archive/2004/05/10/605.aspx

Sockets may be useful if you're monitoring from a machine seperate from the machine running the processes.

It's somewhat hard to find code for this.
Apr 8 '10 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Danny Jensen | last post by:
I need to test if certain processes on a unix box were running. I wanted to use whatsup gold to do the testing. First I needed to go to the whatsup configure>monitors & services menu to add this...
2
by: Mike | last post by:
Hellos again, I seem to be having a weird issue. Whenever DB2 Health monitor seems to run, all connections to the database seem to just lock up. For example: (and this seems consistent) In list...
3
by: t2581 | last post by:
Hi, we are daily restore db "PRICE" with rollforward from server A into PRICE on server B Usually we restore from backup with timestamp of ~ 02:00 AM and applying logs till 7 AM (30-50...
1
by: Admin East | last post by:
I want to create an application which monitor other applications status. It is same as Windows Task Manager's Application Tab. Status would be RUNNING or NOT RESPONDING. Thanks.
3
by: maxim iulian | last post by:
I want to create o program in C# that's monitor IIS server. Thank's a lot ! Maxim Iulian *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get...
3
by: AndersBj | last post by:
Is there a way to monitor a windows service using asp.net? I would like to have a web page listing 5-6 services and their status (running, stopped etc). Any tips on how to do this would be...
7
by: Dave | last post by:
Is there a way to query the monitor status, to know if it is on or off in C#? I found that WM_SYSCOMMAND is sent to WndProc when the monitor goes on and off but im not sure to find out if that...
0
by: muntyanu | last post by:
Hi All, I need to find out current status of my monitor: is it OFF or ON ? I can set status by SendMessage(handle, WM_SYSCOMMAND, SC_MONITORPOWER, MONITOR_ON) But before setting status I have...
3
by: shorti | last post by:
Hello all, I am running with DB2 UDB V8 on AIX. I am trying to track down what appears to be a lock issue. I turned EVENT MONITOR on with all the options. It doesnt give me the detailed...
3
by: xtoughyx | last post by:
I work for a company which assigns me tasks via their own online portal/webpage which requires a log-in. These tasks are posted very irregularly, and there are frequently long periods in which no...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.