Jeti
Jeti

Reputation: 246

Wcf service access and routing through IIS

I have a wcf self-hosted service running as windows service, serving multiple win/web clients in the local network. Service itself has multiple contracts (tcp & named pipes), one of which should be made available through IIS (any form of http binding) so it can be accessed from outside, like by simply accessing www.mypublicdomain.com/public-contract.svc

Current topology:

Question is - what's the best way to expose one of the contracts on the windows service via IIS, so all requests made to that publicly available service would be directly routed to backend windows service.

My first question of stackoverflow, if anything is unclear, i'll try to explain it further. Thank you.

Upvotes: 1

Views: 351

Answers (1)

BonyT
BonyT

Reputation: 10940

I you are using IIS 7 then you can host the wcf service in IIS and expose one service contract with a HTTP binding, and the other non-public one as TCP-IP.

If you MUST host the server app as a windows service, then create a new IIS hosted service that has the same interface as the service contract you want public, but simply passes the calls through.

Upvotes: 1

Related Questions