使用WebMatrix打开时显示错误的网站

发布于 2024-12-15 21:32:03 字数 380 浏览 4 评论 0原文

我使用 Asp.Net MVC 开发了一个网站,它在 App_Data 中使用 SQL CE 数据库。该网站在 Visual Studio 中运行时运行良好。但是,当我在 Microsoft WebMatix 中将其作为“文件夹中的站点”打开时。它没有显示任何东西。在 IE 中,它显示“Internet Explorer 无法显示网页”,在 Chrome 中,它显示“Chrome 无法连接到 localhost:49742”。

这发生在执行数据库访问的 url 上。基本页面工作。

我尝试使用“文件夹中的站点”打开其他网站(MvcMusicStore),它工作正常。一切都相似的情况下,为什么会出现上述情况呢?我无法进行调试,因为它没有在 Visual Studio 中发生

I have developed a website using Asp.Net MVC which uses a SQL CE database in the App_Data. The website when run in Visual Studio, runs fine. But, when i opened it as 'site from folder' in Microsoft WebMatix. It doesn't show anything. In IE it says "Internet Explorer cannot display the webpage" and in chrome it says " Chrome could not connect to localhost:49742".

This happens on the url, where database access is performed. Basic pages work.

I tried opening other website(MvcMusicStore) using 'site from folder' and it works fine. Why does it happen in the above case when everything is similar. I cannot do the debugging since it is not happening in visual studio

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

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

发布评论

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

评论(1

吃→可爱长大的 2024-12-22 21:32:03

它可能不起作用,因为您没有使用 IIS(或其他网络服务器,如 Cassini)配置您的站点。

可能在 Visual Studio 中,您已将项目配置为使用“Visual Studio 开发服务器”和“自动分配端口”。如果是,则 Visual Studio 会在您每次按 F5 时启动您的 Web 服务器。

It probably doesn't work because you don't have configured your site with IIS (or another webserver like Cassini).

Probably while in visual studio you have configured your project to use "visual studio development server" with "Auto-assign port". If yes, it's visual studio that starts your web server every time you press F5.

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