All of the ServiceStack self-host examples serve static files from the same directory as the console or service executable assembly.
Is there a way to change the rooth path to something else?
When I set Config.WebHostPhysicalPath
to a different path from within AppHostHttpListenerBase.Configure
, my html file had to exist in both places for ServiceStack to return anything.
I was wondering the same thing so I dug into the SS source and found an issue that prevents the Config.WebHostPhysicalPath
from working with static files. You can read about it here: https://github.com/ServiceStack/ServiceStack/issues/352
Update 2012-12-03
My pull request for this issue has just been merged into ServiceStack/master. https://github.com/ServiceStack/ServiceStack/pull/357
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.