Deploying ServiceStack to IIS with a subdirectory

When deploying ServiceStack to a subdirectory (i.e. /Customer1/ServiceStack) what worked on your development and QA may all of a sudden not work here.  You’ll see an error like this:

Handler for Request not found:

Request.HttpMethod: GET
Request.HttpMethod: GET
Request.PathInfo: /Customer1/ServiceStack
Request.RawUrl: /Customer1/ServiceStack

The solution is to add the following code:

SetConfig(new EndpointHostConfig
    ServiceStackHandlerFactoryPath = "ServiceStack", // change "ServiceStack" to your directory name such as "api"...etc

I found this solution here
Posted in Uncategorized

Leave a Reply

Your email address will not be published. Required fields are marked *