简体   繁体   English

将ASP.NET部署到IIS7:要默认站点根目录,默认站点中的应用程序还是单独的站点?

[英]ASP.NET deploy to IIS7: To default site root, app in default site, or separate site?

I'm sort of new to IIS7, and I sort of get the differences between sites, applications, and virtual dirs. 我是IIS7的新手,并且获得了站点,应用程序和虚拟目录之间的区别。 However, I'm not quite sure what the best deployment approach would be for my specific situation. 但是,我不确定我的具体情况下最佳的部署方法是什么。

I have a clean windows '08 server VM with a IIS/asp.net set up. 我有一个带有IIS / asp.net的干净的Windows '08服务器VM。 I set up an FTP site with C:\\inetpub\\wwwroot as the FTP root thinking I could do a quick "copy site" from VS to this root. 我以C:\\ inetpub \\ wwwroot为FTP根目录设置了一个FTP站点,以为我可以从VS到此根目录进行快速的“复制站点”。

However, before I do the copy, I want to make sure this is the quickest, safest approach. 但是,在进行复制之前,我想确保这是最快,最安全的方法。

Please note that, this VM will be soley dedicated to my asp.net app (for testing purposes), and I'm kind of under the gun having to get this app running by EOD today. 请注意,该虚拟机将专门用于我的asp.net应用程序(出于测试目的),而我今天必须让该应用程序通过EOD运行。

That said, my questions is, should I... 也就是说,我的问题是,我应该...

  1. simply do a "copy site" directly to the default site's root and leverage the default app pool that's already been created, or 只需直接将“复制站点”直接复制到默认站点的根目录,并利用已经创建的默认应用程序池,或者
  2. add a new application under the default site (if I do this, should I select the default app pool, or create new ones), or 在默认站点下添加一个新应用程序(如果这样做,应该选择默认应用程序池还是创建新应用程序池),或者
  3. add a whole new web site? 添加一个全新的网站?

Also, while I'm at it... My app was built with asp.net 4. Should I select the Default App Pool, or the ASP.NET 4.0 Integrated ones? 另外,当我在这里时...我的应用程序是使用asp.net 4构建的。我应该选择“默认应用程序池”还是“ ASP.NET 4.0集成的”?

Thank you, Ed 谢谢你,爱德华

Here's how I would setup IIS: 这是我设置IIS的方法:

  1. Create a new site (I always name the sites by the domain that they will be using) 创建一个新站点(我总是用它们将使用的域来命名站点)
  2. Creating a new site will create a new application pool. 创建一个新站点将创建一个新的应用程序池。 Verify that the application pool is using .NET 4.0 Integrated. 验证应用程序池正在使用.NET 4.0 Integrated。

Copy/Publish your site to a folder and then host this folder. 将您的站点复制/发布到一个文件夹,然后托管该文件夹。 IF you host it under default web site, your url to the site will be http:// machinename/sitename or http:// localhost /sitename In the other case you will host your site directly on a specified port or you can even host it under :80 port, and will be accessible directly through your machine name. 如果将其托管在默认网站下,则该网站的URL将为http://机器名/站点名或http:// localhost / sitename。在另一种情况下,您将直接将站点托管在指定的端口上,甚至可以托管它在:80端口下,可以通过您的计算机名称直接访问。 Choose the application pool that is in integrated mode with supported version of 4.0 and you won't have any problems ( usually default app pool is configured with these settings) 选择处于集成模式且受支持的版本为4.0的应用程序池,您将没有任何问题(通常使用这些设置配置默认应用程序池)

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

相关问题 ASP.NET友好URL-将“默认”重定向到网站的根目录 - ASP.NET Friendly URLs - redirect 'default' to root of site 将asp.net MVC站点部署到IIS7并使用网站URL - Deploy asp.net MVC site to IIS7 and use website url asp.net站点默认文件在子文件夹中 - asp.net site default document in subfolder 在IIS 6默认网站属性(“ ASP.NET”选项卡)中将ASP.NET版本设置为3.5。 - Set ASP.NET version to 3.5 in the IIS 6 Default Web site properties (ASP.NET tab) 如何在不创建单独站点的情况下在 IIS 上部署 ASP.NET web? - How can I deploy an ASP.NET web on IIS without creating a separate site? 在IIS默认网站下创建asp.net MVC Web应用程序或将其创建为新网站之间的区别 - Difference between creating my asp.net MVC web application ,under the IIS Default web site, or create it as a new web site IIS7仅能够加载默认网站 - IIS7 only able to load Default Web Site ASP.NET CORE 3.0 应用到默认网站/MySite 下的 IIS 无法正常工作 - ASP.NET CORE 3.0 application to IIS under Default Web Site/MySite does not work properly 我的新Windows Server 2019 iis上没有默认网站将ASP.NET Hello World发布到 - no default web site on my new Windows Server 2019 iis to publish an ASP.NET hello world to 如何在IIS7中设置本地ASP.NET 2.0站点以进行本地测试? - How do I set up a local ASP.NET 2.0 site in IIS7 for local testing?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM