By default, WCF service URL runs with .svc extension. sometimes, I felt that .svc extension is not useful when we reference or share the service URL to application or public. There is a very simple way I found to remove this extension and run as very plain URL with out any major coding.
Normally, URL looks like below
http://domainname/WCFServiceName.svc/MethodName?parameter
We need to change the above URL to below one. Looks simple and neat right?
http://domainname/WCFServiceName/MethodName?parameter
Simple solution is to implement it at web.config level using URL re-writing which is very very simple. Other methods like writing custom URL Re writing module, configure at server level are little complex than compared to web.config changes.We have to apply changes under system.webserver as below
below WCFServiceName names alone we need to change according to your service name. try now with removing with .svc URL.
Share your feedback!!!
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
<rewrite>
<rules>
<rule name="WCFServiceName" stopProcessing="true">
<match url="^WCFServiceName/(.*)$"/>
<action type="Rewrite" url="WCFServiceName.svc/{R:1}" />
</rule>
</rules>
</rewrite>
</system.webServer>
b4946d81-0834-4774-9004-ab9d20494789|3|3.0|27604f05-86ad-47ef-9e05-950bb762570c