问题描述
我正在尝试使用Web Deploy将Web应用程序导入到IIS7中。我使用Visual Studio的发布Web功能将其打包成一个ZIP文件,当我选择zip时,我收到我的应用程序包信息屏幕。
I'm trying to import a web application into IIS7 using Web Deploy. I packaged it into a ZIP file using Visual Studio's "Publish Web" functionality, and when I select the zip I get to my "Application Package Information" screen.
它要求我的设置是应用程序路径。如果我离开那个空(所以它基本上只是说我的网站/),并尝试继续,IIS给我的消息:
One of the settings it asks me for is "Application Path". If I leave that empty (so it basically just says "My Website/"), and try to continue, IIS gives me the message:
我不明白为什么它给出这个警告。我只是想对这个对话说OK,但是我想先检查一下 - 有什么明显的我做错了吗?当然,如果我想要我的Web应用程序成为整个网站,我希望将它安装到根目录,否则用户总是必须访问 http:// host / MyAppDirectory /
而不是仅仅 http:// host /
- 为什么我想要不必要的后缀 MyAppDirectory / code>?将应用程序安装到
MyAppDirectory
并以某种方式将该目录映射到网站根目录是更好的做法,或者只要将该应用程序安装到网站根目录,尽管有警告?
I can't understand why it gives this warning. I'm tempted just to say "OK" to this dialog, but I wanted to check first - is there something obvious I'm doing wrong? Surely if I want my web application to be the entire web site, I want to install it to the root or otherwise users will always have to access http://host/MyAppDirectory/
instead of just http://host/
- why would I want to have the unnecessary suffix MyAppDirectory/
? Is it better practice to install the application to MyAppDirectory
and somehow map that directory to the website root, or is it OK just to install the application to the website root despite the warning?
此外,假设可以将应用程序安装到网站根目录,尽管有警告,是否有办法完全删除应用程序路径设置(和相关警告),并总是认为该应用程序应该安装到网站根目录。
In addition, assuming it is OK to install the application to the website root despite the warning, is there a way to completely remove the "Application Path" setting (and the related warning) from the "Application Package Information" screen, and always assume that the app should be installed to the website root?
推荐答案
如果是您的主要网络应用程序,则忽略此消息是很好的。似乎很多人喜欢为其网站运行完全独立的应用程序,因此将有,,还有,每个都将是单独的网络应用程序。
If it's your primary web app, then it's fine to ignore this message. It seems that a lot of people like to run completely separate applications for their site so there will be http://domain.tld/forum/, http://domain.tld/blog/, http://domain.tld/something_else/, and also http://domain.tld/ and each will be a separate web app.
我不知道如何禁用此警告,但我相当确定你知道你在做什么,可以忽略它
I don't know how to disable this warning, but I'm rather certain you know what you're doing to the point you can ignore it.
个人而言,如果我要在同一网站下运行网络应用程序,说/博客/论坛,和/我将有一个文件系统布局,如以下:
Personally, if I'm going to run web apps under the same site, say /blog, /forum, and / I'll have a file system layout like the following:
/var/www/blog || C:\Sites\Blog
/var/www/forum || C:\Sites\Forum
/var/www/site || C:\Sites\Site
在这种情况下,我会得到相同的消息发布
In that case, I'd get the same message for publishing to each and every one.
您似乎知道要达到的最终目标,所以我倾向于建议您忽略该消息。希望有帮助。
You seem to know what you want to achieve as your end goal so I'm inclined to suggest you ignore that message. Hope that helps.
这篇关于将IIS Web应用程序发布到网站根目录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!