Last post Oct 14, 2013 02:51 AM by Tear09
Oct 09, 2013 08:32 AM|Rovastar|LINK
I am compiling a best practice/hardening/optimising administrators guide for IIS 7.x. Hopefully with the goal of getting it on TechNet or something.
Although I am happy with my understanding of all things IIS with the more and more integration with the asp.net - I get a little lost with the deep dive settings, hence the post here.
I want to get a better understanding/confirmation of some of the inheritance from the machine.config level downwards.
I get the understanding of this. i.e. I understand stuff in here.
What I am a little confused about is all the different CLRs machine.configs and how that effects it all.
asp.net CLR v2 32bit
asp.net CLR v2 64bit
asp.net CLR v4 32bit
asp.net CLR v4 64bit
(or even asp.net 1 CLR *shudder*)
The way I understand this works is each of these CLRs/bitness category inherits through the same way down so if in IIS you select the app pool asp.net CLR version 2 and 32 bit it will use all settings from the asp.net CLR v2 32bit machine.config.
For this I have never seen clear guidelines in MS documentation about this but it surely works this way. Can anyway here with detailed knowledge confirm/point me to articles? Is *anything* not this way?
Now I presuming that and in theory you can have 4 active "streams" (or 5 if you include .net 1 CLR) does the change the much documented settings that people use for optimizing asp.net via machine.config.
e.g. (there are loads of these)
I am not in the habit of blindly copying settings that I find on blogs/guide without first understanding them.
I thinking not (as maximums will never be reached at one time) but what do others consider?
MVP in IIS
Oct 11, 2013 02:35 AM|Tear09|LINK
Maybe this can help you
Oct 11, 2013 05:35 AM|Starain chen - MSFT|LINK
Thanks for your post!
Based on my test for customErrors. I think the machine.config inherits is based on the
application pool. For example:
<error statusCode="500" redirect="/Home/Trouble?str=5" />
<error statusCode="400" redirect="/Home/Trouble?str=5" />
<error statusCode="403" redirect="/Home/Trouble?str=5" />
<error statusCode="404" redirect="/Home/Trouble?str=5" />
Modify the machine.config and add below code. (I don't konw how to set application pool with the 32bit .net framework)
1. Framework64\v4.0.30319\Config\Machine.config; Application pool V4.0. It will redirect to the Trouble page when I use the incorrect URL.
2. Framework64\v2.0.50727\CONFIG\Machine.config; Application pool V2.0. It will redirect to the Trouble page when I use the incorrect URL.
3. Framework64\v2.0.50727\CONFIG\Machine.config; Application pool V4.0. It won't redirect to the Trouble page when I use the incorrect URL.
I suggest that you can do the test by yourself, then you can understand clearly.
Oct 11, 2013 07:12 AM|Rovastar|LINK
Cheers Tear09 that is the sort of doc I was after:
with text like "All .NET Framework applications inherit basic configuration settings and defaults from a file named systemroot\Microsoft .NET\Framework\versionNumber\CONFIG\Machine.config."
However that still leave a bit of ambiguity as it doesn't mention the bitness in there.
We (no idea who 'we' is) probably need to look at tidying up the MSDN documentation to cover this.
Like I say I am pretty sure how it works from experimentation/knowledge over the years but wanted an official stamp.
For reference to enter 32bit mode - which most of the time is recommended for asp.net apps anyway -
you will change the app pool to contain [enable32bitApponWin64] which will kick that in.
in the applicationhost config set
(or select the dropdown in IIS app pool advanced settings)
Which will use the correct asp.net bitness for the app pool CLR.
Oct 14, 2013 02:51 AM|Tear09|LINK
I did some research, I don't find any other offical documents that detail explanation that.