servicestack turn off metadata

Hi Guys,

In this brief post I am going to show you how to disable or turn off metadata completely.

The main configuration is made in the app host Configure method. I believe you have access to that CS file. in your configure method add this line

 

EnableFeatures = Feature.Csv | Feature.CustomFormat | Feature.Html | Feature.Json | Feature.Markdown , // you can add more features here but don't add metadata, I have enable few because I need those. This can be done another way but I find this method clear

 

So my Configure method looked like this

I hope this helps

Cheers,

Advertisement

Leave a Reply

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