RIA 服务应用程序的部署不适用于 Web 部署项目

发布于 2024-12-04 18:17:55 字数 1089 浏览 1 评论 0原文

我正在尝试部署已使用 Visual Studio 2010 Web 部署项目。当我使用 Visual Studio 将应用程序部署到 IIS 时,应用程序运行良好。但是,当我使用 Web 部署项目预编译应用程序时,对同一系统上的 RIA 服务的第一次调用失败。会产生与此类似的错误:

Load operation failed for query 'Login'.  The remote server returned an error: NotFound.

根据 这个问题。使用 Fiddler,我发现该错误是服务器上真正的“未找到”错误,因为该服务无法成立。我还尝试直接引用该服务的 URL,但失败了。

搜索网络,关于 这篇文章指出 Web 部署项目和 RIA 服务存在已知问题,并且帖子指出该问题是 RIA 服务使用的虚拟路径提供程序的问题将传入请求映射到正确的域服务。

我的问题是,是否可以让 RIA 服务 Web 应用程序与 Web 部署项目一起使用?是否需要更改配置才能使其正常工作?引用的站点之一提到手动创建 .svc 文件,这是解决问题的正确方法吗?

I'm attempting to deploy a RIA services 1.0SP1 project that has been precompiled with a Visual Studio 2010 Web Deployment Project. When I deploy the application to IIS using Visual Studio, the application runs fine. However, when I use a web deployment project to precompile the application, the first call to a RIA services service on the same system fails. An error similar to this is produced:

Load operation failed for query 'Login'.  The remote server returned an error: NotFound.

It appears that the "NotFound" error happens frequently in RIA Services applications, as per this question. Using Fiddler, I discovered the error is a true Not Found error on the server, where as the service cannot be found. I also attempted to reference the URL of the service directly, which failed.

Searching the web, the comments on this post point to there being known problems with web deployment projects and RIA Services and this post points to the issue being a problem with Virtual Path Provider that RIA services uses to map the incoming requests to the proper domain service.

My question is, is it possible to get a RIA Services Web application working with a Web Deployment Project? Are there configuration changes required to make this work? One of the referenced sites mentions manually creating .svc files, is this the correct approach for solving the problem?

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

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

发布评论

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

评论(1

好菇凉咱不稀罕他 2024-12-11 18:17:55

这是我能找到的。 RIA 不支持在网站项目中部署。这是一个有意的决定,在工具中很明显(您不能将 RIA 添加到链接到网站的新 SL 应用程序中)。我的最佳猜测是预编译部署选项可能会干扰 RIA 虚拟路径提供程序的执行。

我找不到任何可以证实 VPP 不会运行的信息,但以下是引导我得出结论的来源。

1) 来自http://msdn.microsoft.com/en-us/magazine/ cc163675.aspx

“请注意,部署目录中的 .aspx 文件只是没有内容的标记文件。将它们保留在那里是为了确保存在具有端点名称的文件,以防“检查文件存在”设置了 IIS 应用程序中 .aspx 扩展名的选项。”

2) 来自http://forums.silverlight.net/forums/t/218547。 aspx#531318

“当您使用 Web 部署项目构建和部署 RIA 服务网站时,您必须复制一个虚拟页面.svc 扩展名文件位于“ClientBin”下,或创建文件夹“Services”并将文件粘贴到此处。”

3)来自http://forums.silverlight.net/forums/p/ 186739/428256.aspx#428488

“如果 [已发布] 网站项目不工作,转到该文件夹​​,删除 PrecompliedApp.config”

Here's what I could find. RIA does not support deployment in a Web Site project. This is an intentional decision that is evident in the tooling (you cannot add RIA to a new SL application that you're linking to a Web Site). My best guess is the precompiled deployment option can interfere with the execution of RIA's Virtual Path Provider.

I can't find anything that confirms the VPP will not run, but here are the sources that lead me to the conclusion.

1) From http://msdn.microsoft.com/en-us/magazine/cc163675.aspx

"Note that the .aspx files in the deployment directory are just marker files with no content. They have been left there to ensure that a file with the endpoint name is present in case the "Check that file exists" option for the .aspx extension in an IIS app is set."

2) From http://forums.silverlight.net/forums/t/218547.aspx#531318

"When you build and deploy your RIA services website using web deployment project then you have to copy a dummy page with .svc extension file under "ClientBin" or create a folder "Services" and paste the file there."

3) From http://forums.silverlight.net/forums/p/186739/428256.aspx#428488

"If the [published] WebSite project does not work, go to the folder, delete the PrecompliedApp.config"

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