I am currently working on a solution where we have a self-hosted ServiceStack layer running, but the problem is that I keep getting errors when I access it from the browser and the browser tries to get the favicon. As far as I can see there is no option of ignoring a specific route when running self-hosted?
I would have imagined something like
Routes.Ignore("favicon*")
a bit like the
Routes.Add<Foo>("/foo")
in my AppHost Configure method
Unlike MVC which uses a Http Module to process and hijack all requests, ServiceStack is built-on ASP.NET’s raw
IHttpHandlerinterfaces. This means ServiceStack must handle any request matching the ServiceStack handler path (e.g./or/api) by returning an IHttpHandler and isn’t able to Ignore them like they do in MVC.You can however catch and handle all unhandled requests by registering a handler in
IAppHost.CatchAllHandlers, e.g: