Jon Kennerly - 25 - Dec 17, 2014

What is the best way to hide certain Operations (DTO contracts) under the operations section of the MetadataFeature page?

For instance I want to hide in production the following endpoints:

I’m not seeing that DebugMode hides these automagically like the “Debug Info” section.

You can specify it in the config, e.g:

Feature disableFeatures = Feature.Jsv | Feature.Csv | Feature.Xml | Feature.Soap;

SetConfig(new HostConfig {
    EnableFeatures = Feature.All.Remove(disableFeatures), 

Jon Kennerly:

I do want to hide the Soap feature, but that’s not really what I’m asking here.

I want to hide the Operation itself from the list, not just the serialization option. For instance, I have RequestLogs feature enabled, but I don’t want it to appear in the list.

Sorry if I’m not explaining very well.

ok you can restrict visibility of services with [Restrict] attribute:

You can use runtime attributes API to add these attributes on existing services, e.g:

    .AddAttributes(new RestrictAttribute { InternalOnly = true});