.Net Ria服务部署

发布于 2024-08-10 19:39:34 字数 398 浏览 0 评论 0原文

我在将 RIA 服务/Silverlight 3 部署到临时环境时遇到困难。

这是我的情况: 1)我使用RIA进行身份验证。这在我的开发机器和临时环境中都运行良好。

2) 我创建了一个自定义 LinqToEntities RIA 服务来将数据从数据库获取到我的应用程序中。当我进行本地构建时,该服务工作正常,但在临时服务器上不起作用。

  • 当客户端调用服务器端 RIA 代码时,它永远不会被调用。
  • RiaContext 似乎初始化正常,即它不会抛出异常。
  • 我使用类似于 Context.Load(qry); 的代码将数据放入实体中。 LoadOperation 的完成事件被触发,但没有加载数据,服务器端方法也从未被调用。

关于可能出什么问题有什么想法吗?

I am having difficulty deploying RIA services/Silverlight 3 to a staging environment.

Here is my situation:
1) I am using RIA for authentication. This works fine on both my development machine and in the staging environment.

2) I created a custom LinqToEntities RIA service to get data from the database into my application. This service works fine when I do a local build, but does not work on the staging server.

  • The server side RIA code never gets called when the client makes a call to it.
  • The RiaContext appears to be initialized ok, i.e. it does not throw an exception.
  • I use code sililar to Context.Load(qry); to put data into the entities. The LoadOperation's complete event fires, but no data was loaded, the serverside methods were never called.

Any ideas on what may be wrong?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

吻安 2024-08-17 19:39:34

我会检查以确保您拥有:

  1. web.config 中的正确连接字符串。
  2. 该应用程序配置为在有权访问数据库的服务帐户下运行。

您的 Context.Load 应该传递一个已完成的事件处理程序,并且在该处理程序中您应该检查 LoadOperation.HasError 是否为 false。如果出现问题,不会抛出异常,您必须明确检查错误。

I would check to make sure that you have:

  1. The correct connection string in your web.config.
  2. The application is configured to run under a service account that has permissions to access the database.

Your Context.Load should be passing a completed event handler and in that handler you chould check that the LoadOperation.HasError is false. There will be no exception thrown if something went wrong, you have to explicity check for the error.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文