Search Results

Search found 3 results on 1 pages for 'johnl'.

Page 1/1 | 1 

  • Hosting a WCF Service Lib through a Windows service get a System.InvalidOperationException: attempti

    - by JohnL
    I have a WCF Service Library containing five service contracts. The library is hosted through a Windows Service. Most if not all my configuration for the WCF Library is declaritive. The only thing I am doing in code for configuration is to pass the type of the class implementing the service contracts into ServiceHost. I then call Open on each of the services during the Windows Service OnStart event. Here is the error message I get: Service cannot be started. System.InvalidOperationException: Service '[Fubu.Conversion.Service1' has zero application (non-infrastructure) endpoints. This might be because no configuration file was found for your application, or because no service element matching the service name could be found in the configuration file, or because no endpoints were defined in the service element. at System.ServiceModel.Description.DispatcherBuilder.EnsureThereAreNonMexEndpoints(ServiceDescription description) at System.ServiceModel.Description.DispatcherBuilder.InitializeServiceHost(ServiceDescription description, ServiceHostBase serviceHost) at System.ServiceModel.ServiceHostBase.InitializeRuntime() at System.ServiceModel.ServiceHostBase.OnBeginOpen() at System.ServiceModel.ServiceHostBase.OnOpen(TimeSpan timeout) at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) at System.ServiceModel.Channels.CommunicationObject.Open() at Fubu.RemotingHost.RemotingHost.StartServ... protected override void OnStart(string[] args) { // Uncomment to debug this properly //System.Diagnostics.Debugger.Break(); StartService1(); StartService2(); StartService3(); StartService4(); StartService5(); } Each of the above simply do the following: private void StartSecurityService() { host = new ServiceHost(typeof(Service1)); host.Open(); } Service Lib app.congfig summary <services> <service behaviorConfiguration="DefaultServiceBehavior" name="Fubu.Conversion.Service1"> <endpoint address="" binding="netTcpBinding" bindingConfiguration="TCPBindingConfig" name="Service1" bindingName="TCPEndPoint" contract="Fubu.Conversion.IService1"> <identity> <dns value="localhost" /> </identity> </endpoint> <endpoint address="mex" binding="mexTcpBinding" bindingConfiguration="" name="mexSecurity" bindingName="TcpMetaData" contract="IMetadataExchange" /> <host> <baseAddresses> <add baseAddress="net.tcp://localhost:8025/Fubu/Conversion/Service1/" /> </baseAddresses> </host> </service> ... Contract is set up as follows: namespace Fubu.Conversion.Service1 { [ServiceContract(Namespace = "net.tcp://localhost:8025/Fubu")] public interface IService1 { I have looked "high and low" for a solution without any luck. Is the answer obvious? The solution to this does not appear to be. Thanks

    Read the article

  • How can I build against Microsoft.Web.Administration (IIS 7.x) on a Windows 2003 build machine?

    - by JohnL
    Hi, I am writing a C# config app for (amongst other things) setting up websites. It's only required to support IIS 7.x (Windows 2008 / 2008 R2), and requiring the compatibility pack is a no-no, so I figured I'd just use the Microsoft.Web.Administration namespace. However, the only place I can find the assembly that contains this namespace (Microsoft.Web.Administration.dll) is from the IIS 7.x installation folder, and our main build machines are Windows 2003 and so cannot install IIS 7.x. One option is to mandate a 2008 build machine but we currently only have one so that's not ideal. We've already ruled out appcmd.exe. The other option is to make a package consisting of the dlls necessary to build against Microsoft.Web.Administration.dll. Has anyone tried that? Is there such a package already in existence, hidden somewhere on the MS download site? Thanks in advance.

    Read the article

  • Nested foreach loops for associative array combinations

    - by JohnL
    I have an associative array as follows: $myarray = array('a'=>array(), 'b'=>array(), 'c'=>array(), 'd'=>array()); I want to be able to get all pairs of elements in the array. If it wasn't an associative array, I would use nested for loops, like: for($i=0; $i<count($myarray); $i++) { for($j=$i+1; $j<count($myarray); $j++) { do_something($myarray[$i], $myarray[$j]); } } I have looked at using foreach loops, but as the inner loop goes through ALL elements, some pairs are repeated. Is there a way to do this? Thanks!

    Read the article

1