Jonathan
Jonathan

Reputation: 32868

Making a .NET web-service accessible locally and remotely?

Say I'm building two applications:

1) A public website

2) A service

The website can be accessed, of course, by users.

The service can be consumed through a web API, but will also be consumed by the website.

This means that common functionality can be put in the service only, rather than having it duplicated in both the website and the service.

Now, when deploying this solution, there seem to be two options:

1) Have the website directly reference the web-service, and deploy both binaries to the web-server, running in the same process.

2) Have the website reference the web-service through the web API, just like all the other consumers. Have the service run in a separate process.

Option 1 would probably be faster for performance, but would require having the two DLLs deployed separately.

Is there any way I can have option 2 (separate processes) but still link the Website to the Service directly, to avoid network latency, serialization, etc?

Upvotes: 0

Views: 166

Answers (1)

DoctorMick
DoctorMick

Reputation: 6793

What technology are you using for your web service? If you're using WCF you can use the NetNamedPipeBinding for your website which is almost as quick as using a dll directly.

Upvotes: 1

Related Questions