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來公開元數據?