Maximum size of web.config in iis 10 - iis

One of our sites has a long web.config - a little over the default max size for a web.config.
In windows 8 there was a registry key for the maximum allowed size of the web.config.
What is the setting in iis 10 (windows 10) to change this?
Thanks,
Ian

I recommend you to move Sitecore configuration out of Web.config file like it was done it latest Sitecore versions:
<sitecore configSource="App_Config\Sitecore.config"/>
It is more convenient and you should not change your registry.

Although I do agree with Anton that moving parts to get the config smaller is the best solution, you can find an answer in this post:
MaxWebConfigFileSizeInKB and IIS 10
HKLM\SOFTWARE\Wow6432Node\Microsoft\InetStp\Configuration\MaxWebConfigFileSizeInKB
(REG_DWORD)
HKLM\SOFTWARE\Microsoft\InetStp\Configuration\MaxWebConfigFileSizeInKB
(REG_DWORD)
Did not test this myself ;)

Related

Problems regarding White Screen Of Death (WSOD) at my site

I have a problem regarding White Screen Of Death (WSOD) at my site.
I will try to explain what I have tried until now.
I know it is not a triviel error to debug, but maybe some of you have tried something similar.
Here is the setup: One Windows Server 2019 v1809 with one IIS: 10.0.17763.1.
Multiple websites with associated application pools.
It's a MVC solution, and we are using .net 4.7.2.
What I have tried:
Recycled application pools every night
Restarted the server every night
Issued a IISReset every night
Deleted temporary files in C:\Windows\Microsoft.NET\
Looked at the IIS logs
Looked at the application log, our own log
Looked at the Windows log
Searched the Internet for similar problems
Made sure there always were some traffic at the website
Made sure no errors were shown when pressing F12 in the browser, the site always returs code 200
The WSOD comes at varies times, and not all the sites are affected at the same time.
A manuel recycle of the website always helps.
My question is, have any of you encounted similar problems?
And how did you solve it?
If you need more information please ask, and I will try to provide it.
/Regards Søren
This kind of problem is very unusual in IIS, because there is almost no record and useful information in the log file.
You can try to use this plan to repair IIS.
Unregister all the versions of ASP.NET with command "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis –ua". and the framework 64 also versions. 3.0 and 3.5... etc
Delete ASPNET account from "Local Users and Group – Users".
reregister ASP.NET with IIS using "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis –i". and framework64... net 3, 3.5 etc
Give permissions to the ASPNET account using "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis –ga machinename\ASPNET". for framework 32 and 64 and versions.
Reset IIS .

MaxWebConfigFileSizeInKB and IIS 10

I am using a Web application with a web.config file larger than 250KB on IIS 10. In IIS 8.5 and below the registry key HKLM\SOFTWARE\Wow6432Node\Microsoft\InetStp\Configuration\MaxWebConfigFileSizeInKB (REG_DWORD) could be set to allow web.configs to be larger than 250KB.
However it seems that this registry key is not read by IIS 10 any longer.
Does anyone know if this key should still work on IIS 10 or how to use config files larger than 250KB in combination with IIS 10?
I forgot to set the 32 bit version registry key,
HKLM\SOFTWARE\Microsoft\InetStp\Configuration\MaxWebConfigFileSizeInKB (REG_DWORD)
It works now,
For IIS Express on Windows 10 you need to set the MaxWebConfigFileSizeInKB value in the registry here: HKLM/HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\IISExpress\10.0\mimic\Configuration.
Change maximum allowed configuration file size [IIS Express 10/Windows 10]

Setting MaxWebConfigFileSizeInKB in IIS8.5

I have a web.config file that references a rewrites.config file that is used by the inbuilt IIS Rewrite module. However my rewrites.config file is larger than 250kb, so i have followed the advise on this post. However it appears that in IIS 8.5 (Windows Server 2012) these keys are ignored. I've search the interwebs and haven't been able to find much on IIS 8.5, anyone got any advice on how to increased the maximum.config size? Or alternatively split rewrites.config into smaller files?
You can just create the key.
Right click on the parent node in REGEDIT - add a new Key called Configuration. Then add a new DWORD for MaxWebConfigFileSizeInKB (you'll probably want to switch to the decimal view) and set the value in KB.
I've just tested this on a rewritemap.config file 753kb in size on a server running IIS8.0 on Windows Server 2012 (I'm making an assumption here that this won't be terribly different from IIS 8.5). You'll need to set the appropriate key depending on whether this is 64bit or 32bit (see here). If in doubt set both. I can confirm that this value is being used since turning the value down to (for example) 10 triggers the error again.
Don't forget to restart the app pool.

ElmahR doesnt load properly on IIS

I've been fiddeling around with ElmahR for the last two days and was planning to push it to our dev-playground for testing.
However, it doesnt load properly when running on IIS 7.5
I've fired up the deployed solution on 3 different machines with IIS Express without problems.
On IIS 7.5 it gets stuck at "Loading..." or "Sending Command", depending if it is set up as a sub application under default website or as a standalone webapplication.
The used system is Windows Server 2008 r2 sp1, IIS 7.5 .NET 4 application pool integrated mode. (all 3 machines)
I can't find the problem at hand; hope you can help.
Kind regards.
This is not an answer yet, it should be a comment but I cannot comment here :) I'm the author of ElmahR, I was not aware of the issue, last time I tested it on IIS 7.5 was a while ago and I did not have any problem, I'll have to recheck. Right now I'm not at home but I'll have a look at it when back, possibly before next weekend. And thanks for using it :)
UPDATE: I think I solved the problem, I blogged about it here. Basically, there were a couple of javascript bugs:
in one point I was not correctly setting the root of the application
under IE7/8 a better check about the plugins object was needed (the same code was running fine on IE9/Chrome/Firefox/Safari...)
The online repo is up to date, and the sample setup zipped file too.

Flush cache in iis6

For some magical reason ii6 started to cache pages on the server. Even if I remove the page, it is still displayed. I tried to follow couple suggestions but no luck.
That's what I did so far:
Deleted \WINDOWS\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files
Unchecked 'cache ISAPI extensions' in the IIS configuration.
Added 'Cache-Control no-cache' to HTTP headers in properties.
Tried to create the page that clear the cache http://www.dotnet247.com/247reference/msgs/13/67641.aspx
Update: also tried to disable asp cache
IIS ASP Caching
But the files in v2.0.50727\Temporary ASP.NET Files are still created
If anybody has other suggestions, please share.
Thanks.
Please give the delete permission for IIS user on below folder. these files will be deleted automatically by IIS
For 64 bit OS folder path:
\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files
My classic ASP pages WOULD NOT refresh from any browser. Finally, stopping and starting the IIS service (IIS6) fixed the problem.
You, too, can go bonkers, just like me. Simply have IIS start giving out stale pages! A bargain at half the price!
Did you try restarting the IIS server to see if that stops it from displaying? If it doesn't, then it might not be a caching issue.
I believe restarting the server is supposed to clear the cache.
Maybe the problem isn't the IIS, but a web proxy between your browser and your web server caching the page?
Or a wrong DNS settings pointing to another server which holds a copy of that web/page? You could also look on the same IIS if there is another web configured and host headers got mixed up, making you test on the wrong web.
I might just say the obvious here but have you tried recycling the application pool?
Thanks for replies guys.
I figured out that it wasn't the caching issue. I didn't cleared out Bin folder and the compiled version of the page with extension .compiled was seating there all the time. I don't what changed this time, but I followed the same process like 100 times before and copied files on top without clearing Bin.
I should be more accurate with such things.

Resources