It is wrong for WCF to use a section registered as allowdefinition= ' machinetoapplication ' outside the application level.

Source: Internet
Author: User

The error message is as follows:

Server error in "/" application. Configuration Error   Description: An error occurred while processing the configuration file required to service the request. Please check the specific error details below and modify the configuration file as appropriate.  Parser Error message: Using a section registered as allowdefinition= ' machinetoapplication ' outside the application level is an error. This error can be caused if the virtual directory is not configured as an application in IIS. SOURCE Error: Line:       <add binding= "basichttpsbinding" scheme= "https"/> Line:     </protocolMapping> line:     <servicehostingenvironment aspnetcompatibilityenabled= "true" multiplesitebindingsenabled= "true"/> Line:   </system.serviceModel> line:   <system.webServer>  source file:  e:\ workspace \iis\jiankunkingservices\ Web    . config line:  

Workaround:

comment out in the Web. config file

<servicehostingenvironment aspnetcompatibilityenabled= "true" multiplesitebindingsenabled= "true"/>


After commenting, you may receive the following error:

The type "Wcfservicestudy.wcfservice" is not found, it is provided as Servi in the ServiceHost directive


In fact, after the virtual directory is set up as an application, comments or not comments on the above sentence will no longer error.


Small bet

I am deploying a WCF application.


Copyright: jiankunking Source: http://blog.csdn.net/jiankunking This article is copyright to the author and Csdn, Welcome to reprint, but without the consent of the author must retain this paragraph, and in the article page obvious location to the original connection.

It is wrong for WCF to use a section registered as allowdefinition= ' machinetoapplication ' outside the application level.

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.