|
Hi all.
I want to get all the network activity data in Resouce Monitor use C#.
Anyone can tell me, How I can do it.
I really need some help. Hope someone can help me.
|
|
|
|
|
|
Thank for your reply.
I already read all but not yet find answer.
|
|
|
|
|
I don't think you have read them all. For example A Network Sniffer in C#[^] offers at least a starting point for you to build on.
|
|
|
|
|
|
Thank for your reply.
But I have to write a application to get all the network activity data in Resouce Monitor not use tools.
|
|
|
|
|
hello,
First of all i am beginner in programming.
I have a problem with saving appointments in ms sql db.
Do you have any idea how can i write own DB logic and answer the events. I refer to Project of Ertan Tike dayview calendar control.
All my efforts are unsuccessful.
Thank you in advance
|
|
|
|
|
There's a forum at the end of the article[^]. You should ask your question there.
|
|
|
|
|
Hi and welcome! Without seeing the code I think it will be hard to help you with this. But note that you are using a control from 2006. An excellent control but still things changed a bit since. Adding on top of this (without offending ) that you are a beginner, I am not sure if you want to go into this. I would suggest you try the controls of syncfusion. There is a free community version and good support.
https://www.syncfusion.com/products/communitylicense
good luck!
|
|
|
|
|
Hello Nitzan Levi.
First this link is very useful to me because i didn't know for these controls so only with this you help a lot. The second is that i did not understand how to connnect my own db in their calendar schedule. Could you help me how to do this because i have a similar project in my school. Thank you a lot for your help with syncfusion and sorry for my poor english.
Thank you in advance for your next reply.
|
|
|
|
|
Hi! I'm going mad on this and don't know how to solve it...
I have a class ExecQuery which executes a SQL Script:
public LoadScreen ldScreen = null; //the LoadScreen class
public ExecQuery(ldScreen ld)
{
ldScreen = ld;
}
public void ececute()
{
conn = new SqlConnection(conString);
server = new Server(new ServerConnection(conn));
server.ConnectionContext.ExecuteNonQuery(script); //script is my textfile
}
Now while this executes I'm showing a loading screen with a cancel button. When I hit the button I call an event in my LoadScreen class:
private void cancel_Click(object sender, EventArgs e)
{
ExecQuery exec = new ExecQuery(this);
if (InvokeRequired)
{
BeginInvoke(new MethodInvoker(delegate() { exec.cancelProcess(); }));
}
else
{
exec.cancelProcess();
}
}
This takes me right back to my ExecQuery class and to the method:
public void cancelProcess()
{
server.ConnectionContext.Cancel();
}
where I get a NullReference Exception because server is null. I know why this happens. I shouldn't make that instance of the ExecQuery class at one point but I don't know how to solve this. I tried workarounds and nothing works.
How to get the server variable from the loading screen (which opens before the server variable gets a value)?
|
|
|
|
|
Why not just check the server variable, and if it is null take a different path?
|
|
|
|
|
What a different path? I need to access the connection to cancel it.
|
|
|
|
|
Well I don't know how all your code is put together, so you need to work it out for yourself. If the server variable has not been set, then what else can you do to cancel the connection?
|
|
|
|
|
Create both connection and server object before you start the thread, and pass them as arguments to the new thread. This way you'll have a reference to both objects. Either lock the object or synchronize before accessing it.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
I have an windows form application with multiple forms. If I open two of these forms in a runtime, I receive this error:
An unhandled exception of type 'System.AccessViolationException' occurred in Unknown Module.
Additional information: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
If there is a handler for this exception, the program may be safely continued.
The idea is that I don't have any programs that consume so much memory and this error occurs only after I introduced in script a background worker. It can cause this problem?
|
|
|
|
|
OutOfMemory probably wouldn't cause this. But you know the drill, debug it. What exactly causes it (not circumstances, but specific action being executed in code)? Does it still happen if the work that the background worker does is executed on the main thread?
|
|
|
|
|
Dear Friends,
I have doubt in TPL. When I'm Trying To Break Down List into Multiple List and Save This Data into Single Table With the Use Of TPL. Then It Generate Error: Database is Already Use.
How I manage This Database Connection because All the Element Of List Have Use Connection .
In My Sql Server only 4 connection have been open at same Time and TPL maxParallelism=4 Set by Me.
Please Suggest me Guys How can i Manage It
|
|
|
|
|
Without seeing the code you're talking about it's pretty much impossible to tell you what's going on.
|
|
|
|
|
Open your connection before you enter the Task, save the data using this single connection and then close the connection once the Task has completed.
|
|
|
|
|
Hi,
Really need help and guidance.
I need to pull data from server if there is available data, it shouldn't interrupt users action while data is being pulled.
Scenario:
Login to connect
Pull data if available
once complete, process
wait for the next data..
I tried different approach but failed. New to asynchronous
1. The link below is working but failed and timeout expired in the middle.
https://msdn.microsoft.com/en-us/library/bew39x2a(v=vs.110).aspx[^]
It's eating all my time.
Really Appreciate
Dabsukol
|
|
|
|
|
This sounds like an ideal job for Rx. If I were you, that's the avenue I would explore.
|
|
|
|
|
A very simple one would be to create a task and run it,
Task.Run(async () =>
{
});
Otherwise, you can always consider using asynchronous programming model[^]. In which you create methods, functions with async modifiers and then use the awaits to continue processing until the work (job, whatever) has been done.
public async void getData(){
app.IntVariable = await server.GetDataAsync();
}
Also, since the error is Time out I would suggest that you configure your server also. There may be a problem with that, Timeout would occur regardless of async or sync programming being used.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
dabuskol wrote: it shouldn't interrupt users action while data is being pulled. What kind of app is it? WinForms, WPF, web, mobile?
/ravi
|
|
|
|
|
It is a window service. It will run in the background and pull data from the server then save to the databse.
My Client program will read the updated value from DB
Dabsukol
|
|
|
|