是否可以使用 ASP.NET 开发服务器托管 clientaccesspolicy.xml 文件?

发布于 2024-09-14 14:35:22 字数 220 浏览 1 评论 0原文

我有一个包含两个服务项目的解决方案(一个是托管单元测试 silverlight 应用程序,另一个是提供正在测试的服务)。由于跨域策略,我必须将主服务站点发布到 IIS,然后单元测试站点才能使用服务。

是否可以在 ASP.NET 开发服务器上托管 clientaccesspolicy.xml 文件,以便我可以运行这些文件而无需先进行 IIS 发布?或者,Visual Studio 是否提供了更优雅的解决方案?

I have a solution with two service projects (one is hosting a unit test silverlight application and other is providing the services being tested). Because of cross-domain policy, I have to publish the primary service site to IIS before the unit test site can consume a service.

Is it possible to host the clientaccesspolicy.xml file on ASP.NET Development Server so I can run these without needing to do an IIS publish first? OR, does Visual Studio provide a more elegant solution?

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

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

发布评论

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

评论(1

冰雪之触 2024-09-21 14:35:22

我不知道有什么“更优雅”的解决方案,但是您可以从 ASP.NET 开发服务器提供 clientaccesspolicy.xml 文件,它毕竟只是一个静态文件。只需将其作为内容文件添加到 Web 项目中即可。

I don't know of a "more elegant" solution, however you can serve a clientaccesspolicy.xml file from a ASP.NET development server, its after all just a static file. Just add it to the web project as a Content file.

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