I suggest you ...

Store iisexpress folder in %USERPROFILE% instead of Documents

IIS Express should store its iisexpress folder in %USERPROFILE% instead of the user's Documents folder.

In a scenario where you have OneDrive storing your PCs documents to OneDrive instead of "This PC", these files (TraceLogs, etc..) are constantly being uploaded/downloaded from OneDrive unnecessarily.

42 votes
Sign in
Password icon
Signed in as (Sign out)
You have left! (?) (thinking…)
Nate shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →


Sign in
Password icon
Signed in as (Sign out)
  • Daniel commented  ·   ·  Flag as inappropriate

    John thanks for the tip - The only issue I still see with this is that the config file is going to sync and so if you have multiple development machines I think you could get issues. You can probably work around that by making sure the same project is always stored in a consistent location on each machine.

    If you had the project on C:\ on your laptop, but on D:\ on a desktop and you sync the IIS Express config I think IIS Express will complain, basically the "physicalPath" attribute will always be set to the last machine that synced and could be C: on one machine, D: on another

  • John commented  ·   ·  Flag as inappropriate

    I forgot to mention that you still need to keep the config directory in your documents/IISExpress synced with OneDrive. But at least your Logs and TraceLogFiles won't be synced to OneDrive anymore.

  • John commented  ·   ·  Flag as inappropriate

    I finally found a good solution. Modify applicationhost.config in

    C:\Program Files\IIS Express\config\templates\PersonalWebServer
    C:\Program Files (x86)\IIS Express\config\templates\PersonalWebServer

    so that siteDefaults point to a temp directory. If you already have an existing project, you may have to go to hidden .vs directory in the project folder to modify the applicationhost.config. Otherwise, by modifying the template files above, any new project you create will automatically use the temp folder.

    <logFile logFormat="W3C" directory="C:\Temp\IISExpress\Logs" />
    <traceFailedRequestsLogging directory="C:\Temp\IISExpress\TraceLogFiles" enabled="true" maxLogFileSizeKB="1024" />

  • Autiarii commented  ·   ·  Flag as inappropriate

    drives me insane as well, onedrive constantly uploads temporary iis files and logs and then when files are removed sends me emails and notifications. I assume it also makes onedrive frequently search for folder changes which obviously consumes some extra resources, sometimes when I open task manager I see onedrive utilizes around 50% of my hhd

  • Anonymous commented  ·   ·  Flag as inappropriate

    I agree, same issue. I tried using SymLinks, but that doesn't solve anything on the OneDrive side.

  • Yanal commented  ·   ·  Flag as inappropriate

    Storing IISExpress in the Document folder is not a good thing IMHO.
    For instance, it conflicts with Onedrive when the sync app is configured to auto save the Document folder in OneDrive. Every time Something is changing in the IISExpress config, it syncs IIS express touches tons of files in the "IISExpress" folder causing Onedrive to send me emails to warn me that a lot a files have been changed recently. Although I use IISExpress, I don't need to put those files in Onedrive while I like auto saving my Document in OneDrive.

  • Brian Drennan commented  ·   ·  Flag as inappropriate

    I concur, this is an absolute pain to deal with. I've found that a lot of enterprise admins like the idea of applying those wonderful Group Policy Objects that ship with Windows and say "this is *the* configuration we're going to ship for *all* devices!", even when it doesn't make sense. As a developer, I can't get a second machine that is policy-exempt, and am expected to deal with an "enterprise" configuration of my desktop that makes working with OneDrive miserable.

Feedback and Knowledge Base