473,657 Members | 2,492 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

WCF: Unable to open IChannelListene r

Newbie to WCF here. I am getting the error "unable to open its
IChannelListene r", but the service is running as an admin, and on a
different port from anything else. If it matters, I'm trying to run multiple
instances
of the same service name on different schemes/ports, so that WAN users can
use
HTTP/SOAP, LAN users can use TCP, and localhost users can use named pipes.
Apparently, this isn't doable. I suspect a service name conflict? Since the
service name is the fully qualified classname w/ namespace, do I create a
whole new service class for each scheme?

Some sample code below. Only works when I comment out all but the http bits.
Fails otherwise on tcpServiceHost. Open(); regarding the HTTP uri
http://localhost:8080/Bleah/Admin (weird?!).

---------------

internal static ServiceHost httpServiceHost = null;
internal static ServiceHost tcpServiceHost = null;
internal static ServiceHost pipeServiceHost = null;

internal static void StartService()
{
// Consider putting the baseAddress in the configuration system
// and getting it here with AppSettings
Uri baseAddress = new Uri("http://localhost:8080/Bleah/Admin");

// Instantiate new ServiceHost
httpServiceHost = new ServiceHost(typ eof(AdminServic e), baseAddress);
httpServiceHost .Open();

// tcp service
// Consider putting the baseAddress in the configuration system
// and getting it here with AppSettings
baseAddress = new Uri("net.tcp://localhost:2062/Bleah/Admin");
tcpServiceHost = new ServiceHost(typ eof(AdminServic e), baseAddress);
tcpServiceHost. Open();

// pipes service
// Consider putting the baseAddress in the configuration system
// and getting it here with AppSettings
baseAddress = new Uri("net.pipe://localhost/Bleah/Admin");
pipeServiceHost = new ServiceHost(typ eof(AdminServic e), baseAddress);
pipeServiceHost .Open();

}

....
<service name="BleahAdmi nService" behaviorConfigu ration="returnF aultsHttp">
<!--<endpoint contract="IMeta dataExchange" binding="mexHtt pBinding"
address="true" />-->
<endpoint contract="Bleah IAdminService"
binding="wsHttp Binding"
address="http://localhost:8080/Bleah/Admin" />
<endpoint contract="Bleah IAdminService"
binding="netTcp Binding"
address="net.tc p://localhost:2060/Bleah/Admin" />
<endpoint contract="Bleah IAdminService"
binding="netNam edPipeBinding"
address="net.pi pe://localhost/Bleah/Admin" />
</service>
Jon

May 16 '07 #1
4 12398
Jon,

You have defined one service with three endpoints, but you are trying to
open the service host three times (and subsequently expose the same
endpoints over again). You only need to open the service host once. Also,
you don't need to set the base address, since you have full addresses in
your config file.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"Jon Davis" <jo*@REMOVE.ME. PLEASE.jondavis .netwrote in message
news:um******** ******@TK2MSFTN GP03.phx.gbl...
Newbie to WCF here. I am getting the error "unable to open its
IChannelListene r", but the service is running as an admin, and on a
different port from anything else. If it matters, I'm trying to run
multiple instances
of the same service name on different schemes/ports, so that WAN users can
use
HTTP/SOAP, LAN users can use TCP, and localhost users can use named pipes.
Apparently, this isn't doable. I suspect a service name conflict? Since
the
service name is the fully qualified classname w/ namespace, do I create a
whole new service class for each scheme?

Some sample code below. Only works when I comment out all but the http
bits.
Fails otherwise on tcpServiceHost. Open(); regarding the HTTP uri
http://localhost:8080/Bleah/Admin (weird?!).

---------------

internal static ServiceHost httpServiceHost = null;
internal static ServiceHost tcpServiceHost = null;
internal static ServiceHost pipeServiceHost = null;

