Note that there are some explanatory texts on larger screens.

plurals
  1. POWCF Service Library hosted as a Windows Service using Castle.Windsor 3.0 issue
    primarykey
    data
    text
    <p>I am wanting to host my WCF Service Library in a windows service. Although it will be communicating to another wcfservice over a local network.</p> <p>I am having great difficulty in finding recent, up-to-date documentation or help to configure the solution for this purpose. Can anyone advise:</p> <p>a) What the preferred endpoint for this kind of connection? (The other WCF service is hosted using a basicHttpBinding) - this in itself lends itself well to configuring the Castle container through hijacking the global.asax. However, hosting this solution in a windows service means i no longer have access to a global.asax!</p> <p>b) How to configure Castle Windsor to use DI with this solution? Currently I've looked into hooking it into the AppInitilize() method of App_Code, and some other, no longer valid solutions. </p> <p>Current Solution architecture:</p> <p>*Core (C# Class Library)</p> <p>*Services (C# Class Library)</p> <p>*WCF Servics (WCF Service Library)</p> <p>*Windows Service (Windows Service Project)</p> <p>Sample Code for AppInitilize() [ which doesnt currently seem to be working ]:</p> <pre><code>public class WindsorConfiguration { public static IWindsorContainer Container { get; private set; } public static void AppInitialize() { { Container = new WindsorContainer() .AddFacility&lt;WcfFacility&gt;() .Register(Component.For&lt;IVirusCheckService&gt;().ImplementedBy&lt;VirusCheckService&gt;() .LifeStyle.Transient .AsWcfService(new DefaultServiceModel() .AddBaseAddresses("http://localhost:8080/MyService") .AddEndpoints(WcfEndpoint.BoundTo(new BasicHttpBinding()) .At("basic")) .PublishMetadata(o =&gt; o.EnableHttpGet()))) .Register(Component.For&lt;ILoggingService&gt;().ImplementedBy&lt;LoggingService&gt;()); } } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload