.net 在VS2012中运行的我的WCF服务:无法从本地主机获取元数据
我知道这个错误在这里被贴了很多次,我读了无数的帖子试图找到答案,但在工作了几个小时后,我仍然被卡住了。昨天早上,我的服务工作得很好,但到了一天结束时,它开始显示这个错误。我没有更改app.config,但正在更改代码。我假设代码更改中的某些内容一定破坏了某些东西,但我不知道是什么。我查看了我的事件日志,但没有任何引用我的服务的内容 虽然我不认为我的配置有任何问题,但其内容如下:.net 在VS2012中运行的我的WCF服务:无法从本地主机获取元数据,.net,wcf,visual-studio-2012,metadata,config,.net,Wcf,Visual Studio 2012,Metadata,Config,我知道这个错误在这里被贴了很多次,我读了无数的帖子试图找到答案,但在工作了几个小时后,我仍然被卡住了。昨天早上,我的服务工作得很好,但到了一天结束时,它开始显示这个错误。我没有更改app.config,但正在更改代码。我假设代码更改中的某些内容一定破坏了某些东西,但我不知道是什么。我查看了我的事件日志,但没有任何引用我的服务的内容 虽然我不认为我的配置有任何问题,但其内容如下: <system.serviceModel> <services> <service
<system.serviceModel>
<services>
<service name="ElectronicContactServiceLibrary.ElectronicContactService">
<endpoint address="" binding="basicHttpBinding" contract="ElectronicContactServiceLibrary.IElectronicContactService">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseAddress="http://localhost:8733/Design_Time_Addresses/ElectronicContactServiceLibrary/ElectronicContactService/" />
</baseAddresses>
</host>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior>
<!-- To avoid disclosing metadata information,
set the values below to false before deployment -->
<serviceMetadata httpGetEnabled="True" httpsGetEnabled="True"/>
<!-- To receive exception details in faults for debugging purposes,
set the value below to true. Set to false before deployment
to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="True" />
</behavior>
</serviceBehaviors>
</behaviors>
我可以采取什么步骤来解决这个问题?似乎我添加了一个带有错误装饰的枚举值,因为我忘记填充该值:
<DataContract>
Public Enum Status
<EnumMember(Value:="")>
NoValue = 0
公共枚举状态
NoValue=0