错误404 - 在Silverlight RIA服务调用上找不到文件 [英] Error 404 - file not found on Silverlight RIA service call

查看:89
本文介绍了错误404 - 在Silverlight RIA服务调用上找不到文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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



Hello, 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.<br />
 <br />
   at System.ServiceModel.DomainServices.Client.OperationBase.Complete(Exception error)<br />
    at System.ServiceModel.DomainServices.Client.LoadOperation.Complete(Exception error)<br />
    at System.ServiceModel.DomainServices.Client.DomainContext.CompleteLoad(IAsyncResult asyncResult)<br />
    at System.ServiceModel.DomainServices.Client.DomainContext.<>c__DisplayClass1b.<load>b__17(Object )</load>



我发现的一切在线说要检查IIS上的身份验证区域,并确保它仅设置为匿名身份验证,它是。他们还说要启用WCF日志记录,当我将必要的文本添加到web.config文件时,我仍然没有得到任何日志。他们还说使用Fiddler2来跟踪HTTP调用,但我只在那里得到404错误,textview给我标准的IIS文件找不到网站。我无法弄清楚如何调试这个问题。



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



函数(或查询为RIA服务调用它)GetNewHWCoil位于DomainService类中并使用此代码:








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









错误在应该调用任何计算之前运行,因此假设它在'Return New HWCoil'部分出错。



任何有关此问题的帮助我很感激。



谢谢,



Chris





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

推荐答案

首先从互联网眉毛中调用您的WCF RIA服务呃。 WCF RIA服务自动创建一个端点供您连接。尝试一下,检查一下是否可以在不使用客户端的情况下使用它。



端点位于以下网址:



Start by calling your WCF RIA service from an internet browser. WCF RIA services automagically creates an endpoint for you to connect on. Try it and check if you can get it to work without using your client.

The endpoint is located at the following url:

[ApplicationBaseURI] + [DomainServiceFullName].svc (With all "." replaced by "-")





这不会直接解决你的问题,但可能会给你一些关于你的错误的指示。



This won't solve your problem directly but maybe give you some pointers as to where your error is.


非常感谢Mark Salsbery解决这个问题的答案。



当我将项目更改为从IIS调试时,它告诉我需要在我的服务器上安装ASP.NET 4。我以为我已经通过使用添加Windows功能完成了这项工作,但显然只是安装了ASP.NET 2.



所以我在线查看并发现我需要运行命令 C:\ WindowsD.Microsoft.NET\Framework\v4.0.30319\aspnet_regiis -i 。这就行了。



再次感谢你的帮助,

Chris
Many thanks to Mark Salsbery for the answer to this problem.

When I changed the project to debug from IIS, it told me that I needed to install ASP.NET 4 on my server. I thought I had already done that by using the Add Windows Features, but apparently that only intalled ASP.NET 2.

So I looked online and found that I needed to run the command C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis -i. This did the trick.

Again thanks for the help,
Chris


这篇关于错误404 - 在Silverlight RIA服务调用上找不到文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