RIA 服务域服务类 web.config 设置
我已将域服务类添加到 SL4 / EF / RIA 服务应用程序的服务器端项目中。我已成功创建 web.config 部分所需的所有必要元素。 (顺便说一句,为什么在我创建域服务类时没有为我生成这个?)
我现在缺少的是在端点元素的契约属性中放入的内容:
<service behaviorConfiguration="XXX.Web.RIAServices.MyServiceBehavior" name="XXX.Web.RIAServices.MyService">
<endpoint address="http://localhost:6400/ClientBin/XXX-Web-RIAServices-MyService.svc" binding="basicHttpBinding" bindingConfiguration="LargeData" contract="???">
<identity>
</identity>
</endpoint>
</service>
我认为它应该类似于 XXX.Web.RIAServices.IMyService
但该接口在我生成的代码中不存在。
我在合约属性中放置什么?
I've added a domain service class to the server side project of my SL4 / EF / RIA Services application. I've managed to create all the necessary elements needed in my web.config section. (Btw, why isn't this generated for me when I created my Domain Service Class?)
What I'm missing now is what to put in the contract attribute of my endpoint element:
<service behaviorConfiguration="XXX.Web.RIAServices.MyServiceBehavior" name="XXX.Web.RIAServices.MyService">
<endpoint address="http://localhost:6400/ClientBin/XXX-Web-RIAServices-MyService.svc" binding="basicHttpBinding" bindingConfiguration="LargeData" contract="???">
<identity>
</identity>
</endpoint>
</service>
I would think it should be something like XXX.Web.RIAServices.IMyService
but that interface does not exist in my generated code.
What do I put in the contract attribute?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
对于那些可能使用此方法通过附加设置来配置 DomainService 的人来说,以下是如何增加 ObjectGraph 以允许 WCF RIA 服务在操作期间封送超过默认数量的对象:
Just for those out there who may use this as a way to config their DomainService with additional settings, here is how you would increase the ObjectGraph to allow WCF RIA Services to marshal more than the default # of objects during an operation:
我认为,合约应该是扩展
DomainService
的类。The contract should be the class that extends
DomainService
, I think.我通过完全删除端点元素解决了这个问题。所以它变成了:
基本上我只需要让 enpoint 在运行时动态生成。
I solved it by removing the endpoint element entirely. So it became just:
Basically I just need to let the enpoint get generated dynamically at runtime.