If a project on the same server references a WCF project to access its methods, it's not talking through HTTP right?

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

  •  30-05-2021
  •  | 
  •  

Question

If my MVC project is referencing (regular project reference not service reference) a WCF service project, I am not communicating using HTTP right?

I want to make my WCF service exposed to multiple mobile and 3rd party clients via HTTP over the web, but my own application I'd like to use without HTTP due to higher performance.

Is what I'm currently doing achieving this?

Was it helpful?

Solution

If you are using a project reference (i.e. it appears under the "Reference" folder on not the "Service Reference" folder) then you are not using HTTP. You are making a call directly to an assembly/DLL in that case. I generally develop my applications so that there is a Service Layer (sometimes referred to as the Application Layer) that basically mimics the API that the web service presents. This is an assembly that can be referenced directly if I do not want to distribute this service. Then the actual web service is just a thin layer on top of the Service Layer that provides the actual WCF binding and contracts for distributed clients to call.

OTHER TIPS

It depends on how you added it. If you did it via "Add Service Reference" and your app/web.config is littered with WCF client settings then it probably is going over HTTP. You should check the transport and address settings withing your configuration. If you see HTTP then, well, you're using HTTP.

Even if you switch to named pipes there's still an overhead. The fastest transport for local communication is probably the NullTransport sample Roman Kiss developed.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top