Skip to main content

HostConfig

Assembly: ServiceStack.dll​
View Source​
Declaration
public class HostConfig

Properties​

Instance​

View Source​
Declaration
public static HostConfig Instance { get; }

WsdlServiceNamespace​

View Source​
Declaration
public string WsdlServiceNamespace { get; set; }

ApiVersion​

View Source​
Declaration
public string ApiVersion { get; set; }

AppInfo​

View Source​
Declaration
public AppInfo AppInfo { get; set; }

MetadataVisibility​

View Source​
Declaration
public RequestAttributes MetadataVisibility { get; set; }

EmbeddedResourceBaseTypes​

View Source​
Declaration
public List<Type> EmbeddedResourceBaseTypes { get; set; }

EmbeddedResourceSources​

View Source​
Declaration
public List<Assembly> EmbeddedResourceSources { get; set; }

EmbeddedResourceTreatAsFiles​

View Source​
Declaration
public HashSet<string> EmbeddedResourceTreatAsFiles { get; set; }

DefaultContentType​

View Source​
Declaration
public string DefaultContentType { get; set; }

PreferredContentTypes​

View Source​
Declaration
public List<string> PreferredContentTypes { get; set; }

AllowJsonpRequests​

View Source​
Declaration
public bool AllowJsonpRequests { get; set; }

AllowRouteContentTypeExtensions​

View Source​
Declaration
public bool AllowRouteContentTypeExtensions { get; set; }

BufferSyncSerializers​

View Source​
Declaration
public bool BufferSyncSerializers { get; set; }

DebugMode​

View Source​
Declaration
public bool DebugMode { get; set; }

StrictMode​

View Source​
Declaration
public bool? StrictMode { get; set; }

DebugAspNetHostEnvironment​

View Source​
Declaration
public string DebugAspNetHostEnvironment { get; set; }

DebugHttpListenerHostEnvironment​

View Source​
Declaration
public string DebugHttpListenerHostEnvironment { get; set; }

DefaultDocuments​

View Source​
Declaration
public List<string> DefaultDocuments { get; }

IgnoreWarningsOnAllProperties​

View Source​
Declaration
public bool IgnoreWarningsOnAllProperties { get; set; }

IgnoreWarningsOnAutoQueryApis​

View Source​
Declaration
public bool IgnoreWarningsOnAutoQueryApis { get; set; }

IgnoreWarningsOnPropertyNames​

View Source​
Declaration
public HashSet<string> IgnoreWarningsOnPropertyNames { get; }

IgnoreFormatsInMetadata​

View Source​
Declaration
public HashSet<string> IgnoreFormatsInMetadata { get; set; }

AllowFileExtensions​

View Source​
Declaration
public HashSet<string> AllowFileExtensions { get; set; }

CompressFilesWithExtensions​

View Source​
Declaration
public HashSet<string> CompressFilesWithExtensions { get; set; }

CompressFilesLargerThanBytes​

View Source​
Declaration
public long? CompressFilesLargerThanBytes { get; set; }

ForbiddenPaths​

View Source​
Declaration
public List<string> ForbiddenPaths { get; set; }

AllowFilePaths​

View Source​
Declaration
public List<string> AllowFilePaths { get; set; }

WebHostUrl​

View Source​
Declaration
public string WebHostUrl { get; set; }

WebHostPhysicalPath​

View Source​
Declaration
public string WebHostPhysicalPath { get; set; }

HandlerFactoryPath​

View Source​
Declaration
public string HandlerFactoryPath { get; set; }

PathBase​

View Source​
Declaration
public string PathBase { get; }

DefaultRedirectPath​

View Source​
Declaration
public string DefaultRedirectPath { get; set; }

MetadataRedirectPath​

View Source​
Declaration
public string MetadataRedirectPath { get; set; }

ServiceEndpointsMetadataConfig​

View Source​
Declaration
public ServiceEndpointsMetadataConfig ServiceEndpointsMetadataConfig { get; set; }

SoapServiceName​

View Source​
Declaration
public string SoapServiceName { get; set; }

XmlWriterSettings​

View Source​
Declaration
public XmlWriterSettings XmlWriterSettings { get; set; }

EnableAccessRestrictions​

View Source​
Declaration
public bool EnableAccessRestrictions { get; set; }

EnableAutoHtmlResponses​

View Source​
Declaration
public bool EnableAutoHtmlResponses { get; set; }

UseBclJsonSerializers​

View Source​
Declaration
public bool UseBclJsonSerializers { get; set; }

IsMobileRegex​

View Source​
Declaration
public Regex IsMobileRegex { get; set; }

RequestRules​

View Source​
Declaration
public Dictionary<string, Func<IHttpRequest, bool>> RequestRules { get; set; }

GlobalResponseHeaders​

View Source​
Declaration
public Dictionary<string, string> GlobalResponseHeaders { get; set; }

EnableFeatures​

View Source​
Declaration
public Feature EnableFeatures { get; set; }

ReturnsInnerException​

View Source​
Declaration
public bool ReturnsInnerException { get; set; }

WriteErrorsToResponse​

View Source​
Declaration
public bool WriteErrorsToResponse { get; set; }

DisposeDependenciesAfterUse​

View Source​
Declaration
public bool DisposeDependenciesAfterUse { get; set; }

LogUnobservedTaskExceptions​

View Source​
Declaration
public bool LogUnobservedTaskExceptions { get; set; }

LogFactory​

View Source​
Declaration
[Obsolete("Use LogManager.LogFactory")]
public ILogFactory LogFactory { get; set; }

