![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
br> br> |
| |||||||
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Guest | 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 Specs![]() |
| | #2 (permalink) |
| Guest | 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 Specs![]() |
| | #3 (permalink) |
| Guest | 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 Specs![]() |
| | #4 (permalink) |
| Guest | 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 Specs![]() |
| | #5 (permalink) |
| Guest | 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 Specs![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| unable to open any mail | sp136jw | Vista mail | 5 | 04-10-2008 04:29 PM |
| Unable to open a .doc | schumbley@btopenworld.com | Vista General | 2 | 08-06-2007 07:16 AM |
| Unable to open .exe file | winattack | Vista security | 6 | 06-04-2007 07:22 AM |
| Unable to open .exe file | winattack | Vista General | 5 | 05-30-2007 11:25 PM |
| Unable to open C++ files | thomasDrew | Vista security | 3 | 01-11-2007 03:48 PM |