internal static void StartService()
{
// Consider putting the baseAddress in the configuration system
// and getting it here with AppSettings
Uri baseAddress = new Uri("http://localhost:8080/Bleah/Admin");

// Instantiate new ServiceHost
httpServiceHost = new ServiceHost(typ eof(AdminServic e), baseAddress);
httpServiceHost .Open();

// tcp service
// Consider putting the baseAddress in the configuration system
// and getting it here with AppSettings
baseAddress = new Uri("net.tcp://localhost:2062/Bleah/Admin");
tcpServiceHost = new ServiceHost(typ eof(AdminServic e), baseAddress);
tcpServiceHost. Open();

// pipes service
// Consider putting the baseAddress in the configuration system
// and getting it here with AppSettings
baseAddress = new Uri("net.pipe://localhost/Bleah/Admin");
pipeServiceHost = new ServiceHost(typ eof(AdminServic e), baseAddress);
pipeServiceHost .Open();

}

...
<service name="BleahAdmi nService"
behaviorConfigu ration="returnF aultsHttp">
<!--<endpoint contract="IMeta dataExchange" binding="mexHtt pBinding"
address="true" />-->
<endpoint contract="Bleah IAdminService"
binding="wsHttp Binding"
address="http://localhost:8080/Bleah/Admin" />
<endpoint contract="Bleah IAdminService"
binding="netTcp Binding"
address="net.tc p://localhost:2060/Bleah/Admin" />
<endpoint contract="Bleah IAdminService"
binding="netNam edPipeBinding"
address="net.pi pe://localhost/Bleah/Admin" />
</service>
Jon
May 17 '07 #2
I played with this for two or three hours yesterday. I realized what you are
saying, but doing it as you described (open it once, without a base address
in the constructor, but leave the base addresses in the config file), the
listeners were NOT active.

Jon

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard .caspershouse.c omwrote in
message news:2F******** *************** ***********@mic rosoft.com...
Jon,

You have defined one service with three endpoints, but you are trying
to open the service host three times (and subsequently expose the same
endpoints over again). You only need to open the service host once.
Also, you don't need to set the base address, since you have full
addresses in your config file.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"Jon Davis" <jo*@REMOVE.ME. PLEASE.jondavis .netwrote in message
news:um******** ******@TK2MSFTN GP03.phx.gbl...
>Newbie to WCF here. I am getting the error "unable to open its
IChannelListen er", but the service is running as an admin, and on a
different port from anything else. If it matters, I'm trying to run
multiple instances
of the same service name on different schemes/ports, so that WAN users
can use
HTTP/SOAP, LAN users can use TCP, and localhost users can use named
pipes.
Apparently, this isn't doable. I suspect a service name conflict? Since
the
service name is the fully qualified classname w/ namespace, do I create a
whole new service class for each scheme?

Some sample code below. Only works when I comment out all but the http
bits.
Fails otherwise on tcpServiceHost. Open(); regarding the HTTP uri
http://localhost:8080/Bleah/Admin (weird?!).

---------------

internal static ServiceHost httpServiceHost = null;
internal static ServiceHost tcpServiceHost = null;
internal static ServiceHost pipeServiceHost = null;

internal static void StartService()
{
// Consider putting the baseAddress in the configuration system
// and getting it here with AppSettings
Uri baseAddress = new Uri("http://localhost:8080/Bleah/Admin");

// Instantiate new ServiceHost
httpServiceHos t = new ServiceHost(typ eof(AdminServic e), baseAddress);
httpServiceHos t.Open();

// tcp service
// Consider putting the baseAddress in the configuration system
// and getting it here with AppSettings
baseAddress = new Uri("net.tcp://localhost:2062/Bleah/Admin");
tcpServiceHo st = new ServiceHost(typ eof(AdminServic e), baseAddress);
tcpServiceHost .Open();

// pipes service
// Consider putting the baseAddress in the configuration system
// and getting it here with AppSettings
baseAddress = new Uri("net.pipe://localhost/Bleah/Admin");
pipeServiceHos t = new ServiceHost(typ eof(AdminServic e), baseAddress);
pipeServiceHos t.Open();

}

