Using WCF Configuration Internally - How do I use my WCF services internally and externally?

StackOverflow https://stackoverflow.com/questions/15353824

  •  23-03-2022
  •  | 
  •  

Pregunta

Forgive the title, I was not quite sure how to describe the problem I am running into.

I am exposing an API over both SOAP and REST endpoints. I have used some of the WCF extensibility features to use HTTP headers for certain authentication/authorization and logging needs that I have.All of which is working very well WHEN the service is being consumed by an outside client (Not me).

I have a site that will be using the same services, but I don't want to have to worry about consuming these services over an address as I can just initialize them in my site.

Is there a way to use ChannelFactory, or something else to be able to create an instance of my service without specifying an address, and still have it go through the WCF stack and hit my extensibility points?

¿Fue útil?

Solución

I was able to figure out exactly what I needed. I wasn't aware that even if you are running your services locally, you can still add a reference to them as a service. This allows me to still leverage the WCF stack and all the extensibility points I implemented.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top