简体   繁体   English

WCF服务应用程序项目中的Web.Config是否不正确?

[英]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 我想使用Visual Studio 2010创建WCF服务应用程序。创建项目后,我有2个配置文件: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. 我正在尝试创建一个非常简单的WCF服务应用程序。

If that is the configuration file being used by the wcf host then you are missing the entire system.serviceModel . 如果那是wcf主机正在使用的配置文件,那么您将丢失整个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 . 通过创建新的WCF服务或至少使用Tools|Wcf Configuration Editor来重新生成文件可能会更好。 Me thinks you moved some stuff around and your files have been misplaced. 我认为您移动了一些东西,并且文件放错了位置。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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