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
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>
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, eg 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.
Usually it is in your home directory. Something like c:\\Users\\<yourname>\\Documents\\IISExpress
you will see a location like below path
C:\\Users\\YOURUSERSNAME\\AppData\\Local\\Temp\\Temporary ASP.NET Files
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:
- Add the group of files to your root path of your web site
- Create a virtual directory in IIS Express' applicationHost.config file for the location of your global files
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.