问题
I checked out Run servicestack side by side with another web framework.
When I add the location tag the "api" is unresolved...what do I need to do to get the location tag to be aware of "api"?
回答1:
Firstly make sure you follow the README.txt instructions for running ServiceStack in ASP.NET MVC.
ServiceStack automatically infers the handler path based on the <location>
tag, if there's more than one or it has some other issue inferring, it can be explicitly set in Config.ServiceStackHandlerFactoryPath
, e.g:
SetConfig(new EndpointHostConfig {
ServiceStackHandlerFactoryPath = "api",
});
来源:https://stackoverflow.com/questions/19008011/setting-up-web-config-to-work-side-by-side-with-asp-net-mvc-4-location-tag-not