ServiceStack adding to allowed File extensions

Hi Guys,

We had a weird problem at work where our font files won’t load.

One of my colleague Dr. Overton who is working on web services using Service stack for one of our project showed me what the problem was.

Now I am 80% web guy and 20% applications. So for once I was like ok its something to do with configurations.

That turned out to be true

By default these extensions are allowed


[geshi lang=”csharp” nums=”1″ target=”_self” ]

As you can see that AllowFileExtensions is just a Collection Object property (which we can add extensions to) under class EndPointHostConfig

So within your AppHost.cs file  where you are creating EndpointHostConfig config object as shown below

After this declaration just add required extensions. In our case we want to process few font files that won’t work otherwise without these changes

[geshi lang=”csharp” nums=”1″ target=”_self” ]




Much thanks to Dr Overton to figure this out.


I hope this helps someone


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.