Click here to Skip to main content
15,916,842 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi guys,

I have the same problem so my WCF is hosted in Windows Service. Now i use another windows service for consume my WCF when starting. My WCF contain the method which throws my Windows Forms Application which throw the notification in the windows task bar.
So when i do it the notification not appear :
C#
protected override void OnStart(string[] args)
{
     MyServiceReference.Service1Client display = new MyServiceReference.Service1Client();
     display.TestWCF();
}
Posted
Updated 30-Dec-15 0:10am
v2
Comments
[no name] 30-Dec-15 6:12am    
Please describe your question more to get better response.
Member 12203019 30-Dec-15 7:01am    
My question is: How do communicate two windows services of which the first host the WCF ?
Member 12203019 30-Dec-15 7:17am    
In fact, how one service windows can consume the WCF hosted in another windows service.

Because i want display the balloon tip notification in the task bar when i started my windows service. I created two services windows, the first host the WCF and the second consume the WCF more windows form application for the notification .

thanks !!!
[no name] 30-Dec-15 7:26am    
Go through below link:

http://stackoverflow.com/questions/5486917/communication-between-different-c-sharp-based-services
Member 12203019 30-Dec-15 8:26am    
It is my class which showing the balloon tip :
namespace MyWPFApp
{
public class Notification
{
public void ShowNotification()
{
NotifyIcon notifyIcon;
notifyIcon = new NotifyIcon();
notifyIcon.Icon = SystemIcons.Information;
notifyIcon.BalloonTipTitle = "Atos !!!";
notifyIcon.BalloonTipText = "Atos Notification Center test";
notifyIcon.BalloonTipIcon = ToolTipIcon.Info;
notifyIcon.Visible = true;
notifyIcon.ShowBalloonTip(30000);
}
}
}

This is my WCF Service :
public interface IService1
{
[OperationContract]
void TestWCF();


}

public class Service1 : IService1
{
public void TestWCF()
{

Notification notif = new Notification();

notif.ShowNotification();
}

}
}

My First Service windows which host the WFC :

protected override void OnStart(string[] args)
{
if (host != null)
{
host.Close();
}
host = new ServiceHost(typeof(AtosWCFService.Service1));
host.Open();
}


protected override void OnStop()
{
host.Close();
}

My Second Service windows to consume the WCF hosted inside The first windows service :

protected override void OnStart(string[] args)
{
MyServiceReference.Service1Client display = new MyServiceReference.Service1Client();
display.TestWCF();
}

But the Balloon tip not appear in the task bar icon !!!

Please help me!!!

Best Regards !!!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900