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.

AspNetCompatibilityRequirementsMode Enumeration

 

Specifies whether a Windows Communication Foundation (WCF) service runs, or can run, in a mode that is compatible with ASP.NET.

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

public enum class AspNetCompatibilityRequirementsMode

Member nameDescription
Allowed

WCF services can run in an application domain with ASP.NET compatibility mode set to true or false.

NotAllowed

WCF services must run in an application domain with ASP.NET compatibility mode set to false.

Required

WCF services must run in an application domain with ASP.NET compatibility mode set to true.

ASP.NET compatibility mode allows WCF services to use ASP features such as identity impersonation. It is enabled at the application level through the Web.config file and cannot be overridden by Web.config files nested in the application. When the AspNetCompatibilityRequirementsMode value is not specified for a service, it gets Allowed behavior by default. For more information, see <serviceHostingEnvironment>.

Service developers can ensure that their service is only run in ASP.NET Compatibility Mode by setting the AspNetCompatibilityRequirementsMode property on the AspNetCompatibilityRequirementsAttribute to Required as shown in the following example:

No code example is currently available or this language may not be supported.
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