如何使 Visual Studio 2008 从 http://localhost/ 加载动态生成的测试页

发布于 2024-08-05 11:15:06 字数 885 浏览 7 评论 0原文

我正在使用 Microsoft Silverlight 3 开发一个小型 Web 应用程序。我使用 Microsoft Expressin Blend 3 进行 UI 开发,使用 Visual Studio 2008 进行“代码隐藏”。从 Blen 3 调试项目时,一切正常。 Silverlight 会自动嵌入到 TestPage 中并从

http://localhost/TestPage.html

但是,从 Visual Studio 2008 启动调试器时,silverlight 应用程序是自动嵌入到 TestPage.html 中,但知道从 file:// 加载,如下所示:

文件:///C:/Documents%20and%20Settings/JadaJada/My%20Documents/Expression/Blend%203/Projects/JadaJada/JadaJada/Bin/Debug/TestPage.html

结果,应用程序无法工作(这可能是因为应用程序使用 WebClient 向 http://localhost/ 发出了一些 HTTP 请求。

有谁知道如何让 Visual Studio 从 http://localhost/ 而不是 file:/// 加载 TestPage.html C:/贾达贾达/?

感谢您的帮助!

I'm developing a small web application using Microsoft Silverlight 3. I'm using Microsoft Expressin Blend 3 for UI development and Visual Studio 2008 for "code-behind". When debugging the project from Blen 3, it all works well. The Silverlight is automatically embedded into an TestPage and loaded from

http://localhost/TestPage.html

However, when starting the debugger from Visual Studio 2008, the silverlight app is automatically embedded in a TestPage.html, but know loaded from file:// , as in:

file:///C:/Documents%20and%20Settings/JadaJada/My%20Documents/Expression/Blend%203/Projects/JadaJada/JadaJada/Bin/Debug/TestPage.html

And as a result, the application does not work (which might be because the app makes a few HTTP requests to http://localhost/ using a WebClient).

Do anyone know how to make Visual Studio load the TestPage.html from http://localhost/ instead of file:///C:/JadaJada/ ?

Thankful for any help!

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

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

发布评论

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

评论(2

陪你搞怪i 2024-08-12 11:15:06

在VS...
尝试右键单击网站并选择属性页。
然后选择启动选项选项卡
然后选择起始网址并输入您需要的网址

IN VS...
Try right click web site and select property pages.
Then select start options tab
Then pick start url and enter the url you require

仅此而已 2024-08-12 11:15:06

通过将 ASP.NET Web 应用程序项目添加到我的 silverlight 解决方案中来解决。然后进入我的新 ASP.NET Web 应用程序项目的属性,然后转到 Silverlight 应用程序选项卡并将我的 Silverlight 应用程序添加到该项目。然后我在解决方案资源管理器中选择 TestPage.aspx 并开始调试。成功了!

步骤如下:

  1. 将 ASP.NET Web 应用程序项目添加到您的 Silverlight 应用程序解决方案中。
  2. 进入新项目的属性。
  3. 转到 Silverlight 应用程序选项卡。
  4. 添加您的 Silverlight 项目。
  5. 选择 TestPage.aspx 并点击开始调试 (F5)。

应该可以做到这一点。

Solved by adding an ASP.NET Web Application project project to my silverlight solution. Then by going into the properties of my new ASP.NET Web Application project and then going to the Silverlight Applications tab and adding my Silverlight app to this project. Then I choose the TestPage.aspx in solution explorer and then start debugging. It worked!

So the steps:

  1. Add a ASP.NET Web Application project to your Silverlight application solution.
  2. Go into the properties of your new project.
  3. Go to the Silverlight Applications tab.
  4. Add you Silverlight project.
  5. Select the TestPage.aspx and hit Start debug (F5).

That should do it.

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