|
You can implement a "hearbeat" functionality:
An application is waiting for a hearbeat signal from your application and alarms if the heartbeat does not come after a certain time. Your application has then to create this heartbeat signal regularly (maybe in the working thread). The heartbeat signal can be a pipe or socket connection or something like that.
Hope that helps.
Greets
Roland
|
|
|
|
|
hi,
i am hearing this thing first time. How ? Where ? i start working on this new idea (for me)
**************************
S r e e j i t h N a i r
**************************
|
|
|
|
|
Sorry, but i haven't any Code that I can give to you, but I try to explain you the mechanism a little bit more specific.
The idea is to have a TCP/IP Connection between the Application thats needed to be observed (lets call it "Application A") and the Application that will observe Application A and create an alarm (Application B).
One application should be an "server" (create a socket and start listening) while the other should be the "client" (create a socket and connect to the server). When the connection between the two applications is established, you can send periodically (ex. all 10 seconds) messages from Application A to Application B (ex. "alive"). When Application B does not get an "alive" message 20 seconds after the last "alive" message, Application B should create an alarm, stop and restart Application A or do something else.
If you haven't worked with sockets under C# have a look at the various articles here on codeproject.
Hope you will get with this information a step further.
Greets
Roland
|
|
|
|
|
here nothing like two application.
My doubt is how i will know once my application is under "Not responding mode". I have only one application
**************************
S r e e j i t h N a i r
**************************
|
|
|
|
|
|
ha ha ..
So. Suppose if i am writing some service which will monitor my application status at regular interval.
**************************
S r e e j i t h N a i r
**************************
|
|
|
|
|
That was the idea my responses ... (The service will be "Application B")
Sorry for being not clear enough.
Greets
Roland
|
|
|
|
|
hi,
thanks a lot for your responce. And i will try my level best to do something.
**************************
S r e e j i t h N a i r
**************************
|
|
|
|
|
An application is marked as "not responding" if it's not processing windows messages for a given time.
This can occur because your main (GUI-)thread is performing a long-running action.
In that case you _can_ do something like monitor your application.
First step would be to fork out the possibly not responding functionality to a separate thread that can be monitored and aborted if it hasn't finished in a given time.
Regards,
mav
|
|
|
|
|
hi
mav.northwind wrote
An application is marked as "not responding" if it's not processing windows messages for a given time
What you mean by Marking ?
See i can't long running process. Cause it is pulrly depend on users who is using this s/w. If i want to mark then i need to mark all.
If i wrote some service then upto how much extend i will help me?
I am not at all good in service but still i can manage.
**************************
S r e e j i t h N a i r
**************************
|
|
|
|
|
I meant the TaskManager showing an application as "not responding".
Or are you talking about a different sort of "not responding"? 
|
|
|
|
|
hi,
Did you read the entire thred related to this heading ?
I will tell i want to know if my dotnet application is "not responding state". For that purpose what we can do is, we can write a paraell service which will monitor my application on a regular interval.
I am not that much good in Service. But still i can manage.
What is your idea ? Any better idea than this or can i go for a service. Is so which service i want to write.
**************************
S r e e j i t h N a i r
**************************
|
|
|
|
|
Yes, I read the thread, and I think you want to find out _within_ your application why it is not responding. So the core question is: What is your application doing while it's "not responding"? What steps are causing your application not to respond?
If you can identify these actions then you can execute them in a separate thread, so that your application itself will no longer hang, only this specific thread, so there'd be no need for a separate monitoring service.
mav
|
|
|
|
|
If you are still interested in this topic:
I've wrote an article about the Topic.
Greets
Roland
|
|
|
|
|
Hello,
When i deploy a Smart Device Application on my real PocketPc the application starts when in the output window of my VS.NET the statement Launching Application appears. But how can i stop the application again? do i only have to close the window of the Smart Device Application? because sometimes when i want to deploy the Smart Device Application again an error occurs on the PocketPc that the application have to be derminate bevor, although i have closed the window on the PocketPc...??
thx
mat
|
|
|
|
|
You have to close the emulator. Closing the window of an application does not stop the process (except in a few, specially programmed applications). Programs continue to run when they're not visible. For debugging, if you like, you could add an extra menu item that actually quits the application as opposed to closing the window. There is a big difference.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles]
|
|
|
|
|
Forgetting the discussions about whether a user should be allowed to, how can the user enter a null value in a cell?
If a row has null values on display it appears as "(null)" (or whatever you set the "null text" column property to) but after a user enters a value, how can they choose to replace the value with a null ?
TIA
PeteB
PeteB
I wouldn't say "he's not the sharpest knife",
I'd say "he's a spoon."
|
|
|
|
|
DataTable St=new DataTable("St");
St.DataColumn(new DataColumn("Name",typeof(String)));
St.DataColumn(new DataColumn("Sex",typeof(String)));
foreach(DataColumn Clm in St..Columns)
Clm.DefaultValue=System.DbNull.Value;
//this will create a table with two data column and assign default value null.
If you want to format the datd displayed in datagrid you need to go for DatagridTableStyle Class.
DataGridTableStyle DcStyle=new DataGridTableStyle();
foreach(DataColumn dc in St.Column)
{
DataGridTextBoxColumn textColumn=new DataGridTextBoxColumn();
textColumn.MappingName= dc.ColumnName;
textColumn.HeaderText = dc.Caption;
textColumn.NullText="";
}
textColumn.ReadOnly = true;
DcStyle.GridColumnStyles.Add(textColumn);
}
For more informations and formatting using DatagridTableStyle
**************************
S r e e j i t h N a i r
**************************
|
|
|
|
|
The problem isn't how to allow them to enter null data but what key combination, etc. do they need to press?
In one of the data view apps (Query Analyzer?) you press Ctrl-0 to enter a null value but what do you press in a .Net DataGrid???
PeteB
I wouldn't say "he's not the sharpest knife",
I'd say "he's a spoon."
|
|
|
|
|
I am import cordebug.tlb using tlbimp and add to References in project on C#.
Then i am create a instance CORDBLib.CorDebug and call SetManagedCallback(ManagedClass).
ManagedClass is my class inheritance from IManagedCallback.
Then i am call CorDebug.CreateProcess(.....).
But function on my class ManagedCallback (LoadClass, UnloadClass, CreateProcess and e.t.c) are not called.
In what a problem?
Best regards,
Sergey
|
|
|
|
|
i wan't to do a final project at the last year in me univercity and i don't have any idea, please help me to find a new idea.
thanks alot
baha saleh
|
|
|
|
|
baha saleh wrote:
please help me to find a new idea.
Well, what are you interested in? What are you considering as a carear choice when you leave? Are there any areas of research that you would find fun? What areas of software development do you enjoy?
Perhaps if you answer these questions the answer might come to you. If not, answering them here may allow people to propose reasonable ideas for you to think about.
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
Not getting the response you want from a question asked in an online forum: How to Ask Questions the Smart Way!
|
|
|
|
|
Wow, here's a tough one for the gurus out there. I have a C# application that works wonderfully. However, I'd like to determine on a web page whether or not the user has it installed or not.
I have tried mime types, but they don't always work for some reason. I was thinking about code signing a VB6 ocx, but Windows XP SP2 blocks all the ocx's now? Or is there a way around THAT one. And even if I DID do that, do I code sign the ocx THEN package/deploy it into the setup?
WOW... HELP!?!??
|
|
|
|
|
It would be simpler if the client informs the server when it is run first time, maybe to a database or through a web service.
cool man
|
|
|
|
|
I'm not sure I understand your response... what I'm trying to do, is detect on a webpage if the client has installed this rich client application or not. If yes, proceed to a different area. If no, proceed to download page.
|
|
|
|