|
An alternative way would be to put the intended messages in a "message queue" table in your database and the apps can poll the database every minute or so to see if there are new messages in the queue. If there are it will read the relevant data from the table and do what it needs to do.
It's a bit more complex in that each client needs to know if they have executed the message, but you could maybe have each client store the ID or datetime of the last message it processed so it only processes new ones. It won't be instant like TCP but it will be more robust so if a PC is rebooting and the app isn't running, when it starts up it won't have missed any messages.
|
|
|
|
|
I have a Windows service which monitors the main desktop app (running on multiple kiosks 24/7).
The service always runs and monitors the "health" of the app: restarts it if necessary; checks a web server for commands and updates; installs new versions; emails logs; queues commands for the app which it checks / picks up at the end of each customer transaction; etc.
|
|
|
|
|
How to convert photoshop file to winform of C#
|
|
|
|
|
Do you really mean "convert" or do you just want to display the file on a winform?
|
|
|
|
|
What does that even mean? You can't convert a photoshop file to a winform.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
I have created TCP Client/Server application in Visual Studio 2012 using C#.
I have used SSL Stream for authentication.
Can I read/get/store connected client certificate at server(TCP Listener)?
I have created my CLient/Server using MSDN SSL Stream to create my program.
|
|
|
|
|
I have a tool for which I want to apply licensing. I don't have much information on licensing. My tool is no different then Visual Studio. Is there any Licensing tool available for the points mentioned below:
1) User will able to install the Trail version of the basic application.
2) I want two licensing modes. Developers and Release.
Developers license comes with extra bit of features along with basic one. Release license is where I can have control on each release made
by the user i.e where the vendor can charge user for his each release.
|
|
|
|
|
Don't repeat posts: you already have this in QA, so posting it here as well just duplicates work. Pick one, and stick to it.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
Hi,
Currently i'm working on WindowsForms application. In that i have used checkedlistbox to display the display member of combobox column. i need to draw the display member of the combobox column instead of value member, How to change the text of the checkedListBox items.
internal class CheckedListBoxAdv:System.Windows.Forms.CheckedListBox
{
public CheckedListBoxAdv()
:base()
{ }
protected override void OnDrawItem(System.Windows.Forms.DrawItemEventArgs e)
{
if(this.Items.Count > 0)
{
if (excelFilter.displayMemberColList.ContainsKey(this.Items[e.Index].ToString()))
e.Graphics.DrawString(excelFilter.displayMemberColList[this.Items[e.Index].ToString()], Font, Brushes.Black, e.Bounds);
}
}
base.OnDrawItem(e);
}
}
|
|
|
|
|
|
I have a private key and the receiving person has the corresponding public key. I want to encrypt the file with the Private key. But when I do that from command line it is prompting for a pass phrase. But I want to supply the pass phrase from the command prompt. Below is the Command I ma using to Encrypt.
>gpg -s "FileToENcrypt.txt"
Could anyone please help me how to provide the Pass Phrase from Command line while encrypting a file sing Private key.
|
|
|
|
|
What does this have to do with C#?
|
|
|
|
|
|
Hi All,
I have a Cash drawer that connected directly to the PC (POS) by RJ11 Cable, and I need to open this cash drawer from my c# windows application without print and without connect it to the Printer.
Please let me know how to do this and how to work with the rj11 because it is not a Com Port.
I use the C# windows application.
Thank You
|
|
|
|
|
RJ11 is a basically a phone type connector - used for ADSL, telephone, and modem cables etc. You can;t connect that directly to the PC unless it magically is also USB compatible. Which is very unlikely. Even if you can, without knowing how to talk to it, you don't stand much chance at all of getting this working.
So start with the manufacturers - most will have a website and technical support who should be able to help you. But nobody else can!
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
Thank you for your feedback, but do you think we can convert the RJ11 to USB Virtually or we must use a hardware converter?
|
|
|
|
|
Hardware, almost certainly. USB is very different from "normal" RJ11 - but you need to talk to the manufacturers to be certain, as they might just be using the connectors and not the voltages RJ11 cabling normally does.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
I was in the industry in the 90's.
The cash drawer used a telephone line that was RS232, just 6 wires I think.
2/3 and 7 for transmit and receive.
We opened the port and sent several chars to the drawer back then. The draw would check the char and actuate the solenoid. I don't remember the char code or code sequence. but I think it was all the same. Like 1 company in China made all the solenoids.
Program the port, 9600,N8P
Open the port,
check drawer status
send the code sequence if closed
check drawer status
close the port.
https://www.cashdrawer.com/wp-content/uploads/documents/serial_pro_users_guide.pdf[^]
|
|
|
|
|
I have created TcpListnear Program using SslStream Class. (Use Same Code which Define in Example TCPListnear in SSLStream )
When I execute it, It is directly exit by Environment.Exit(1).
I think its because of ssl certificate.
Or may b I did something wrong.
How to solve this? Please Suggest.
modified 21-May-16 3:44am.
|
|
|
|
|
since you dont post any code alluding to your implementation, the only thing(s) I can suggest is/are :-
Add logging to your code
You should learn to use the debugger as soon as possible. Rather than guessing what your code is doing, It is time to see your code executing and ensuring that it does what you expect.
The debugger allow you to follow the execution line by line, inspect variables and you will see that there is a point where it stop doing what you expect.
Mastering Debugging in Visual Studio 2010 - A Beginner's Guide[^]
|
|
|
|
|
In my question I have posted One Link of SSLStream.
In that article Example of TCPListnear is Displayed. I have used same code for my application. Even No single Line Change has been done by me.
When I run my TCP Server in Console application, It receive no arguments. So it will exit application as described in code.
Which arguments I have to pass?
I know debugger.
First Refer that code.
|
|
|
|
|
did you check the example Main program ?
certificate = args[0];
SslTcpServer.RunServer (certificate);
From the SslTcpServer Class :-
Quote: // The certificate parameter specifies the name of the file
// containing the machine certificate.
So you need to pass in a filename that holds the certificate
|
|
|
|
|
Ya,Exactly.
But how can I create ssl Certificate to attach?
|
|
|
|
|
|
Yes, the problem is with the certificate file that you are going to pass. If you read the code provided on that page,
private static void DisplayUsage()
{
Console.WriteLine("To start the server specify:");
Console.WriteLine("serverSync certificateFile.cer");
Environment.Exit(1);
}
public static int Main(string[] args)
{
string certificate = null;
if (args == null ||args.Length < 1 )
{
DisplayUsage();
}
certificate = args[0];
SslTcpServer.RunServer (certificate);
return 0;
}
In this code sample, you will see that the DisplayUsage function calls the Environment.Exit(1). This is the problem when you don't pass the certificate file as a command line argument. I would suggest that you read the remarks[^] on that document where the procedure is explained, why file is needed and how you should pass it, and read this, https://technet.microsoft.com/en-us/library/cc770735%28v=ws.11%29.aspx[^]
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|