Share via


CorsHttpConfigurationExtensions.SetCorsPolicyProviderFactory Method (HttpConfiguration, ICorsPolicyProviderFactory)

 

Sets the ICorsPolicyProviderFactory on the HttpConfiguration.

Namespace:   System.Web.Http
Assembly:  System.Web.Http.Cors (in System.Web.Http.Cors.dll)

Syntax

public static void SetCorsPolicyProviderFactory(
    this HttpConfiguration httpConfiguration,
    ICorsPolicyProviderFactory corsPolicyProviderFactory
)
public:
[ExtensionAttribute]
static void SetCorsPolicyProviderFactory(
    HttpConfiguration^ httpConfiguration,
    ICorsPolicyProviderFactory^ corsPolicyProviderFactory
)
static member SetCorsPolicyProviderFactory : 
        httpConfiguration:HttpConfiguration *
        corsPolicyProviderFactory:ICorsPolicyProviderFactory -> unit
<ExtensionAttribute>
Public Shared Sub SetCorsPolicyProviderFactory (
    httpConfiguration As HttpConfiguration,
    corsPolicyProviderFactory As ICorsPolicyProviderFactory
)

Parameters

Exceptions

Exception Condition
ArgumentNullException

httpConfiguration or corsPolicyProviderFactory

See Also

CorsHttpConfigurationExtensions Class
System.Web.Http Namespace

Return to top