WCF RIA 服务类库和部署

发布于 2024-11-16 09:21:35 字数 580 浏览 5 评论 0原文

请按照 http://msdn.microsoft 上的演练进行操作。 com/en-us/library/ee707351(v=VS.91).aspx 我有一个有效的 Silverlight 解决方案,它采用 WCF RIA 服务类库。我现在陷入了如何将其部署到生产服务器的困境。

在之前使用标准 WCF 类库的项目(未使用 RIA 服务)中,我必须创建一个单独的 Web 应用程序来托管服务。在部署时,很明显我需要部署前端(Silverlight 托管)Web 应用程序和服务器(WCF 托管)Web 应用程序,并且一切运行良好。

使用 WCF RIA 服务类库解决方案时,该解决方案中只有一个 Web 应用程序。我假设由于该解决方案在 VS 中工作,该服务以某种方式托管在为 Silverlight 前端创建的同一个 Web 应用程序中,但这并不明显。无论如何,我使用 Web Deploy 部署了该应用程序(就像我之前完成过其他应用程序一样),但它不起作用。我真的没想到会这样!

有人能指出我正确的方向吗?

Following the walkthrough at http://msdn.microsoft.com/en-us/library/ee707351(v=VS.91).aspx I have a working Silverlight solution that employs a WCF RIA Services Class Library. I am now stuck on how to deploy this to a production server.

In a previous project (not using RIA services) that used a standard WCF Class Library I had to create a seperate web application to host the services. When it came to deployment it was obvious that I needed to deploy both the front-end (Silverlight hosting) web app and the server (WCF hosting) web app and everything worked well.

With the WCF RIA Services Class library solution there is only one web app in the solution. I am presuming that since the solution works in VS, the service is somehow being hosted in the same web app that was created for the Silverlight front-end but this is not visibly clear. Anyhow, I deployed the application using Web Deploy (as I have done other apps before) but it does not work. I didn't really expect it to!

Can anyone point me in the right direction?

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

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

发布评论

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

评论(2

花开柳相依 2024-11-23 09:21:35

当您将 .web RIA 类库项目链接到主 Web 项目时,将通过以下 URL 在幕后访问这些服务:

http://localhost:2911/ClientBin/RiaServices-Documents-Web-DocumentDomainService.svc/binary/GetDocuments?$take=20&$includeTotalCount=True

客户端 RIA 类库项目仅假定相对 URL(相对于托管项目),因此它们可以工作在任何 Silverlight 应用程序中。

唯一的要求是将 RIA 服务“.Web”项目链接到托管 Silverlight 应用程序的网站。这会将所需的服务放置在与 clientbin 文件夹相关的位置,以供使用。

When you link the .web RIA class library projects to your main web project, the services are accessed behind the scenes by URLs like:

http://localhost:2911/ClientBin/RiaServices-Documents-Web-DocumentDomainService.svc/binary/GetDocuments?$take=20&$includeTotalCount=True

The client RIA class library projects just assume a relative URL (relative to the hosting project), so they will work in any Silverlight application.

The only requirement is that you link the RIA service ".Web" project to the website hosting your Silverlight app. That will place the required service relative to the clientbin folder, ready to be consumed.

泡沫很甜 2024-11-23 09:21:35

我没有在 IIS 服务器上安装 RIA,因为我收到一条消息,让我相信您无法执行此操作。但是,有一个命令提示符命令可以执行特殊的服务器安装,请参阅此处 msdn.microsoft.com/en-us/library/ff426913(v=VS.91).aspx。现在只需部署 Web 项目即可工作。

I had not installed RIA on the IIS Server because I received a message that led me to believe that you couldn't do it. However there is a command prompt command to do a special Server install see here msdn.microsoft.com/en-us/library/ff426913(v=VS.91).aspx. It now works by simply deploying the Web project.

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