开发者

Deployment of RIA Services app not working with Web Deployment Project

开发者 https://www.devze.com 2023-04-04 09:26 出处:网络
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 applica

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开发者_StackOverflow中文版 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?


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"

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号