简体   繁体   English

如何自动化MVC IIS的开发机器

[英]How to automate development machine for MVC IIS

I don't know if this is entirely possible as a one click and done option, but what I would like is to automate our IIS MVC development setup for new developers. 我不知道这是否完全可以一键完成,但我想为新开发人员自动化IIS MVC开发设置。

Basically, what I am looking for is: 基本上,我正在寻找的是:

  • App pool creation if one is not already created (and make sure it is the correct version of .NET 4.0) 创建尚未创建的应用程序池(并确保它是.NET 4.0的正确版本)
  • Creation of an IIS Application under the above app pool that points to the source code 在上述应用程序池下创建一个指向源代码的IIS应用程序
  • Figure out if aspnet_regiis -i is needed (in the case that IIS was installed before 4.0 code was introduced) 确定是否需要aspnet_regiis -i (如果在引入4.0代码之前安装了IIS)

I am not looking for a publish option as that does not point to the source code. 我不是在寻找发布选项,因为它没有指向源代码。 Also, I am not looking to use the built in VS host as I am trying to use IIS to make sure everything is set up appropriately. 另外,我不想使用内置的VS主机,因为我试图使用IIS确保所有设置都正确。 Maybe I should not impose these limits and do not need to worry about setting up the machine as described? 也许我不应该强加这些限制,也不必担心按照所述设置机器? But if this does sound correct, currently I am looking for a way to set this up straight out of source control? 但是,如果这听起来确实正确,那么目前我正在寻找一种直接在源代码控制中进行设置的方法? Is that possible, or do I need to have an initial setup phase for all new developers? 这是否可能,或者我是否需要为所有新开发人员进行初始设置阶段?

Although I can't yet write exactly what you want, Powershell will do what you want. 尽管我还不能完全写出您想要的东西,但是Powershell可以满足您的需求。 Here's a tutorial for creating web sites and app pools. 这是用于创建网站和应用程序池的教程。

http://learn.iis.net/page.aspx/433/powershell-snap-in-creating-web-sites-web-applications-virtual-directories-and-application-pools/ http://learn.iis.net/page.aspx/433/powershell-snap-in-creating-web-sites-web-applications-virtual-directories-and-application-pools/

What I would suggest is setting up the full environment on a computer then making a boot disk to return to that environment. 我建议的是在计算机上设置完整的环境,然后制作启动盘以返回该环境。 Then run that boot disk on another computer (note: must be of the same type) which you want the environment to be on. 然后,在要启动环境的另一台计算机上运行该引导磁盘(注意:必须具有相同的类型)。

If it must work for different computers, and different operating systems, then the complexity of allowing for the environment to all be done at once will become greater than just doing it yourself unless you are setting up environments as frequently as daily. 如果它必须适用于不同的计算机和不同的操作系统,那么一次允许完成所有环境的复杂性将比仅自己完成一次要复杂得多,除非您每天都频繁设置环境。 If that is the case, then perhaps you could make a custom installation program to do that which I am not very familiar with off the top of my head. 如果是这样,那么也许您可以制作一个自定义安装程序来执行我不太熟悉的安装程序。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM