Click here to Skip to main content
15,395,181 members

Comments by CSharpNewbie 2 (Top 11 by date)

CSharpNewbie 2 11-Apr-15 22:15pm View
   
Deleted
I made sure, that I first ran the Windows Forms application and then I started my service. As per my understanding, Windows forms application is supposed to create the "MyEventName" and windowsService should open that MyEventName. Correct me if I am wrong
CSharpNewbie 2 11-Apr-15 22:00pm View
   
I moved the same question below...I also updated it with the exception.System.Threading.WaitHandleCannotBeOpenedException
CSharpNewbie 2 11-Apr-15 21:47pm View
   
Thank you Sergey, I am trying to signal a windows forms application from a Windows Service using the named events. I understand AutoResetEvents and ManualResetEvents are mainly used for thread synchronization, but now I have a requirement to use named events to signal a Windows Forms application. After reading your comment I started looking into EventWaitHandler and modifed my code and Here it is

Windows Service Code:

public void SetSignalToClient()
{

System.Threading.EventWaitHandle wh = EventWaitHandle.OpenExisting("MyEventName", EventWaitHandleRights.Modify);

wh.Set();
}

Windows Forms Application:
public void ReceiveSignalFromClient()
{
textBox1.Text = "Successful";
while (true)
{
EventWaitHandle wh = new EventWaitHandle(false, EventResetMode.AutoReset, "MyEventName");
wh.WaitOne();
textBox1.Text = "Failed";
}

}

But, my service is crashing with an exception. Please let me know if I am missing something.In Event Viewer I found the exception as: System.Threading.WaitHandleCannotBeOpenedException
CSharpNewbie 2 14-Oct-14 16:08pm View
   
Thanks for the link, but I Dont think our management is planing to upgrade the game to XNA 4.0
CSharpNewbie 2 6-Oct-14 2:46am View
   
Awesome Sinisa Hajnal. It worked. Thank you. I was thinking all the references would been loaded in the beginning, so why does the order so important?
CSharpNewbie 2 6-Oct-14 1:57am View
   
Didnt get your answer...yes my SignalR server is started and on button click I am also getting the data from my server, but while inserting into datatable I am getting Undefined function error on $("#deviceTable").dataTable({
CSharpNewbie 2 5-Oct-14 21:09pm View
   
I am still not able to resolve this issue, please help me to fix the Uncaught TypeError: Undefined is not a function error
CSharpNewbie 2 3-Oct-14 20:52pm View
   
Instead of making changes to my service, I used SignalR :). I created a self hosted SignalR server in my server and made my client listen to it
CSharpNewbie 2 3-Oct-14 14:30pm View
   
As I mentioned my service is RestFul WCF service which has WebHttpBinding. But from the article it looks like to broadcast events to clients, I need to change it to netTcpBinding, if I do that my Rest functionality will not work. So probably I need to create 2 endpoints one for REST and another one for SOAP. its getting little complicated....
CSharpNewbie 2 3-Oct-14 11:59am View
   
I checked the console and I am getting an error on this line
$('#example').dataTable({
CSharpNewbie 2 17-Sep-14 14:48pm View
   
Thanks a lot SA. I was actually referring to WCF proxy and have mentioned as proxy server which is my bad as this is the terminology used in our team, so was completely mistaken by it.