Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Publishing an IIS web application to a website root?

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.

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:

This application will be installed into "My Website". Most applications are usually installed into a folder beneath the root, such as "My Website/Blog". Are you sure?

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?

like image 955
Jez Avatar asked Mar 03 '12 19:03

Jez


People also ask

What is the root folder of IIS?

It is common knowledge that the default folder for IIS websites is found in the C:\inetpub\wwwroot.


1 Answers

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.

like image 130
MTeck Avatar answered Oct 25 '22 10:10

MTeck