{"id":124,"date":"2006-06-14T09:30:33","date_gmt":"2006-06-14T16:30:33","guid":{"rendered":"http:\/\/kennyw.com\/indigo\/124"},"modified":"2006-06-14T09:30:33","modified_gmt":"2006-06-14T16:30:33","slug":"beyond-the-asmxsvc-suffix-multiple-endpoints","status":"publish","type":"post","link":"https:\/\/kennyw.com\/?p=124","title":{"rendered":"Beyond the .asmx\/.svc suffix: Multiple Endpoints"},"content":{"rendered":"<p>One of the key improvements in WCF is the concept of multiple &#8220;endpoints&#8221; at a Service.  Last week (when I was offsite with a customer) I had an interesting revelation.  While we cover the &#8220;ABCs&#8221; of Indigo (Address + Binding + Contract == Endpoint) in every introductory talk, many users don&#8217;t fully grasp the flexibility multiple endpoint support offers.  This is most acute with regards to hosting in IIS, when multiple endpoint support involves &#8220;URI space beyond the file&#8221;.<\/p>\n<p>For example, let&#8217;s say I have an Image Download Service hosted at image.svc.  For interop purposes I expose a BasicHttp endpoint.  I also add a second endpoint that uses a binary encoding instead of text. I provide a relative address of &#8220;binary&#8221; to this endpoint for addressing purposes. In this case my interop endpoint is exposed as:<br \/>\n<a href=\"http:\/\/kennyw.com\/vdir\/image.svc\">http:\/\/kennyw.com\/vdir\/image.svc<\/a><\/p>\n<p>And the binary endpoint is addressible as:<br \/>\n<a href=\"http:\/\/kennyw.com\/vdir\/image.svc\/binary\">http:\/\/kennyw.com\/vdir\/image.svc\/binary<\/a><\/p>\n<p>Yes, that&#8217;s &#8220;\/binary&#8221; <em>after<\/em> the filename.<\/p>\n<p>The relevant piece of config for such as service (assuming you have a &#8220;binaryHttpBinding&#8221; defined in your bindings section) looks like:<\/p>\n<pre>\n&lt;system.serviceModel&gt;\n &lt;services&gt;\n  &lt;service name=\"Microsoft.ServiceModel.Samples.ImageService\"&gt;\n    &lt;endpoint address=\"\"\n              binding=\"basicHttpBinding\"\n              contract=\"Microsoft.ServiceModel.Samples.IImageService\" \/&gt;\n\n    &lt;endpoint address=\"binary\"\n              binding=\"binaryHttpBinding\"\n              contract=\"Microsoft.ServiceModel.Samples.IImageService\" \/&gt;\n  &lt;\/service&gt;\n &lt;\/services&gt;\n&lt;\/system.servicemodel&gt;\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>One of the key improvements in WCF is the concept of multiple &#8220;endpoints&#8221; at a Service. Last week (when I was offsite with a customer) I had an interesting revelation. While we cover the &#8220;ABCs&#8221; of Indigo (Address + Binding + Contract == Endpoint) in every introductory talk, many users don&#8217;t fully grasp the flexibility [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[],"class_list":["post-124","post","type-post","status-publish","format-standard","hentry","category-indigo"],"_links":{"self":[{"href":"https:\/\/kennyw.com\/index.php?rest_route=\/wp\/v2\/posts\/124","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kennyw.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kennyw.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kennyw.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/kennyw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=124"}],"version-history":[{"count":0,"href":"https:\/\/kennyw.com\/index.php?rest_route=\/wp\/v2\/posts\/124\/revisions"}],"wp:attachment":[{"href":"https:\/\/kennyw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=124"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kennyw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=124"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kennyw.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=124"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}