12

How can I deploy an asp.net application to the root of an IIS6 webserver? All the applications I've deployed before have been in directories, such as http://www.example.com/app1/. To deploy that for the first time, I've always just gone to the IIS manager, and selected "Create Application" in the properties for that folder.

Now I'm trying to create an application on the root of the web site, like http://www.example.com/. But the property pages are different, and there doesn't seem to be an option to create an application in the root directory.

This is probably very simple, but I can't figure this out.

recursive
  • 83,943
  • 34
  • 151
  • 241

5 Answers5

12

The application settings are on the "Home Directory" tab of the properties for the site (right click on the root node for the site and select properties).

John Sheehan
  • 77,456
  • 30
  • 160
  • 194
10

The root folder is already an application - no need to create one. You deploy the same way - the folder is just "/" instead of "app1/".

Paul Alexander
  • 31,970
  • 14
  • 96
  • 151
5

You should create new site instead of creating new web application or virtual path on (Default web site).

  1. Right click Add new website
  2. Type your site name, select physical path point to your deploy web site and notice type your domain name in host name label: Ex: www.example.com (your domain must be existed). Then click OK.

This way will make your web application root path "/" .

nvtthang
  • 604
  • 2
  • 10
  • 27
4

What Paul said. Big gotcha is that, if there are already applications running in virtual directories (eg /App1), there can be a little bit of configuration war as the base configuration settings override the app's settings, resulting in either outright crashes or (worse) unexpected behavior.

Wyatt Barnett
  • 15,573
  • 3
  • 34
  • 53
  • Any comment whether or not this issue comes to bear in IIS10? I've got 3 apps on my web server, and I intend to move one to be "hosted" at the root (while still having its physical path in a subfolder). Should I be concerned? – Remi Despres-Smyth Jun 24 '20 at 13:30
0

The very simple way is to access your application by just typing URL as 'localhost':

open the IIS service -> sites -> default web site -> (r8 click)->manage web sites-> advanced setting

Now it will show new window;

1) imp: select the physical path: (now change this path to your app's path): e.g. my path is: C:\Users\Mahadev\Documents\visual studio 2017\Projects\WebApp\WebApp

So probably hope your path will like this and select this. in this path folder names likely App data, App start, bin.. so on

2) Physical path credentials: click on this and select 'specific user' and give OS user name password. now click 'OK'

Mahadev Mane
  • 810
  • 8
  • 11
  • you can access the webapp by using any website name instead of 'localhost' or IP. So plz do following things: go to this path: C:\Windows\System32\drivers\etc now open 'hosts' file (its type is 'file' & not calendar). open with notepad. go at the end of file pest your any site name: – Mahadev Mane May 20 '17 at 18:39
  • pest your site name like.: 127.0.0.1 www.mysite.com and save the file. – Mahadev Mane May 21 '17 at 05:41