Freigeben über


CorsHttpConfigurationExtensions.EnableCors Method

 

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

Overload List

Name Description
System_CAPS_pubmethodSystem_CAPS_static EnableCors(HttpConfiguration)

Enables the support for CORS.

System_CAPS_pubmethodSystem_CAPS_static EnableCors(HttpConfiguration, ICorsPolicyProvider)

Enables the support for CORS.

See Also

CorsHttpConfigurationExtensions Class
System.Web.Http Namespace

Return to top

CorsHttpConfigurationExtensions.EnableCors Method (HttpConfiguration)

Enables the support for CORS.

Syntax

public static void EnableCors(
    this HttpConfiguration httpConfiguration
)
public:
[ExtensionAttribute]
static void EnableCors(
    HttpConfiguration^ httpConfiguration
)
static member EnableCors : 
        httpConfiguration:HttpConfiguration -> unit
<ExtensionAttribute>
Public Shared Sub EnableCors (
    httpConfiguration As HttpConfiguration
)

Parameters

Return to top

CorsHttpConfigurationExtensions.EnableCors Method (HttpConfiguration, ICorsPolicyProvider)

Enables the support for CORS.

Syntax

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

Parameters

Exceptions

Exception Condition
ArgumentNullException

httpConfiguration

Return to top