mundeep
mundeep

Reputation: 2747

Best-practice for naming a WCF endpoint for an iis hosted service?

What is best practice for naming & hosting a WCF service endpoint in IIS?

Assuming an example scenario of:

What would you name:

As examples i am currently tossing up between:

Upvotes: 2

Views: 2433

Answers (2)

marc_s
marc_s

Reputation: 755128

I definitely prefer your cleaner suggestion, #2. It gives you shorter URL's, still has all the relevant info (which customer you're dealing with).

Suggestion #1 is okay because it's very clear and leaves no doubt about what you're dealing with, but it seems overly complicated, too long and gives you too much chances for a typo :-)

Go with #2 if you ask me!

Marc

Upvotes: 2

AlexDrenea
AlexDrenea

Reputation: 8039

This being a subjective question, this is a subjective answer:

Personally I preffer a modified version of your second one presented. I sometimes use a sub domain (ws.alexdrenea.eu/Service1) and sometimes just use a virtual directory on the main site (alexdrenea.eu/Service1) with the svc being directly in that folder.

You can name the svc file as you wish but make sure you add it to the default pages in IIS so it can be accessible directly.

Upvotes: 1

Related Questions