简体   繁体   中英

Is Web.Config in WCF Service Application project incorrect?

I want to create a WCF Service Application using Visual Studio 2010. After creating the project I have 2 config files : 1. Web.Debug.config 2. Web.Release.config

This is the code in the files.

<?xml version="1.0"?>

    <!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->

    <configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">


    </configuration>

When I try to add any element or attribute it gives following warnings.

Could not find schema information for the attribute 'address'.
Could not find schema information for the attribute 'address'.
Could not find schema information for the attribute 'binding'.
Could not find schema information for the attribute 'binding'.
Could not find schema information for the attribute 'contract'.
Could not find schema information for the attribute 'contract'.
Could not find schema information for the attribute 'name'.
Could not find schema information for the element 'endpoint'.
Could not find schema information for the element 'endpoint'.
Could not find schema information for the element 'service'.
Could not find schema information for the element 'services'.

What am I doing wrong ? Is there anything to add or edit. I am trying to create a very simple WCF Service Application.

If that is the configuration file being used by the wcf host then you are missing the entire system.serviceModel . You will probably be better of regenerating the file by creating a new WCF service or at least using the Tools|Wcf Configuration Editor . Me thinks you moved some stuff around and your files have been misplaced.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM