473,503 Members | 1,666 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

WCF: Unable to open IChannelListener

Newbie to WCF here. I am getting the error "unable to open its
IChannelListener", 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(typeof(AdminService), 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(typeof(AdminService), 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(typeof(AdminService), baseAddress);
pipeServiceHost.Open();

}

....
<service name="BleahAdminService" behaviorConfiguration="returnFaultsHttp">
<!--<endpoint contract="IMetadataExchange" binding="mexHttpBinding"
address="true" />-->
<endpoint contract="BleahIAdminService"
binding="wsHttpBinding"
address="http://localhost:8080/Bleah/Admin" />
<endpoint contract="BleahIAdminService"
binding="netTcpBinding"
address="net.tcp://localhost:2060/Bleah/Admin" />
<endpoint contract="BleahIAdminService"
binding="netNamedPipeBinding"
address="net.pipe://localhost/Bleah/Admin" />
</service>
Jon

May 16 '07 #1
4 12353
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.com

"Jon Davis" <jo*@REMOVE.ME.PLEASE.jondavis.netwrote in message
news:um**************@TK2MSFTNGP03.phx.gbl...
Newbie to WCF here. I am getting the error "unable to open its
IChannelListener", 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(typeof(AdminService), 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(typeof(AdminService), 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(typeof(AdminService), baseAddress);
pipeServiceHost.Open();

}

...
<service name="BleahAdminService"
behaviorConfiguration="returnFaultsHttp">
<!--<endpoint contract="IMetadataExchange" binding="mexHttpBinding"
address="true" />-->
<endpoint contract="BleahIAdminService"
binding="wsHttpBinding"
address="http://localhost:8080/Bleah/Admin" />
<endpoint contract="BleahIAdminService"
binding="netTcpBinding"
address="net.tcp://localhost:2060/Bleah/Admin" />
<endpoint contract="BleahIAdminService"
binding="netNamedPipeBinding"
address="net.pipe://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.comwrote in
message news:2F**********************************@microsof t.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.com

"Jon Davis" <jo*@REMOVE.ME.PLEASE.jondavis.netwrote in message
news:um**************@TK2MSFTNGP03.phx.gbl...
>Newbie to WCF here. I am getting the error "unable to open its
IChannelListener", 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(typeof(AdminService), 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(typeof(AdminService), 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(typeof(AdminService), baseAddress);
pipeServiceHost.Open();

}

...
<service name="BleahAdminService"
behaviorConfiguration="returnFaultsHttp">
<!--<endpoint contract="IMetadataExchange" binding="mexHttpBinding"
address="true" />-->
<endpoint contract="BleahIAdminService"
binding="wsHttpBinding"
address="http://localhost:8080/Bleah/Admin" />
<endpoint contract="BleahIAdminService"
binding="netTcpBinding"
address="net.tcp://localhost:2060/Bleah/Admin" />
<endpoint contract="BleahIAdminService"
binding="netNamedPipeBinding"
address="net.pipe://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**************@TK2MSFTNGP06.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.comwrote
in message news:2F**********************************@microsof t.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.com

"Jon Davis" <jo*@REMOVE.ME.PLEASE.jondavis.netwrote in message
news:um**************@TK2MSFTNGP03.phx.gbl...
>>Newbie to WCF here. I am getting the error "unable to open its
IChannelListener", 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(typeof(AdminService), 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(typeof(AdminService), 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(typeof(AdminService), baseAddress);
pipeServiceHost.Open();

}

...
<service name="BleahAdminService"
behaviorConfiguration="returnFaultsHttp">
<!--<endpoint contract="IMetadataExchange" binding="mexHttpBinding"
address="true" />-->
<endpoint contract="BleahIAdminService"
binding="wsHttpBinding"
address="http://localhost:8080/Bleah/Admin" />
<endpoint contract="BleahIAdminService"
binding="netTcpBinding"
address="net.tcp://localhost:2060/Bleah/Admin" />
<endpoint contract="BleahIAdminService"
binding="netNamedPipeBinding"
address="net.pipe://localhost/Bleah/Admin" />
</service>
Jon


May 17 '07 #4
On 17 mei, 18:41, "Jon Davis" <j...@REMOVE.ME.PLEASE.jondavis.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.jondavis.netwrote in message

news:e0**************@TK2MSFTNGP06.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.guard.caspershouse.comwrote
in messagenews:2F**********************************@m icrosoft.com...
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.com
"Jon Davis" <j...@REMOVE.ME.PLEASE.jondavis.netwrote in message
news:um**************@TK2MSFTNGP03.phx.gbl...
Newbie to WCF here. I am getting the error "unabletoopenits
IChannelListener", 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(typeof(AdminService), 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(typeof(AdminService), 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(typeof(AdminService), baseAddress);
pipeServiceHost.Open();
>}
>...
<service name="BleahAdminService"
behaviorConfiguration="returnFaultsHttp">
<!--<endpoint contract="IMetadataExchange" binding="mexHttpBinding"
address="true" />-->
<endpoint contract="BleahIAdminService"
binding="wsHttpBinding"
address="http://localhost:8080/Bleah/Admin" />
<endpoint contract="BleahIAdminService"
binding="netTcpBinding"
address="net.tcp://localhost:2060/Bleah/Admin" />
<endpoint contract="BleahIAdminService"
binding="netNamedPipeBinding"
address="net.pipe://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
8256
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...
3
3265
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...
13
1517
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...
5
4115
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...
1
1539
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. ...
5
2913
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...
5
8613
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
2596
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...
1
11380
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...
0
7203
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,...
0
7087
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
6993
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7462
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...
0
4675
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3168
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...
0
3156
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1514
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 ...
1
737
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.