问题
We're in the process of upgrading to servicestack v4 and noticed that the default "SyncReply" route was removed in favor of "Reply". We have customers who are actively using these endpoints in our services. What is the recommended way to achieve backwards compatibility for these customers, without having to manually register the routes for each content-type+service?
回答1:
You can use v3 clients that point to a v4 server by using the UseNewPredefinedRoutes property, provided that the over-the-wire interface stays the same. As you're aware v4 has changed the built in routes, and by setting the above mentioned property the v3 clients will use the new v4 routes.
var client = new JsonServiceClient("http://...");
client.UseNewPredefinedRoutes = true;
来源:https://stackoverflow.com/questions/21534493/servicestack-syncreply-removed-not-backwards-compatible