如何将 asp.net mvc 部署到我的桌面,以便网络中的所有计算机都可以看到它?

发布于 2024-08-24 05:56:28 字数 332 浏览 6 评论 0原文

我在 ASPNET MVC 中开发了一个小型应用程序,我想部署它。我们的网络有 2 台服务器和 20 多个桌面。这两台服务器上运行着我们的应用程序(用 java 编写)。 [我们不是一家软件公司 - 我自己学习了 ASP.NET MVC,并想向我的员工展示它 - 谁知道呢?这可能会打开大门......]。

这就是为什么我需要知道(1)是否可以将我的应用程序部署到我的桌面,以便其他人可以从同一网络中的计算机访问它? (2)我该怎么做?

事实上,让我的人围着我的笔记本电脑让我的应用程序看起来像一个奇怪的玩具。到目前为止,我已经学会了如何开发,但我从未部署过应用程序(特别是部署到桌面)

感谢您的帮助。

I've developed a tiny application in ASPNET MVC that I'd like to deploy. Our network has 2 servers and 20+ desktops. The two servers have our applications (written in java) running in them. [we're not a software company - I've learned ASP.NET MVC on my own and would like to show it to my people - who knows? that might open doors...].

That's why I need to know (1) if it's possible to deploy my application to my desktop so that other can access to it form their computers in the same network? (2) How do I do it?

In fact, having my people surrounding my laptop makes my application look like a curious toy. So far, I've learn how to develop, but I've never deploy an application (specially to a desktop)

Thanks for helping.

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

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

发布评论

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

评论(4

过潦 2024-08-31 05:56:28

实际上很容易。您应该将标准 Windows 组件中的 IIS(Internet 信息服务器)安装到您的台式机上。将您的代码放在默认创建的网站的根目录中(或使用自定义根目录创建您自己的网站)。通常是 C:\inetpub\wwwroot

确保您的防火墙允许使用第 80 个端口,即 IIS 侦听的端口。将您的 IP 地址提供给您的队友即可。

It quite easy actually. You should install IIS (Internet information server) from the standard windows components to your desktop machine. Put your code in the root directory of the default created web site ( or create your own with custom root directory). It's usually C:\inetpub\wwwroot

The be sure that your firewall is allowed the 80-th port, that's the port IIS listens on. Give your IP address to your team-mates and that's it.

轻许诺言 2024-08-31 05:56:28
  • 如果可能,请确保您的桌面上正在运行 IIS 7(如果没有,请查看 Phil Haack 的 IIS6 上的 ASP.NET MVC 演练)。
  • 打开 IIS 管理器(运行命令“inetmgr”)。
  • 展开左侧的树,选择默认网站并单击“基本设置”。
  • 使“物理路径”指向放置 MVC 应用程序的目录
  • 检查应用程序是否显示在 http://localhost
  • 如果没有,请告诉我们
  • 如果有,请确保在 Windows 防火墙中打开端口 80 并尝试访问网站 来自另一台机器的 http://your-ip
  • If possible, make sure that you are running IIS 7 on your desktop (if you aren't, check out Phil Haack's ASP.NET MVC on IIS6 Walkthrough).
  • Open IIS Manager (run the command "inetmgr").
  • Expand the tree on the left, select the Default Web Site and click "Basic Settings".
  • Make the "Physical path" point to the directory where you placed your MVC application
  • Check if the application shows up on http://localhost
  • If it doesn't, let us know
  • If it does, make sure you open port 80 in your Windows firewall and try to access the website at http://your-ip from another machine
送舟行 2024-08-31 05:56:28

是的,你应该按照 Anthares 的说法安装 IIS。
另请注意,如果您在旧版 IIS 上安装,则应为 MVC 启用通配符映射(请参阅 http://haacked.com/archive/2008/11/26/asp.net-mvc-on-iis-6-walkthrough.aspx, " IIS6 无扩展名 URL”)

Yes you should install IIS as anthares says.
Note also if you are installing on older IIS version you should enable wildcard mapping for MVC (see http://haacked.com/archive/2008/11/26/asp.net-mvc-on-iis-6-walkthrough.aspx, "IIS6 Extension-less URLs")

请止步禁区 2024-08-31 05:56:28

为了能够与同事在网络中共享您的网站,并且如果您碰巧拥有 Windows XP 服务器,我建议您首先查看一下 Microsoft Web Matrix。
使用它应该很容易。

我还想在我的XP机器上发布一个供内部使用的网站,发现XP自带的IIS有连接限制(我认为它只支持10个同时连接或类似的东西)。

这就是为什么我发现自己安装了 Web Matrix(当然这是捷径,我有一两天的反复试验和无休止的研究),它对我来说非常有效。

但我从未将它与 MVC 一起使用过,因此您需要先检查一下。

In order to be able to share your Web Site in your network with collegues and if you happen to have a Windows XP server - I would suggest you to take a look at Microsoft Web Matrix first.
It should be easy to use it.

I also wanted to publish a web site for internal use on my XP box and found that the IIS that comes with XP has a connection limit (I think it only supports 10 simultenous connections or something like that).

That's why I found myself installing Web Matrix (ofcourse this is the shortcut, I had a day or two of trial and error and an endless research), it worked pretty well for me.

I never used it with MVC however so you will need to check out that first.

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