18

Using Windows 7 I have installed the IIS Express 7.5 but I cant find where is the wwwroot directory on my system! There is no "inetpub" folder on my C drive as well. Can you please let me know where I can put a file like hello.aspx file to be run?

Thanks

Behseini
  • 6,066
  • 23
  • 78
  • 125
  • Related post - [Where is the IIS Express install directory?](https://stackoverflow.com/q/23314928/465053) – RBT Sep 01 '21 at 12:46

5 Answers5

17

By first-hand experience and also by this other SO answer, usually IISExpress holds a directory with its own data files at: C:\Users\<username>\Documents\IISExpress.

There you can find the default directories for each web site log files (Logs\ and TraceLogFiles\) and especially you can find all web sites configurations in file config\applicationhost.config. That one has a <sites> section with a <site> node for each website created.

For each website, its <virtualDirectory> node specifies actual root location in physicalPath attribute:

<site name="YourWebSiteName" id="12345">
  <application path="/" applicationPool="Clr4IntegratedAppPool">
    <virtualDirectory path="/" physicalPath="D:\Physical\path\to\your\website\root"/>
  </application>
  ...
</site>
Community
  • 1
  • 1
superjos
  • 12,189
  • 6
  • 89
  • 134
  • 2
    For Visual Studio 2015 and later the path to applicationhost.config is at `\.vs\config\applicationhost.config` – Leo Bartkus Apr 22 '21 at 22:34
7

C:\Users\YourUserName\Documents\My Web Sites\web-Site1

One simple way to test is just key in a test file in your site root, e.g. http://localhost:1714/test.txt

System will throw a 404 error, in the "Detailed Error Information" section, system will show the "physical path" the server is trying to retrive the file. enter image description here

Hainan Zhao
  • 1,962
  • 19
  • 19
2

Usually it is in your home directory. Something like c:\Users\<yourname>\Documents\IISExpress

superjos
  • 12,189
  • 6
  • 89
  • 134
ema
  • 5,668
  • 1
  • 25
  • 31
  • thanks ema , there are three folders there as config, logs, and TraceLogfiles. So where should I put the file? and How can I see the file in browser? – Behseini Feb 21 '14 at 22:10
  • 1
    Actually there isn't a default folder for that, you can put your file where you prefer and execute the IISExpress so that it points to your folder: http://www.iis.net/learn/extensions/using-iis-express/running-iis-express-from-the-command-line – ema Feb 26 '14 at 10:12
1

you will see a location like below path

C:\Users\YOURUSERSNAME\AppData\Local\Temp\Temporary ASP.NET Files

Milad Hatami
  • 1,494
  • 13
  • 18
0

But where is the global directory for IIS Express? Quick answer is that there is not one. IIS Express is very much directory based. That being said, the 2 solutions I have been able to work out are:

  1. Add the group of files to your root path of your web site
  2. Create a virtual directory in IIS Express’ applicationHost.config file for the location of your global files

More details

Jowen
  • 5,203
  • 1
  • 43
  • 41