Click here to Skip to main content
15,902,032 members

Comments by Member 12203019 (Top 6 by date)

Member 12203019 31-Dec-15 10:04am View    
Me, i have WCF which hosted in the First Windows service and i use second windows service to consume this WCF. My function TestWCF() launch the balloon tip. By if install the second service and when this starting the notification not appear . I don't use CallBack implemented.
My Function TestWCf :
public class Service1 : IService1
{
public void TestWCF()
{

Notification notif = new Notification();

notif.ShowNotification();
}

}

and my function ShowNotification :

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);
}
}
}

I want when the second service windows starting this launch the the Balloon tip Notification in the task bar icon

Help me !!!
My WCF app.config is :
<system.servicemodel>
<services>
<service name="AtosWCFService.Service1">
<host>
<baseAddresses>
<add baseaddress="http://localhost:8733/Design_Time_Addresses/AtosWCFService/Service1/">
</baseAddresses>

<!-- Service Endpoints -->
<!-- Unless fully qualified, address is relative to base address supplied above -->
<endpoint address="" binding="basicHttpBinding" contract="AtosWCFService.IService1">
<!--
Upon deployment, the following identity element should be removed or replaced to reflect the
identity under which the deployed service runs. If removed, WCF will infer an appropriate identity
automatically.
-->
<identity>
<dns value="localhost">


<!-- Metadata Endpoints -->
<!-- The Metadata Exchange endpoint is used by the service to describe itself to clients. -->
<!-- This endpoint does not use a secure binding and should be secured or removed before deployment -->
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange">


<behaviors>
<servicebehaviors>
<behavior>
<!-- To avoid disclosing metadata information,
set the values below to false before deployment -->
<servicemetadata httpgetenabled="True" httpsgetenabled="True">
<!-- To receive exception details in faults for debugging purposes,
set the value below to true. Set to false before deployment
to avoid disclosing exception information -->
<servicedebug includeexceptiondetailinfaults="False">




Regards
Member 12203019 31-Dec-15 8:13am View    
Hi Patrick

What is the Binding used in the endpoint ?

Regards
Member 12203019 30-Dec-15 8:26am View    
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 !!!
Member 12203019 30-Dec-15 7:17am View    
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 !!!
Member 12203019 30-Dec-15 7:01am View    
My question is: How do communicate two windows services of which the first host the WCF ?