I noticed recently IISExpress & My Web Sites folders getting added to my My Documents folder on my Windows 7 machine. I recently installed VS2012, so I'm guess that's the culprit, but I haven't been able to find anything on line that explains how to change these defaults, if possible.
相关问题
- Carriage Return (ASCII chr 13) is missing from tex
- How to know full paths to DLL's from .csproj f
- How to store image outside of the website's ro
- Importing NuGet references through a local project
- Visual Studio 2019 - error MSB8020: The build tool
相关文章
- asp.net HiddenField控件扩展问题
- asp.net HiddenField控件扩展问题
- Asp.Net网站无法写入错误日志,测试站点可以,正是站点不行
- asp.net mvc 重定向到vue hash字符串丢失
- FormsAuthenticationTicket expires too soon
- How to show location of errors, references to memb
- “Dynamic operations can only be performed in homog
- What is the best way to create a lock from a web a
A Tricky solution
C:\Users\<user>\Documents\IISExpress
folder firstC:\Users\<user>\Documents
folder using the following commandmklink /J C:\Users\<user>\Documents\IISExpress D:\IISExpress
Microsoft cluttering up my 'Documents' folder with all their programs' (junk) folders drives me insane as well. I have conceded somewhat by creating a
Data
folder under myDocuments
folder, where I am pointing all MS apps (and others apps such as Firefox's profile folder) to for all their (generally unwanted) folders, and with a subfolder created for each program/suite. At least this way I can easily back up all settings when I back up my 'Documents' folders.Anyway, VS2012 installs IIS Express, which is what is causing these folders to be created. I have found two solutions for dealing with the unwanted folders.
Uninstall IIS Express. You can do this from the normal Windows 'Uninstall a Program' part of Control Panel.
Change the folder location that IIS Express uses, as follows. Be warned: anyone doing this risks causing problems with their computer if you don't know what you are doing, so you do so at your own risk. Please make appropriate backups along the way as well too!
a) Close Visual Studio.
b) Create a new folder for the IIS Express sub-folders:
eg.
D:\My Documents\Data\Microsoft\IISExpress
c) Move the existing unwanted IISExpress subfolders (
config, Logs, TraceLogFiles
) from yourMy Documents > IISExpress
folder to the folder created in step b).d) Create a new folder for the
My Web Sites
folder, I suggest also under the folder created in step b).eg.
D:\My Documents\Data\Microsoft\IISExpress\Websites
Under this folder, create a website for the default IIS Express website (in case it "auto-magically" reappears it's ugly head again later on).
eg.
D:\My Documents\Data\Microsoft\IISExpress\Websites\Default
e) Go to the newly located
config
folder at:eg.
D:\My Documents\Data\Microsoft\IISExpress\config
, and:i. Open the file
applicationhost.config
in your text editor (eg. Notepad).ii. Find the node
sites > site > application path > virtualDirectory path
for WebSite1, and change thephysicalPath
value from%IIS_SITES_HOME%\WebSite1
to the IIS Express default website folder you created in step d).Eg.
%IIS_SITES_HOME%\Websites\Default
.Note that
%IIS_SITES_HOME%
points to your 'Documents' folder (this appears to be a "feature" of IIS Express, I can't find a way to change it, and it appears to be auto-configured when IIS Express starts up, which it does by using theapplicationhost.config
file).Do the same for any other sites created by IIS Express.
f) Create a new registry entry pointing IIS Express to the new folders you created (partly explained by MS here: http://www.iis.net/learn/extensions/introduction-to-iis-express/iis-80-express-readme). FYI the registry key doesn't previously exist, as IIS Express uses a default of my
Documents
unless this key exists:i. Open the Windows 'Run' box, eg.
(Windows Key) + R
ii. Type
regedit
iii. Navigate to key:
HKEY_CURRENT_USER\Software\Microsoft
iv. *Right click* the
Microsoft
key (that you have just navigated to), and choose:New > Key
v. Type
IISExpress
vi. *Right click* the
IISExpress
key that you have just created, and choose:New > String Value
vii. Type
CustomUserHome
, and hit theEnter
key to save it.viii. Double-click the
CustomUserHome
string to enter a value for it, and for theValue Data:
field, type in the path to the new IIS Express folder you created in step b), for example:D:\My Documents\Data\Microsoft\IISExpress
. Press OK, and you can now close the Registry Editor.g) Reopen Visual Studio, and it should start using the new folders, as well as not create the folders in your
Documents
folder anymore. Yay!!!!!FYI, when I did this all, I actually did it in a slightly different order (creating the registry key first), but this order was the easiest way to explain it all. Whether you create the key first or last shouldn't matter, as long as you do all the steps. Good luck!