如何将 asp.net mvc 部署到我的桌面,以便网络中的所有计算机都可以看到它?
我在 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
实际上很容易。您应该将标准 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.
是的,你应该按照 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")
为了能够与同事在网络中共享您的网站,并且如果您碰巧拥有 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.