StaticFileExtensions.UseStaticFiles Method (IAppBuilder, StaticFileOptions)

Enables static file serving with the given options

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


<ExtensionAttribute> _
Public Shared Function UseStaticFiles ( _
    builder As IAppBuilder, _
    options As StaticFileOptions _
) As IAppBuilder
Dim builder As IAppBuilder 
Dim options As StaticFileOptions 
Dim returnValue As IAppBuilder 

returnValue = builder.UseStaticFiles(options)
public static IAppBuilder UseStaticFiles(
    this IAppBuilder builder,
    StaticFileOptions options
static IAppBuilder^ UseStaticFiles(
    IAppBuilder^ builder, 
    StaticFileOptions^ options
static member UseStaticFiles : 
        builder:IAppBuilder * 
        options:StaticFileOptions -> IAppBuilder
public static function UseStaticFiles(
    builder : IAppBuilder, 
    options : StaticFileOptions
) : IAppBuilder


  • builder
    Type: IAppBuilder

Return Value

Type: IAppBuilder
Returns IAppBuilder.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IAppBuilder. When you use instance method syntax to call this method, omit the first parameter. For more information, see b8020aae-374d-46a9-bcb7-8cc2390b93b6 or 175ce3ff-9bbf-4e64-8421-faeb81a0bb51.

See Also


StaticFileExtensions Class

UseStaticFiles Overload

Owin Namespace