none
How to notify server system with a pop up window message from wpf application? RRS feed

  • General discussion

  • Hello everybody,

    I have a kinect based wpf application on Client System.

    I want to notify Server System with a Pop up window or simple message window  when particular condition is true.

    I dont need any reply from my Server.

    I have read about c# socket programming which work with IP address. For that i need two applications.

    So, my question is how do i do inside my wpf application?

    Is there anyway which automatically notifies my Server without running seperate application on Server?

    Please correct me if i am worng.

    Thanks in advance.


    Monday, April 13, 2015 3:35 PM

All replies

  • Hello,

    This question actually is not so specific to WCF,WPF or any language. If you want to pou-up a message, there should at least be a app which will be able to help you pou-up this message.

    If you don't want to use any apps, at least you should have a command prompt which will be able to output something on that server. I'm not aware of the any WPF API which can do this. Or as you've already mentioned the socket need two applications, one is server and the other one is client.

    I'm afraid you need to consider change this requirement.

    Best regards,



    Barry
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, April 14, 2015 9:14 AM
  • Thank you so much for your reply.

    I am working with c# languague.

    My Client and Server is on two different machines.

    Yes, I should have some logic to some message on my Server.

    I can not Change my requirement, I need something which together works with my WPF application.

    Could you please tell me the apps that will do notify server?

    can't I add a WCF Service class or some other class and use it to communicate with my Server?

    as i am new to this area, please ask me if you dont understand anything.



    Tuesday, April 14, 2015 10:12 AM
  • Hi,

    I work in WPF forum so I'm not so familar with WCF service, but in my point of view even a WCF service in a remote machine requires a installer to install this service.

    Do you mean you don't have any permission to install things to that server? It is not a good idea to do this.

    Maybe you can consider use WMI in your application:

    http://www.codeproject.com/Articles/18146/How-To-Almost-Everything-In-WMI-via-C-Part-Proce

    In this way at least you can open a process in remote machine. For example, you can open a notepad which is already installed on your server and write something there.

    However I am not aware of such a way to start something that is not installed.

    Best regards,



    Barry
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, April 15, 2015 7:54 AM
  • Thanks again.

    I have permission to install apps on Server. But i dont want to do it like that.

    finally i ended up doing it throgh socket programming only. Even, I did not find something which sends data automatically to the Server.

    Wednesday, April 15, 2015 1:31 PM
  • Hello there,

    "finally i ended up doing it throgh socket programming only. "

    I'm interested in how you receive in your Server, what you choosed here?

    Best regards,



    Barry
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, April 16, 2015 8:52 AM
  • Hi,

    I think you can use a Timer to check the Socket message, if you received the related message, and then pop up a windows or message box in server.

    Check this Class, it will help you to achieve this goal,

    https://msdn.microsoft.com/en-us/library/system.windows.threading.dispatchertimer(v=vs.110).aspx

    In addition, you should know Socket send and receive function.

    Check:

    http://www.csharp-examples.net/socket-send-receive/

    http://www.codeproject.com/Articles/463947/Working-with-Sockets-in-Csharp

    Regards,


    The future belongs to those who believe in the beauty of their dreams.

    Friday, April 17, 2015 4:04 AM
  • hello,

    I did not understnad your question properly.

    to choose my Server, I have specified IP address. Is this you are asking?

    But what exactly i am doing is, I am running simple Server application on my Server, so that Client can connect anytime and send the data to Server.

     My Client program is in my wpf application which is running on Client machine.

    Did i made you clear?



    Friday, April 17, 2015 11:52 AM
  • Hello Yang,

    Thanks for your reply.

    I have already know about socket programming. Actually i was looking for an alternative to socket programming where i dont Need to run any seperate program on Server.

    Friday, April 17, 2015 11:53 AM
  • Hi,

    >>Actually i was looking for an alternative to socket programming where i dont Need to run any seperate program on Server.<<

    I am afraid that we should install something on the Server. :) 

    Q: Is there any underlying mechanism for Windows Server which can receive custom message/notification from client?

    A: I am not sure. But you can find answer on Windows Server Forum. But per my experiences, there is no internal functions to achieve this goal.

    For this issue, I think you have know the solution. If we can install a program on Server. Also, we can create an Windows service application for Server and listen the notification from client.

    Have a nice weekend!

    Regards,


    The future belongs to those who believe in the beauty of their dreams.

    Friday, April 17, 2015 1:57 PM
  • Thank you for your suggestions.

    I will look into it.

    Monday, April 20, 2015 7:26 AM