WCF removing .svc extension

后端 未结 1 1758
闹比i
闹比i 2021-01-18 10:55

I\'m able to add a ServiceRoute to my WCF .net 4.0 service with a .svc extension by following these posts:

  1. Post 1
  2. Post 2

However

相关标签:
1条回答
  • 2021-01-18 11:45

    Ron Jacobs has a great post on the topic - you need to use a ServiceRoute to achieve what you're looking for:

    • Using System.Web.Routing with Data Services (OData)

    As he shows in his follow-up post, WCF Data Services and ServiceRoute, the resulting service document does indeed also reflect the change and shows the service URL without the .svc extension.

    This stuff requires the ASP.NET routing support, which is fully present in .NET 4 (and can be bolted on in .NET 3.5 SP1, if needed)

    0 讨论(0)
提交回复
热议问题