错误 404 - Silverlight RIA 服务调用中未找到文件

发布于 2024-11-09 15:45:31 字数 1545 浏览 3 评论 0原文

我到处寻找解决我的问题的方法,但找不到。我已经构建了一个 Silverlight 4 导航应用程序,并使用 RIA 服务来处理自定义实体(本质上是对 COM dll 运行服务器端调用)。在我的调试环境中,一切正常,但是当我尝试将 IIS7(在开发计算机上)作为网站部署时,在对实体调用 Get 查询时出现以下错误:

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

   at System.ServiceModel.DomainServices.Client.OperationBase.Complete(Exception error)
    at System.ServiceModel.DomainServices.Client.LoadOperation.Complete(Exception error)
    at System.ServiceModel.DomainServices.Client.DomainContext.CompleteLoad(IAsyncResult asyncResult)
    at System.ServiceModel.DomainServices.Client.DomainContext.<>c__DisplayClass1b.<Load>b__17(Object )

我在网上找到的所有内容都说要检查IIS 上的身份验证区域,并确保它仅设置为匿名身份验证(确实如此)。他们还说启用 WCF 日志记录,当我将必要的文本添加到 web.config 文件时,我仍然没有收到任何日志。他们还说使用 Fiddler2 来跟踪 HTTP 调用,但我只收到 404 错误,其中 textview 给了我标准 IIS 文件未找到网站。我不知道如何调试这个问题。

Silverlight 应用程序需要调用一组第 3 方 COM dll 来计算水盘管的性能。由于我不想让应用程序运行 OOB(这将否定它作为 Web 应用程序而不是 WPF 应用程序的全部意义),因此我让 ASP.net 项目使用自定义实体与 dll 进行交互。

函数(或 RIA 服务调用它的 Query)GetNewHWCoil 位于 DomainService 类中并使用以下代码:

Public Function GetNewHWCoil() as HWCoil 'HWCoil is a custom object
   If bRanCalc then 'bRanCalc is a global boolean variable that gets set to true if the calc call on the dlls have been made
      Return mHWCoil 'global copy of the calculated coil object
      bRanCalc = False
   else
      Return New HWCoil
   end if
End Function

该错误在调用任何计算之前运行,因此假定它在“返回新 HWCoil”部分出错。

对此的任何帮助将不胜感激。

谢谢,

克里斯

I have search everywhere for a solution to my problem, but I am not able to find one. I have built a Silverlight 4 Navigation app, and am using RIA Services to process a custom entity (which is essentially running server-side calls to COM dlls). In my debug environment, everything works fine, but when I try to deploy to IIS7 (on the development machine) as a website, it gives me the following error when calling the Get query on the entity:

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

   at System.ServiceModel.DomainServices.Client.OperationBase.Complete(Exception error)
    at System.ServiceModel.DomainServices.Client.LoadOperation.Complete(Exception error)
    at System.ServiceModel.DomainServices.Client.DomainContext.CompleteLoad(IAsyncResult asyncResult)
    at System.ServiceModel.DomainServices.Client.DomainContext.<>c__DisplayClass1b.<Load>b__17(Object )

Everything I found online says to check the Authentication area on IIS and make sure that it is set only to Anonymous Authentication, which it is. And they also say to enable WCF logging, which when I add the necessary text to the web.config file, I still don't get any logs. They also say to use Fiddler2 to trace the HTTP calls, but I only get a 404 error on there with the textview giving me the standard IIS file not found website. I cannot figure out how to debug this problem.

The Silverlight app needs to make calls to a set of 3rd party COM dlls to calculate the performace of water coils. Since I do not want to have the app run OOB, (this will negate the whole point of it being a web app instead of a WPF app) I have the ASP.net project interacting with the dlls using the custom entities.

The function (or Query as RIA services calls it) GetNewHWCoil is located in the DomainService class and uses this code:

Public Function GetNewHWCoil() as HWCoil 'HWCoil is a custom object
   If bRanCalc then 'bRanCalc is a global boolean variable that gets set to true if the calc call on the dlls have been made
      Return mHWCoil 'global copy of the calculated coil object
      bRanCalc = False
   else
      Return New HWCoil
   end if
End Function

The error runs before any calculation should be called, so it is assumed that it is erroring on the 'Return New HWCoil' part.

Any help on this would be appreciated.

Thanks,

Chris

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

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

发布评论

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

评论(1

星光不落少年眉 2024-11-16 15:45:31

我找到了解决问题的方法。我发现我可以让 VS 从 IIS 运行调试,当我让它创建虚拟目录时,它告诉我需要在服务器上安装 ASP.NET 4。我认为通过选中“添加 Windows 功能”对话框中的 ASP.NET 复选框,我已经完成了该操作。但它只安装了.NET 2版本。因此,在网上查找这个新问题后,我发现我需要运行该命令

C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis -i 

,之后一切正常。

克里斯

I found the solution to my problem. I fonud out that I can have VS run the debug from IIS, and when I had it create the virtual directory it told me I needed to install ASP.NET 4 on the server. I thought that by checking the ASP.NET checkbox in the Add Windows Features dialog that I had already done that. But it only installed .NET 2 version. So after looking online for this new problem, I found that I needed to run the command

C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis -i 

and everything worked fine after that.

Chris

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