StaticFileOptions Class

 

Options for serving static files

Namespace:   Microsoft.Owin.StaticFiles
Assembly:  Microsoft.Owin.StaticFiles (in Microsoft.Owin.StaticFiles.dll)

Inheritance Hierarchy

System.Object
  Microsoft.Owin.StaticFiles.Infrastructure.SharedOptionsBase<T>
    Microsoft.Owin.StaticFiles.StaticFileOptions

Syntax

public class StaticFileOptions : SharedOptionsBase<StaticFileOptions>
public ref class StaticFileOptions : SharedOptionsBase<StaticFileOptions^>
type StaticFileOptions = 
    class
        inherit SharedOptionsBase<StaticFileOptions>
    end
Public Class StaticFileOptions
    Inherits SharedOptionsBase(Of StaticFileOptions)

Constructors

Name Description
System_CAPS_pubmethod StaticFileOptions()

Defaults to all request paths in the current physical directory

System_CAPS_pubmethod StaticFileOptions(SharedOptions)

Defaults to all request paths in the current physical directory

Properties

Name Description
System_CAPS_pubproperty ContentTypeProvider

Used to map files to content-types.

System_CAPS_pubproperty DefaultContentType

The default content type for a request if the ContentTypeProvider cannot determine one. None is provided by default, so the client must determine the format themselves. http://www.w3.org/Protocols/rfc2616/rfc2616-sec7.html#sec7

System_CAPS_pubproperty FileSystem

The file system used to locate resources(Inherited from SharedOptionsBase<T>.)

System_CAPS_pubproperty OnPrepareResponse

Called after the status code and headers have been set, but before the body has been written. This can be used to add or change the response headers.

System_CAPS_pubproperty RequestPath

The relative request path that maps to static resources.(Inherited from SharedOptionsBase<T>.)

System_CAPS_pubproperty ServeUnknownFileTypes

If the file is not a recognized content-type should it be served? Default: false.

System_CAPS_protproperty SharedOptions

Options common to several middleware components(Inherited from SharedOptionsBase<T>.)

Methods

Name Description
System_CAPS_pubmethod Equals(Object)

(Inherited from Object.)

System_CAPS_protmethod Finalize()

(Inherited from Object.)

System_CAPS_pubmethod GetHashCode()

(Inherited from Object.)

System_CAPS_pubmethod GetType()

(Inherited from Object.)

System_CAPS_protmethod MemberwiseClone()

(Inherited from Object.)

System_CAPS_pubmethod ToString()

(Inherited from Object.)

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Microsoft.Owin.StaticFiles Namespace

Return to top