I am developing a C# Windows Application which will run with MySQL backend. I want to have a server application running on the server to do few server tasks. It will be great if my server application will also check the license for me which means it should be running all the time as service or actually running on system tray.
But how can I make sure the application is always running and if not then user won't be able to connect to the server? so the client will do the check for example? or any other idea!
Where is your problem?
The client application contacts your LicenseServer during its start. Windows Service is a good choice for that server application; there are options for re-starting a windows service if it happened to crash. If the client does not get a connection to the server, or the server does not issue a license to it, have it showing an error message and quit. You may also set a timer (on the client) to check for the license every few minutes and stop it if no license can be retrieved.
For client-server communication, there are several options like WCF or .Net Remoting.
What "time" are you talking about? Be specific.
If you are saying that time to execute the application will be longer after splitting, then when you create two exe's your application will be two, and will be launched separately ? isn't it?
And time will hardly matter in this case.
Do not forget to comment and rate the article if it helped you by any means.
Are your 'seniors' developers or managers. If they are developers then ask them to explain the business reason why they need to be in 2 exe's. If they are managers then you need to explain the design is invalid and they should leave the design to the architect or the developer.
Never underestimate the power of human stupidity
My direct senior is a senior developer.
Actually our project deals with hospital patients and their orders.
In first form patient will be displayed according to their category.
When a particular patient is clicked His/Her order form should be displayed.
Its already developed.
The clients abroad asked to separate Exe's to make Main EXE free from Order EXE else if any errors happens the main EXE should not be corrupted.
That's an X-Y-Problem. As usual. There is a problem, someone has an idea of how to tackle it, and experiences a problem on that way - now the question is how to continue that way.
Instead of the correct question: what does the customer really need, and - next (nto same!) question - how can that be accomplished. A totally common problem in requirements engineering....
I'm not familiar with ABAP at all and I'm trying to automate a SAP report for my job.
At the momment I gotta open SAP (manually of course), login, call the transaction, add some parameters to it, execute it and download the first report. After that I have to work it around (thing that I already automate, so it's not a problem) but then I have to get some other parameters from it and call another transaction to execute with the new parameters that I got from the first report... And so on 2 more times.
My problem is that, after automating all the excel related stuff with C#, I can't find a way to interact with SAP R/3 to login, call the transaction, execute with the parameters and get the report.
Can somebody give me a hint about this?
I googled for a couple of hours and all I found out is that I may have to work with RFC's and BAPI's but I still can't figure out how to do it nor how to use these properly (if I'm right that I have to)
first time poster.
I have been programming for quite a while (and used code project quite a lot) but have so far avoided to use XML files.
Now I have to and while I can parse the data, and read values, it still escapes me how XML is the new, so easy way to store ans retrieve data.
I have a XML structure that basically contains a list of files on a hard drive and while I can imagine all kinds of complicated loops to list all paths and files in a list box, I cannot find an easy way to accomplish that.
(I which I could upload an image of the structure
so here it is a code.
The length of the path (Contained folder) is totally arbitrary of course:
XML really wasn't designed to be a database if that's what you mean by "store and retrieve data". It's more intended for the formatting, serialization, transmission and transformation of data. It just so happens that XML is a text format that happens to be very easily stored on any storage medium.
In any case, I think your schema could be laid out a bit better. Such as:
A better option would be to skip trying to worry about the details of the XML file and worry more about your class definitions that can be serialized into an XML file. That way you can just build an object graph with the data you're tracking and then just send it to the XmlSerializer and it'll create the XML file for you.
The same serializer can be used to reconstitute the graph from the XML data it wrote.
This is driving me nuts.
Besides my first structure containing "drive" information, I also have a registry content XML file.
I thought I'd just apply some analogy and it sort of works but for some reason I do not seem to be able to dig deeper into the structure than <value> but I would like to get the value of <action>, <type> and <content> (inside if <value> too.
The problem with your second method is that your <Value>, <Key> and <RootKey> elements don't contain an element called "Contents". That means that you'll get the value from the <Contents> element under the <Data> element, and an empty string for each ancestor element.
If you just want to append the value from the <Contents> element to the path, then use: