RIA 服务域服务类 web.config 设置 [英] RIA Services Domain Service Class web.config setting

查看:25
本文介绍了RIA 服务域服务类 web.config 设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已将域服务类添加到我的 SL4/EF/RIA 服务应用程序的服务器端项目中.我已经设法在我的 web.config 部分创建了所有必需的元素.(顺便说一句,为什么在我创建域服务类时没有为我生成这个?)

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?)

我现在缺少的是在端点元素的 contract 属性中放入什么:

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>

我认为它应该类似于 XXX.Web.RIAServices.IMyService 但我生成的代码中不存在该接口.

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?

推荐答案

我通过完全删除端点元素解决了这个问题.所以它变成了:

I solved it by removing the endpoint element entirely. So it became just:

<service behaviorConfiguration="XXX.Web.RIAServices.MyServiceBehavior" name="XXX.Web.RIAServices.MyService">

基本上我只需要让端点在运行时动态生成.

Basically I just need to let the enpoint get generated dynamically at runtime.

这篇关于RIA 服务域服务类 web.config 设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