WCF、Silverlight:找不到 clientaccesspolicy.xml [英] WCF, Silverlight: clientaccesspolicy.xml not being found

查看:27
本文介绍了WCF、Silverlight:找不到 clientaccesspolicy.xml的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将我的 Silverlight 应用程序连接到我自己托管的 WCF 服务.我创建了一个 clientaccesspolicy.xml 文件,并将其放置在服务宿主项目的根目录中,但是当我尝试点击服务,我的 http 嗅探器说找不到它.具体来说,它要查找的文件是 http://localhost:8080/clientaccesspolicy.xml.

I"m trying to connect my Silverlight application to a WCF service that I'm hosting myself. I've created a clientaccesspolicy.xml file, and placed it in the service host project's root, but when I try to hit the service, my http sniffer says it can't be found. Specifically the file it's looking for is http://localhost:8080/clientaccesspolicy.xml.

我正在 Visual Studio 2010 中以调试模式运行服务器和 Silverlight 应用程序.我需要将文件放在其他地方吗?

I'm running the server and the silverlight app in debug mode in Visual Studio 2010. Do I need to put the file somewhere else?

推荐答案

我不明白你们是如何托管 WCF 服务的?

I did not understand how you're hosting your WCF service?

它是托管在 asp.net 应用程序还是 windows 主机(自托管)中?如果是后者,您可能需要实现一个 clientaccesspolicy 服务,根据请求提供 clientaccesspolicy.xml 文件的内容.

Is it hosted in a asp.net application or a windows host (self-hosting)? If the latter is the case, you may have to implement a clientaccesspolicy service that provides the content of the clientaccesspolicy.xml file on request.

例如 这个.

这篇关于WCF、Silverlight:找不到 clientaccesspolicy.xml的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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