我正在尝试向WCF RIA服务添加一个JSON端点。
我读过很多关于这方面的教程,我也在silverlight.net上看过视频。
每当我找到关于这个主题的东西时,都会被告知在web.config中使用web.config标记。
一个代码示例如下所示:
<system.serviceModel>
<domainServices>
<endpoints>
<add name="JSON" type="Microsoft.ServiceModel.DomainServices.Hosting.JsonEndpointFactory, Microsoft.ServiceModel.DomainServices.Hosting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
</endpoints>
</domainServices>
<system.serviceModel>这是不起作用的,有两个问题:
除其他外,我在我的web项目中引用了以下DLL:
-Microsoft.ServiceModel.DomainServices.Hosting
-Microsoft.ServiceModel.DomainServices.Tools
-Microsoft.ServiceModel.DomainServices.LinqToSql
-System.ServiceModel.DomainServices.EntityFramework
-System.ServiceModel.DomainServices.Hosting
-System.ServiceModel.DomainServices.Hosting.OData
-System.ServiceModel.DomainServices.Server
我还安装了WCFRIAServicesV1.0 SP2。
我真的不知道该怎么解决。我需要帮助。我搜索过很多次了。
谢谢。
这个案子已经解决了。请读我对杰夫的回答的评论。您可能会发现有关此问题的其他信息。
发布于 2013-01-23 00:24:23
JSON端点是的一部分,而不是产品本身。您可以在这里获得Toolkit MSI:http://www.microsoft.com/en-us/download/details.aspx?id=26939
但是,我建议使用NuGet包( RIAServices.Endpoints包:http://nuget.org/packages/RIAServices.Endpoints )将JSON端点拖进JSON
以下是有关可用的NuGet包的更多信息:http://jeffhandley.com/archive/2012/12/10/RIA-Services-NuGet-Package-Updates-ndash-Including-Support-for-EntityFramework.aspx
发布于 2015-06-21 14:53:48
对我来说,解决这个问题的正确方法是在web.config中添加以下内容
<configuration>
<configSections>
<sectionGroup name="system.serviceModel">
<section name="domainServices" type="System.ServiceModel.DomainServices.Hosting.DomainServicesSection, System.ServiceModel.DomainServices.Hosting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" allowDefinition="MachineToApplication" requirePermission="false" />
</sectionGroup>
</configSections> ...https://stackoverflow.com/questions/14455597
复制相似问题