AspNetCompatibilityRequirementsAttribute::RequirementsMode Property
.NET Framework (current version)
Gets or sets the level of ASP.NET compatibility required by the service.
Assembly: System.ServiceModel (in System.ServiceModel.dll)
public: property AspNetCompatibilityRequirementsMode RequirementsMode { AspNetCompatibilityRequirementsMode get(); void set(AspNetCompatibilityRequirementsMode value); }
Property Value
Type: System.ServiceModel.Activation::AspNetCompatibilityRequirementsModeThe 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.
.NET Framework
Available since 3.0
Available since 3.0
Show: