다음을 통해 공유


SVC Files and Services

IIS uses the file extension to register behaviors that take place when a particular address is requested. WCF registers one of these extensions (by default, it's *.svc) to run a build provider that takes care of executing a WCF service for a given URL. I've written about WCF build providers in the past to explain how more file extensions can be mapped to this same behavior. However, another popular request is to get the behavior for executing a service without having a file extension.

Jon Flanders provides a method for executing a service without having a file extension by using URL rewriting to trick IIS. In this case, there is a user-visible URL without an extension that maps to an internal URL with an extension. The build provider uses the internal URL making everything appear to work. I think that this is a clever approach even though URL rewriting is sometimes hard to get working because trying to trick IIS can cause it to confuse the two URLs. I haven't seen a better way of doing this yet though.

Next time: Always Begin with Accept