Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.


Go Back   Vista Forums > Misc Newsgroups > Indigo

RB

Vista - Unable to open IChannelListener

 
 
05-16-2007   #1
Jon Davis


 
 

Unable to open IChannelListener

Newbie 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 remote 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



My System SpecsSystem Spec
05-17-2007   #2
Nicholas Paldino [.NET/C# MVP]


 
 

Re: Unable to open IChannelListener

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]
- mvp@spam.guard.caspershouse.com

"Jon Davis" <jon@REMOVE.ME.PLEASE.jondavis.net> wrote in message
news:um15reAmHHA.4872@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
>
>
>


My System SpecsSystem Spec
05-17-2007   #3
Jon Davis


 
 

Re: Unable to open IChannelListener

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]" <mvp@spam.guard.caspershouse.com> wrote in
message news:2F2102D0-9837-428A-89E0-D80414529662@microsoft.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]
> - mvp@spam.guard.caspershouse.com
>
> "Jon Davis" <jon@REMOVE.ME.PLEASE.jondavis.net> wrote in message
> news:um15reAmHHA.4872@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
>>
>>
>>

>



My System SpecsSystem Spec
05-17-2007   #4
Jon Davis


 
 

Re: Unable to open IChannelListener

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" <jon@REMOVE.ME.PLEASE.jondavis.net> wrote in message
news:e0E3x$JmHHA.3996@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]" <mvp@spam.guard.caspershouse.com> wrote
> in message news:2F2102D0-9837-428A-89E0-D80414529662@microsoft.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]
>> - mvp@spam.guard.caspershouse.com
>>
>> "Jon Davis" <jon@REMOVE.ME.PLEASE.jondavis.net> wrote in message
>> news:um15reAmHHA.4872@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
>>>
>>>
>>>

>>

>
>



My System SpecsSystem Spec
05-25-2007   #5
keimpema@gmail.com


 
 

Re: Unable to open IChannelListener

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.net> wrote in message
>
> news:e0E3x$JmHHA.3996@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.com> wrote
> > in messagenews:2F2102D0-9837-428A-89E0-D80414529662@microsoft.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.net> wrote in message
> >>news:um15reAmHHA.4872@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

My System SpecsSystem Spec
 

RB


Thread Tools


Similar Threads for: Unable to open IChannelListener
Thread Forum
Unable to open a .doc Vista General
Unable to Open Attachments Vista mail
Unable To Open Attachments Vista mail
Unable to open attachment Live Mail
Unable to Open pic Vista music pictures video


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd