Exitos Exitos - 1 year ago 59
ASP.NET (C#) Question

What is the difference between using a .svc file and hosting the WCF service in 'WCF Service Host'?

Ive written a service and it has a .svc file. I can browse to this service but this seems to be a strange way of doing it. Im wondering whether is okay to produce a service using a .svc file or should we be looking at using the WCF Service Host and setting up the bindings etc....

Answer Source

An svc file is for when you're hosting within IIS (it can now host without these in .NET 4.0). Unless you have a reason to self host I'd strongly recommend sticking with IIS (WAS) as it provides so much of the hosting infrastructure for "free".

UPDATE (11/16): Updated broken link to point to a comparative ASP.NET forums post. Previous link was here in case it comes back to life sometime in the future.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download