...
<service name="BleahAdmi nService"
behaviorConfig uration="return FaultsHttp">
<!--<endpoint contract="IMeta dataExchange" binding="mexHtt pBinding"
address="tru e" />-->
<endpoint contract="Bleah IAdminService"
binding="wsHttp Binding"
address="http://localhost:8080/Bleah/Admin" />
<endpoint contract="Bleah IAdminService"
binding="netTcp Binding"
address="net.tc p://localhost:2060/Bleah/Admin" />
<endpoint contract="Bleah IAdminService"
binding="netNam edPipeBinding"
address="net.pi pe://localhost/Bleah/Admin" />
</service>
Jon

May 17 '07 #3
I seem to have gotten it to work. A good night of sleep, attention to
absolute URIs, and knowing I'm on the right track (i.e. using the config
file solely) and I'm good to go.

Jon
"Jon Davis" <jo*@REMOVE.ME. PLEASE.jondavis .netwrote in message
news:e0******** ******@TK2MSFTN GP06.phx.gbl...
>I played with this for two or three hours yesterday. I realized what you
are saying, but doing it as you described (open it once, without a base
address in the constructor, but leave the base addresses in the config
file), the listeners were NOT active.

Jon

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard .caspershouse.c omwrote
in message news:2F******** *************** ***********@mic rosoft.com...
>Jon,

You have defined one service with three endpoints, but you are trying
to open the service host three times (and subsequently expose the same
endpoints over again). You only need to open the service host once.
Also, you don't need to set the base address, since you have full
addresses in your config file.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"Jon Davis" <jo*@REMOVE.ME. PLEASE.jondavis .netwrote in message
news:um******* *******@TK2MSFT NGP03.phx.gbl.. .
>>Newbie to WCF here. I am getting the error "unable to open its
IChannelListe ner", but the service is running as an admin, and on a
different port from anything else. If it matters, I'm trying to run
multiple instances
of the same service name on different schemes/ports, so that WAN users
can use
HTTP/SOAP, LAN users can use TCP, and localhost users can use named
pipes.
Apparently, this isn't doable. I suspect a service name conflict? Since
the
service name is the fully qualified classname w/ namespace, do I create
a
whole new service class for each scheme?

Some sample code below. Only works when I comment out all but the http
bits.
Fails otherwise on tcpServiceHost. Open(); regarding the HTTP uri
http://localhost:8080/Bleah/Admin (weird?!).

---------------

internal static ServiceHost httpServiceHost = null;
internal static ServiceHost tcpServiceHost = null;
internal static ServiceHost pipeServiceHost = null;

internal static void StartService()
{
// Consider putting the baseAddress in the configuration system
// and getting it here with AppSettings
Uri baseAddress = new Uri("http://localhost:8080/Bleah/Admin");

// Instantiate new ServiceHost
httpServiceHo st = new ServiceHost(typ eof(AdminServic e), baseAddress);
httpServiceHo st.Open();

// tcp service
// Consider putting the baseAddress in the configuration system
// and getting it here with AppSettings
baseAddress = new Uri("net.tcp://localhost:2062/Bleah/Admin");
tcpServiceHos t = new ServiceHost(typ eof(AdminServic e), baseAddress);
tcpServiceHos t.Open();

// pipes service
// Consider putting the baseAddress in the configuration system
// and getting it here with AppSettings
baseAddress = new Uri("net.pipe://localhost/Bleah/Admin");
pipeServiceHo st = new ServiceHost(typ eof(AdminServic e), baseAddress);
pipeServiceHo st.Open();

}