HtmlReplaceTokens​

View Source​
Declaration
public Dictionary<string, string> HtmlReplaceTokens { get; set; }

AppendUtf8CharsetOnContentTypes​

View Source​
Declaration
public HashSet<string> AppendUtf8CharsetOnContentTypes { get; set; }

AddMaxAgeForStaticMimeTypes​

View Source​
Declaration
public Dictionary<string, TimeSpan> AddMaxAgeForStaticMimeTypes { get; set; }

RouteNamingConventions​

View Source​
Declaration
public List<RouteNamingConventionDelegate> RouteNamingConventions { get; set; }

MapExceptionToStatusCode​

View Source​
Declaration
public Dictionary<Type, int> MapExceptionToStatusCode { get; set; }

UseSaltedHash​

If enabled reverts to persist password hashes using the original SHA256 SaltedHash implementation. By default ServiceStack uses the more secure ASP.NET Identity v3 PBKDF2 with HMAC-SHA256 implementation.

New Users will have their passwords persisted with the specified implementation, likewise existing users will have their passwords re-hased to use the current registered IPasswordHasher.

View Source​
Declaration
public bool UseSaltedHash { get; set; }

FallbackPasswordHashers​

Older Password Hashers that were previously used to hash passwords. Failed password matches check to see if the password was hashed with any of the registered FallbackPasswordHashers, if true the password attempt will succeed and password will get re-hashed with the current registered IPasswordHasher.

View Source​
Declaration
public List<IPasswordHasher> FallbackPasswordHashers { get; }

AllowSessionIdsInHttpParams​

View Source​
Declaration
public bool AllowSessionIdsInHttpParams { get; set; }

AllowSessionCookies​

View Source​
Declaration
public bool AllowSessionCookies { get; set; }

RestrictAllCookiesToDomain​

View Source​
Declaration
public string RestrictAllCookiesToDomain { get; set; }

DefaultJsonpCacheExpiration​

View Source​
Declaration
public TimeSpan DefaultJsonpCacheExpiration { get; set; }

Return204NoContentForEmptyResponse​

View Source​
Declaration
public bool Return204NoContentForEmptyResponse { get; set; }

AllowJsConfig​

View Source​
Declaration
public bool AllowJsConfig { get; set; }

AllowPartialResponses​

View Source​
Declaration
public bool AllowPartialResponses { get; set; }

AllowNonHttpOnlyCookies​

View Source​
Declaration
[Obsolete("Use !UseHttpOnlyCookies")]
public bool AllowNonHttpOnlyCookies { set; }

OnlySendSessionCookiesSecurely​

View Source​
Declaration
[Obsolete("Use UseSecureCookies")]
public bool OnlySendSessionCookiesSecurely { set; }

UseSecureCookies​

View Source​
Declaration
public bool UseSecureCookies { get; set; }

UseHttpOnlyCookies​

View Source​
Declaration
public bool UseHttpOnlyCookies { get; set; }

UseSameSiteCookies​

Configure cookies to use SameSite=[null:Lax,true:Strict,false:None]

View Source​
Declaration
public bool? UseSameSiteCookies { get; set; }

AllowAclUrlReservation​

View Source​
Declaration
public bool AllowAclUrlReservation { get; set; }

AddRedirectParamsToQueryString​

View Source​
Declaration
public bool AddRedirectParamsToQueryString { get; set; }

RedirectToDefaultDocuments​

View Source​
Declaration
public bool RedirectToDefaultDocuments { get; set; }

StripApplicationVirtualPath​

View Source​
Declaration
public bool StripApplicationVirtualPath { get; set; }

SkipFormDataInCreatingRequest​

View Source​
Declaration
public bool SkipFormDataInCreatingRequest { get; set; }

RedirectDirectoriesToTrailingSlashes​

View Source​
Declaration
public bool RedirectDirectoriesToTrailingSlashes { get; set; }

ScanSkipPaths​

View Source​
Declaration
public List<string> ScanSkipPaths { get; }

RedirectPaths​

View Source​
Declaration
public Dictionary<string, string> RedirectPaths { get; }
View Source​
Declaration
public bool UseHttpsLinks { get; set; }

UseCamelCase​

View Source​
Declaration
public bool UseCamelCase { get; set; }

UseJsObject​

View Source​
Declaration
public bool UseJsObject { get; set; }

EnableOptimizations​

View Source​
Declaration
public bool EnableOptimizations { get; set; }

TreatNonNullableRefTypesAsRequired​

View Source​
Declaration
public bool TreatNonNullableRefTypesAsRequired { get; set; }

AdminAuthSecret​

View Source​
Declaration
public string AdminAuthSecret { get; set; }

AuthSecretSession​

View Source​
Declaration
public IAuthSession AuthSecretSession { get; set; }

FallbackRestPath​

View Source​
Declaration
public FallbackRestPathDelegate FallbackRestPath { get; set; }

RazorNamespaces​

View Source​
Declaration
public HashSet<string> RazorNamespaces { get; }

Fields​

DefaultWsdlNamespace​

View Source​
Declaration
public const string DefaultWsdlNamespace = "http://schemas.servicestack.net/types"

ServiceStackPath​

View Source​
Declaration
public static string ServiceStackPath

Methods​

ResetInstance()​

View Source​
Declaration
public static HostConfig ResetInstance()
Returns​

ServiceStack.HostConfig

NewInstance()​

View Source​
Declaration
public static HostConfig NewInstance()
Returns​

ServiceStack.HostConfig