How to ignore a route with self-hosted ServiceStack

前端 未结 3 1251
無奈伤痛
無奈伤痛 2020-12-31 21:34

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

3条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-31 22:09

    In my web.config I like to have something like this

    
        
        
    
    

    That way all files with an extension get handled by IIS and means you don't have to go all the way through the aspnet pipeline to server up a 404. It also means you don't log a load of 404s in your servicestack application.

提交回复
热议问题