...
<service name="BleahAdmi nService"
behaviorConfi guration="retur nFaultsHttp">
<!--<endpoint contract="IMeta dataExchange" binding="mexHtt pBinding"
address="true " />-->
<endpoint contract="Bleah IAdminService"
binding="wsHttp Binding"
address="http://localhost:8080/Bleah/Admin" />
<endpoint contract="Bleah IAdminService"
binding="netTcp Binding"
address="net.tc p://localhost:2060/Bleah/Admin" />
<endpoint contract="Bleah IAdminService"
binding="netNam edPipeBinding"
address="net.pi pe://localhost/Bleah/Admin" />
</service>
Jon


May 17 '07 #4
On 17 mei, 18:41, "Jon Davis" <j...@REMOVE.ME .PLEASE.jondavi s.net>
wrote:
I seem to have gotten it to work. A good night of sleep, attention to
absolute URIs, and knowing I'm on the right track (i.e. using the config
file solely) and I'm good to go.

Jon

"Jon Davis" <j...@REMOVE.ME .PLEASE.jondavi s.netwrote in message

news:e0******** ******@TK2MSFTN GP06.phx.gbl...
I played with this for two or three hours yesterday. I realized what you
are saying, but doing it as you described (openit once, without a base
address in the constructor, but leave the base addresses in the config
file), the listeners were NOT active.
Jon
"Nicholas Paldino [.NET/C# MVP]" <m...@spam.guar d.caspershouse. comwrote
in messagenews:2F* *************** *************** ***@microsoft.c om...
Jon,
You have defined one service with three endpoints, but you are trying
toopenthe service host three times (and subsequently expose the same
endpoints over again). You only need toopenthe service host once.
Also, you don't need to set the base address, since you have full
addresses in your config file.
--
- Nicholas Paldino [.NET/C# MVP]
- m...@spam.guard .caspershouse.c om
"Jon Davis" <j...@REMOVE.ME .PLEASE.jondavi s.netwrote in message
news:um******* *******@TK2MSFT NGP03.phx.gbl.. .
Newbie to WCF here. I am getting the error "unabletoopenit s
IChannelListe ner", but the service is running as an admin, and on a
different port from anything else. If it matters, I'm trying to run
multiple instances
of the same service name on different schemes/ports, so that WAN users
can use
HTTP/SOAP, LAN users can use TCP, and localhost users can use named
pipes.
Apparently, this isn't doable. I suspect a service name conflict? Since
the
service name is the fully qualified classname w/ namespace, do I create
a
whole new service class for each scheme?
>Some sample code below. Only works when I comment out all but the http
bits.
Fails otherwise on tcpServiceHost. Open(); regarding the HTTP uri
http://localhost:8080/Bleah/Admin(weird?!).
>---------------
>internal static ServiceHost httpServiceHost = null;
internal static ServiceHost tcpServiceHost = null;
internal static ServiceHost pipeServiceHost = null;
>internal static void StartService()
{
// Consider putting the baseAddress in the configuration system
// and getting it here with AppSettings
Uri baseAddress = new Uri("http://localhost:8080/Bleah/Admin");
>// Instantiate new ServiceHost
httpServiceHos t = new ServiceHost(typ eof(AdminServic e), baseAddress);
httpServiceHos t.Open();
>// tcp service
// Consider putting the baseAddress in the configuration system
// and getting it here with AppSettings
baseAddress = new Uri("net.tcp://localhost:2062/Bleah/Admin");
tcpServiceHo st = new ServiceHost(typ eof(AdminServic e), baseAddress);
tcpServiceHost .Open();
>// pipes service
// Consider putting the baseAddress in the configuration system
// and getting it here with AppSettings
baseAddress = new Uri("net.pipe://localhost/Bleah/Admin");
pipeServiceHos t = new ServiceHost(typ eof(AdminServic e), baseAddress);
pipeServiceHos t.Open();
>}
>...
<service name="BleahAdmi nService"
behaviorConfig uration="return FaultsHttp">
<!--<endpoint contract="IMeta dataExchange" binding="mexHtt pBinding"
address="tru e" />-->
<endpoint contract="Bleah IAdminService"
binding="wsHttp Binding"
address="http://localhost:8080/Bleah/Admin" />
<endpoint contract="Bleah IAdminService"
binding="netTcp Binding"
address="net.tc p://localhost:2060/Bleah/Admin" />
<endpoint contract="Bleah IAdminService"
binding="netNam edPipeBinding"
address="net.pi pe://localhost/Bleah/Admin" />
</service>
>Jon
Hi,

Would you please shared your solution (code + config) with this group?
I am struggling with a similar problem.

Harmen

May 25 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
8267
by: =?Utf-8?B?QWRyaWFuIENvbGU=?= | last post by:
I have written a simple WCF service hosted in a Windows console application and a simple WCF client console application that connects successfully to that service and retrieves data. I then ported the console application to WinForms and also got that to work properly. My next move was to host the WCF service in a Windows service application. I believe I have that working correctly, but I can't for the life of me get a client to connect...
3
3276
by: =?Utf-8?B?R3JlZw==?= | last post by:
I have just created a WCF service that is using WShttpbasic and all is good when another .net 3.0 application consumes it. However, I have legacy apps that must use this service and are running on .net 2.0 and are housed on Windows 2000 servers. I have been unable to find ANY info on how to do this, or if it is even possible. I find it hard to believe that WCF would not be able to be consumed by 2.0 applications.
13
1532
by: Jon Davis | last post by:
Why is the IDisposeable implementation of WCF clients private? I'm glad that you can still Dispose() by casting or with using ( .. ) { .. } because IDisposable is indeed implemented but what was the design reasoning to make Dispose() private? Jon
5
4126
by: =?Utf-8?B?SmltbWVy?= | last post by:
Hello, I've been trying to create a WCF SOAP Router Service that can forward not just the message body but also any security headers set by the originator of the message. The destination service I'm routing messages to uses WSHttpBinding, SSL with UserName/Password client credentials. Using guidance from the Technology samples I can create a router that forwards messages without security credentils but not with them. Can anybody point me...
1
1554
by: Bill Fuller | last post by:
I have a team that is designing/building an n-tier (5 logical layer, 3 physical) WinForms application that will be deployed via ClickOnce. The backend will be using WCF for communication. Here is the question... the design team is using IIS, which is not a requirement of WCF. It is not a web application and we have total control of the binding protocol (HTTP, TCP, ES, etc.). Thier reasoning for using IIS is because of the requirement...
5
2931
by: Jonathan Kay | last post by:
Hi, I'd like to my WCF webservice to work both on SSL and without. Unfortunately searching has led to dead ends, references to changes that only work on the old previous beta versions and I admit I am rather confused and frustrated. That being said, I'd like some direction in how exactly I'm supposed to accomplish this. Thanks very much, JK
5
8635
by: Frank Hauptlorenz | last post by:
Hello, I recognized some days ago, that returning a DataTable blocks my WCF-Service. Is this a known bug? If I add this table to a new DataSet() and return this, it works. Thank you, Frank
6
2614
by: Frank Hauptlorenz | last post by:
Hello out there, I have 2 services running. The first one runs in session mode and the 2nd not. The first one should call an operation of the 2nd one asynchronously, because this is doing some long running calculations. If this call is synchronously, everything is running okay. If it's call async the operation does not even start. (I've setup up some event log message at the entry point).
1
11396
by: lmod | last post by:
I am developing an application using WPF and WCF. This app on the server side will need for WCF services hosted in IIS6 to communicate with WCF services that are hosted as Windows services on the same server / or network. Also the WCF services hosted in IIS6 has to communicate with the WPF client apps that will be installed on computers that are not in the same network as the server/s. Right now I am creating small test apps so I can...
0
8403
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8737
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8610
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6174
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4168
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4327
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2735
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1967
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1730
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.