Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

AspNetCompatibilityRequirementsAttribute::RequirementsMode Property

 

Gets or sets the level of ASP.NET compatibility required by the service.

Namespace:   System.ServiceModel.Activation
Assembly:  System.ServiceModel (in System.ServiceModel.dll)

public:
property AspNetCompatibilityRequirementsMode RequirementsMode {
	AspNetCompatibilityRequirementsMode get();
	void set(AspNetCompatibilityRequirementsMode value);
}

Property Value

Type: System.ServiceModel.Activation::AspNetCompatibilityRequirementsMode

The AspNetCompatibilityRequirementsMode that indicates the services required degree of ASP.NET compatibility. The default value is Allowed.

Exception Condition
InvalidEnumArgumentException

The value is not a valid one for the AspNetCompatibilityRequirementsModeenum.

Use the RequirementsMode property to set the hosting mode in code. This can also be done by setting an application-level configuration flag aspNetCompatibilityEnabled. For more information, see<serviceHostingEnvironment>.

At runtime, applications can detect whether ASP.NET compatibility mode is enabled by checking the value of the static property AspNetCompatibilityEnabled.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 3.0
Return to top
Show:
© 2017 Microsoft