发现这是一个路径问题。通过对 web.config 进行以下修改来解决:
//Added Location node
//path moved here
<location path="api"> // Path moved to location area !!!
<system.web>
<compilation debug="true" targetFramework="4.5"/>
<httpRuntime/>
<httpHandlers>
//Path returned to wildcard
<add path="*" type="ServiceStack.WebHost.Endpoints.ServiceStackHttpHandlerFactory, ServiceStack" verb="*"/>
</httpHandlers>
<pages controlRenderingCompatibilityVersion="4.0"/>
</system.web>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
<validation validateIntegratedModeConfiguration="false"/>
<handlers>
<add path="*" name="ServiceStack.Factory" type="ServiceStack.WebHost.Endpoints.ServiceStackHttpHandlerFactory, ServiceStack" verb="*" preCondition="integratedMode" resourceType="Unspecified" allowPathInfo="true"/>
</handlers>
</system.webServer>
</location>