当我通过localhost运行Web应用程序时,查询WCF数据服务不起作用 [英] Querying WCF Data Services doesn't work when I run web application through localhost

查看:75
本文介绍了当我通过localhost运行Web应用程序时,查询WCF数据服务不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

我使用WCF数据服务页面在VS2010中创建了简单的ASP.NET Web应用程序。

I created the simple ASP.NET Web Application in VS2010 with WCF Data Services page.

然后我在IIS 7中为此项目创建了应用程序(我使用Win.7)。

Then I created application in IIS 7 for this project (I use Win. 7).

网站工作和服务也有效,例如当我请求
http://localhost/Chapter9/MovieService.svc/
 我从服务器获取xml结果,但是当我查询这个例如
http://localhost/Chapter9/MovieService.svc/Films &
http://localhost/Chapter9/MovieService.svc/Films(1 ), 我得到 "网站无法显示页面"。

The site works and service also works, for example when I request http://localhost/Chapter9/MovieService.svc/ I gets the xml result from server, but when I queries this for example http://localhost/Chapter9/MovieService.svc/Films or http://localhost/Chapter9/MovieService.svc/Films(1),  I gets  "The website cannot display the page".

当我从VS2010运行应用程序时,同样有效。

The same works when I run application from VS2010.

例如http://localhost:2648/MovieService.svc/Films &
http:// localhost:2648 / MovieService.svc / Films(1 )返回正确的xml结果。

For example http://localhost:2648/MovieService.svc/Films or http://localhost:2648/MovieService.svc/Films(1) returns proper xml result.

任意想法如何解决这个问题?

Any idea how can I resolve this?

谢谢。

 

 

 

推荐答案

您好,

尝试按照以下步骤操作这里概述:

Try following the steps outlined here:

http://blogs.msdn.com/b/phaniraj/archive/2008/06/18/debugging-ado-net-data-services.aspx

我也发现小提琴手( http://www.fiddler2.com/fiddler2/ )是一个很棒的工具,可以查看返回的实际响应。它应该提供一些关于
发生的线索。

I also find that fiddler (http://www.fiddler2.com/fiddler2/) is a great tool to see the actual response being returned. It should provide some clues as to what is happening.

谢谢,

Julian

Thanks,
Julian


这篇关于当我通过localhost运行Web应用程序时,查询WCF数据服务不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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