The service cannot be activated and enabled due to the lack of Asp.net compatibility.

Source: Internet
Author: User

Original http://www.cnblogs.com/xtechnet/archive/2012/06/06/2537979.html

An error occurs during testing and publishing to a virtual directory. The service cannot be activated because Asp.net compatibility is not supported.

Error message:

The service cannot be activated because it does not support ASP. net compatibility. ASP. net compatibility is enabled for this application. turn Off ASP. net compatibility mode in the web. config or add the aspnetcompatibilityrequirements attribute to the service type with requirementsmode setting as 'allowed' or 'required '.

 

Do not look at the English error information, and you will be confused. The error information is clearly displayed:

1. Add <servicehostingenvironment aspnetcompatibilityenabled = "false"> to Web. config. Note that this is stored in <system. servicemodel>.

2. Add the additional attributes aspnetcompatibilityrequirements to the WCF Service class, as shown in figure

 

 

Author: xtechnet
Source: http://xTechnet.cnblogs.com/
Poor ability, but willing to share it with others. Please leave a message if you have any mistakes. Contempt .
The copyright of this article is shared by the author and the blog. You are welcome to repost this article, but you must keep this statement without the author's consent, Hao In Article The original text connection is given at an obvious location on the page, otherwise it will be retained. Contempt Your rights.

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.