|
Ajay Kewale wrote: I want to write a program in c# on server machine to find out at what time user logged in , logged out
That information can be obtained by browsing the EventLog[^]. Provided that you have the appropriate rights within your network to do so.
Ajay Kewale wrote: what was the total data uploaded/downloaded by user
That's going to be trickier. Most applications don't tell Windows how much they download, so you'd have to dive a level deeper. Perhaps you can use the Firewall API[^] to do so.
Ajay Kewale wrote: what are the software installed or uninstalled by user
The easiest way is to write a small daemon that makes a list of the installed applications[^] when the session starts, make a second list when the session ends, and compare them. Any modification, even individual service packs, will be listed. There should be entries like;
"Update for Microsoft Visual Studio Web Authoring Component (KB945140)"
The hard way is to write a Windows-service, looking for various installer-processes. Either way, you won't find any PortableApps[^] with these methods.
Ajay Kewale wrote: for 5 clients , IP will be provided and the program should return 5 log files (one per client machine) giving details for the above mentioned parameters.
Aw, so without installing any code on the clients at all? You can read the Registry remotely to obtain the list of applications, again, if you have sufficient rights on your domain. I doubt however that the amount of transmitted data can be remotely retrieved.
I are Troll
|
|
|
|
|
Hi,
I have a desktop application which takes photos and upload to a web server. I am using HttpWebRequest and HttpWebResponse classes to make request and get response. I am showing progressbar on the UI to show upload process. Everything is working fine. But since I am getting the status, when one file gets uploaded completely, my progressbar looks frozen, till the complete file upload.
var responseFromServer = ServiceRequest.GetResponsePhoto("AddPhotos", "ServiceInstances", photoToUpload, serviceInstanceID.ToString());
var response = responseFromServer.Deserialize<Dictionary<string, object>>();
bool success = (bool)response["success"];
ServiceRequest class takes care of making a request and getting response from server.
HttpWebResponse.GetResponseStream method gives response for the complete upload of one file. I want to know if there is any way I could able to know intermediate upload steps which I can show on the progressbar which makes UI more interactive.
Any help or any sample will be greatly appreciated.
Veena
|
|
|
|
|
This[^] is for download but you may be able to use for upload also.
only two letters away from being an asset
|
|
|
|
|
Nope. Not using what you have now. Since all of the code blocks until the transaction is complete and none of the methods reports at status information, you'd have to scrap all of your upload code and rewrite it to do this yourself. Even the Async methods don't report status, but they will allow you to keep your form responsive while the upload is going on.
|
|
|
|
|
Thanks Mark and Dave,
Mark, I think the link is not going to help, since I am uploading to the server, I have no way to find out how much data is uploaded to the server in intermediate state.
Thanks anyway,
Veena
|
|
|
|
|
Hi friends.
I've put an UnboundString field in footer (Section4) of a Crystal Report.
I'm gonna fill it with a summary of Section3, but I don't know how I can access it in C# !
Could you please guide me , how I can access it ?
Thanks in advance.
|
|
|
|
|
Is it possible to play a video file on a specific area on the form using code code without placing a control to contain the video file?
any C# example plz?
Thanks..
|
|
|
|
|
You would need a control that has the ability to play the video...
|
|
|
|
|
I want to know your advise plz..
I have a software and I don't want use to be able to use it once downloading it so I though of having an activation process first..
what do you think?
and what's the best way to do it using C#?
and how to make sure another person who will download the same software won't be able to use using an activation code givento another customer?
|
|
|
|
|
There is no fool-proof way to ensure security in the manner you are talking about.
The best way, based off what you say is communication to a database to ensure that an activation code hasn't been used more then once, but then you limit your software in the regards that a host computer must have an internet connection to activate the software.
Then you would also have to check consistently if the activation code is correct for each use of the application.
What if a client does not have an activation code?
And you're ignoring that all .Net applications compile to MSIL, which isn't that hard to go through using Reflector. If you build in an algorithm to generate an activation code, if determined enough a user might be able to generate his own activation codes.
|
|
|
|
|
This question has been asked and answered so many times in this forum that it is impossible to believe that you have even tried to search for an answer.
Do not be so lazy! Do your own research.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
How can I customize the Crystal Reports Viewer statusbar to have some other controls on it, e.g. comboxbox, calendar, etc..
|
|
|
|
|
By doing some research for yourself.
Try Googling crystal reports viewer statusbar
This site is really not the place to try to get a cheap tutorial in how to program. Do your research, try for yourself and then, and only then, ask here with specific problems, showing what you have tried and what and where the error is.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Is it possile to use the data MDF file on the client when distributing my software installing the SQL Server on the client machine? just like a stand-alone database file?
|
|
|
|
|
No, you can't. What's going to read/write the data in the file then? At a minimum, you'd have to use SQL Server Express Edition.
|
|
|
|
|
I have a (Daily Report) shown on Crystal Report Viewer and I want when the user right click anywhere on the viewer to display a popup calendar so user will select another day to view its report?
|
|
|
|
|
I want to know where can I get a step by step tutorial or samles on how to create and connect crystal reports with SQL Server 2005 at run time and pass the codethrough stored procedures?
|
|
|
|
|
Hallo, I am working with Threads and I Know the main Rule telling that no one Control created with one Thread can be accessed by other Thread, I also know that this is not an absolute rule and it can be solved, but my question is:
- This Error for crossed threads affects only to Controls or also affects to variables, methods, Lists and objects, or I Can share those objects between threads without any problem, and only with Controls I am going to have a problem.
Please answer me in the way Error sharing Variables Yes/No ...
Regards
|
|
|
|
|
FJJCENTU wrote: I also know that this is not an absolute rule
I don't agree. It is absolute, Controls are not thread-safe.
FJJCENTU wrote: it can be solved
Yes, using Control.InvokeRequired and Control.Invoke; and not in any other way.
FJJCENTU wrote: affects only Controls?
No all data that is going to be read/written by several threads at once must be protected; use thread synchronization stuff such as locks, mutexes, etc.
Luc Pattyn
Have a look at my entry for the lean-and-mean competition; please provide comments, feedback, discussion, and don’t forget to vote for it! Thank you.
Local announcement (Antwerp region): Lange Wapper? Neen!
|
|
|
|
|
OK I understand, please only two questions more:
1) I am using ThreadPool for doing a repetitive job
in the way WaitCallBack WCK = new WaitCallBack(Method1);
ThreadPool.QueueWorkItem(WCK, List1);
Question: is needed that Method1 be Synchronized ?
2) If The Method1 call a Synchronized Method, and this second method call a third Method is needed that the third method be also synchronized ?
regards
|
|
|
|
|
FJJCENTU wrote: is needed that Method1 be Synchronized ?
Methods don't need to be synchronized, accesses to shared data should.
As I said: all data that is going to be read/written by several threads at once must be protected
Here is a simple example of how things CAN and eventually WILL go wrong:
List<int> power1=new List<int>();
List<int> power2=new List<int>();
public void Add(int x) {
power1.Add(x);
power2.Add(x*x);
}
Then two threads are created that generate random numbers x and call Add, hoping to obtain a list of numbers, and in parallel a list of their squares. Everything will run fine; suddenly the operating system will decide to temporarily halt thread 1 (which was at point A), and resume thread 2.
So the lists will contain
power1 a b c x1 x2 ...
power2 a*a b*b c*c x2*x2 ...
and it is only when thread1 becomes active again that x1*x1 gets added to list power2.
The solution could be like this:
object powerLock=new object();
public void Add(int x) {
lock(powerLock) {
power1.Add(x);
power2.Add(x*x);
}
}
so whenever some thread is inside the critical region protected by powerLock, no other thread needing the data protected by powerLock can but in.
FJJCENTU wrote: a third Method is needed...
as I said, it is not methods that get protected, it is data. And the example should make that clear.
Luc Pattyn
Have a look at my entry for the lean-and-mean competition; please provide comments, feedback, discussion, and don’t forget to vote for it! Thank you.
Local announcement (Antwerp region): Lange Wapper? Neen!
|
|
|
|
|
I know how to build a dynamic array and initilize the array. This is not my problem. That part of my code is working just fine and there is to much code to change the logic. So using the consepts of dynamic arrays... I run into a issue. I know it is simple but I can not find information about it.
The issue is this... If my sql statement returns to results the array is not built. Which cause the applciation to error. Is there a way with out throwing a lot of try catch's in my code to do something like
x = DynamicArray.Length
And if the array was not initialized for it to return a numeric value of -1 instead of it erroring saying the array is not initialized?
|
|
|
|
|
Do you mean something like
x = DynamicArray == null ? -1 : DynamicArray.Length;
?
|
|
|
|
|
Quite possibly but I don't understand what the statement is doing exactly. THe '?' and everything after how does that work in c# language?
I am guessing essentially what the statement is saying is:
x = -1 if the dynamic array is null by placeing the -1 value in to the Dynamic array as a result when it is called.
If this is the case I see many examples I could use this functionality. Is there something I can read or you could explain so I can adapt that to future logic?
|
|
|
|
|
x = DynamicArray == null ? -1 : DynamicArray.Length;
is just an alternate (shorter) syntax for:
if (DynamicArray == null) x = -1; else x = DynamicArray.Length;
|
|
|
|