可以在IIS中自动创建.NET Web应用程序吗? [英] Can I automate creating a .NET web application in IIS?

查看:115
本文介绍了可以在IIS中自动创建.NET Web应用程序吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在几台笔记本电脑上部署一个Web应用程序(虽然它是一个Web应用程序,它只是通过 localhost 运行,因此需要部署几个不同的机器)。

I need to deploy a web application on several laptops (although it is a web application, it is intended to run via localhost only - thus the need to deploy on several different machines).

通常我会去IIS,右键单击一个目录创建一个Web应用程序,但我非常希望自动化这一段安装。可以完成吗?

Normally I would go to IIS and right click a directory to create a web application, but I would very much like to automate this leg of the installation. Can it be done?

编辑:
我的问题显然不是很清楚。

edit: My question, clearly, isn't very clear.

我想使用IIS,但是我想自动创建Web应用程序,而不打开IIS Microsoft管理控制台(MMC)。

推荐答案

我可以支持你采取查看此链接如果您在IIS6上部署或在这一个,如果它是IIS7(我可以推荐 Mike Volodarsky的博客对于IIS7中的任何信息)。
写一些批处理文件来自动创建网站应该很简单。
示例:

I can sugest you to take a look at this link if you are deploying on IIS6 or at this one if it is IIS7(I could recommend Mike Volodarsky's blog for any info on IIS7 in general). It should be quite simple for you to write some batch file to automate a site creation. Example:


  • IIS6:iisweb /创建C:\Rome我的假期/ d www.reskit.com / dontstart

  • IIS7:%windir%\system32\inetsrv\AppCmd ADD SITE / name:MyNewSite / bindings:http / *:81:/ physicalPath:c:\inetpub\\ \\ mynewsite

这篇关于可以在IIS中自动创建.NET Web应用程序吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