What is best practice for naming & hosting a WCF service endpoint in IIS?
Assuming an example scenario of:
- A service dealing with customer entities
- A solution namespace of
Company.Entities.Customer
Company.Entities.Customer.ServiceHost
contains the IIS Host (ie. just the .svc file)Company.Entities.Customer.Service
contains the service implementation (not the hosting)Company.Entities.Customer.ServiceContracts
contains the service contracts
What would you name:
- a) the virtual directory/website in IIS?
- b) the .svc file?
As examples i am currently tossing up between:
- 1) Current practice:
- a) http://servername/Company.Entities.Customer/
- b)
CustomerEntities.svc
- Results in Endpoint of: http://servername/Company.Entities.Customer/CustomerEntities.svc
- 2) 'Cleaner' suggestion:
- a) http://customhostname/Customer/ (eg. http://entitiesservices/Customer/)
- b)
Service.svc
(since the service is already definied in the hostname + dir/sitename) - Results in Endpoint of: http://entitiesservices/Customer/Service.svc
- 3) A combiniation of the above (eg. 1a + 2b = http://servername/Company.Entities.Customer/Service.svc).