0
使用VS2012并从SL商业应用项目开始,我添加了 EF模型Model1,删除了tt文件,将代码gen更改为Default并构建了项目。然后我添加了DomainService1和各种表格。未选择OData。如何使用SL/RIA作为WCF
启动应用程序似乎有可用的服务:
但是,如果我们点击链接,我们希望看到XML,并且它不工作。附加?wsdl应该使XML发送到浏览器,但我只是看到了说明页面。与SvcUtil工具尝试它通过这个页面的建议会产生这样的:
Microsoft (R) Service Model Metadata Tool [Microsoft (R) Windows (R) Communication
Foundation, Version 4.0.30319.17929] Copyright (c) Microsoft Corporation.
All rights reserved.
Attempting to download metadata from 'http://localhost:57880/Ria1-Web-DomainService1.sv
c?wsdl' using WS-Metadata Exchange or DISCO. Generating files...
Warning: No code was generated. If you were trying to generate a client, this could be
because the metadata documents did not contain any valid contracts or services or
because all contracts/services were discovered to exist in /reference assemblies.
Verify that you passed all the metadata documents to the tool.
Warning: If you would like to generate data contracts from schemas make sure to use
the /dataContractOnly option.
这似乎暗示MEX端点设计不当,所以出来了我的WCF的书,但之间他们认为没有相关性应该在<system.serviceModel>
和实际为有:
<system.serviceModel>
<serviceHostingEnvironment
aspNetCompatibilityEnabled="true"
multipleSiteBindingsEnabled="true" />
</system.serviceModel>
我需要什么添加到config来公开元数据?