Search code examples
c#asp.netwcfiiswcf-client

Starting WCF Client in IIS


It is possible to have WCF Client that connects persistantly using duplex over net.tcp (netTcpBinding) from IIS?

i.e. the normal way would be to host it in a console app or as a windows service, my question is, could one use a shared hosting type of environment to run a WCF Client application.

i.e. the application isn't ever accessible from the outside, the application just connects to another service and consumes a remote WCF service over the internet.


Solution

  • If the ASP.NET app is the client, you could try loading the WCF Client into an Application or Session variable.

    I've done something slightly similar with a System Timer and it worked a treat.