2 More Reasons Why You Might Get A Blank Page in IIS7
I’m still fairly new to IIS 7 and getting used to the blank pages it serves up when it’s not happy with the way you’ve configured a website. It reminds me a bit of the kind of error handling you used to see sometimes in VB6 with
on error resume next
I think the philosophy that this sort of error-handling follows is along the lines of “never admit something went wrong!” And a corollary of this is that you never, EVER log what went wrong because that’s a permanent record of your failure as programmer to create the perfect program.
IIS 7 seems to follow this approach - I haven’t been able to find a helpful log message for any of my blank page responses, so I usually just resort to playing with settings until it works.
Anyway, here’s a couple of common causes for the blank page in IIS 7 that I’ve come across.
Please note that some or all of these errors may arise because I like to create separate websites with a DNS entry in etc/hosts, rather than create virtual directories under the default website. This is so I can mimic the production environment of a multi-tenanted app a bit more closely, where I use URLs like “shop1.local” instead of “localhost/shop”.
If you’re running a website outside the wwwroot folder, you probably need to give the ‘Everyone’ group view and execute permissions on the folder. It doesn’t seem to work with if you do this for the Network Service account.
CPU architecture differences
If you’re running a website on an x64 machine but the binaries were compiled for a 32-bit system, you need to enable 32-bit applications.
This can be done by choosing your application pool > Advanced Settings > Set “Enable 32-Bit Applications” = True.