It looks like the recent Microsoft updates broke ASP.NET / IIS on my development machine. Trying to launch any website hosted on my local IIS server returned a 500 error and the following error message:
Calling LoadLibraryEx on ISAPI filter “C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_filter.dll” failed;
And checking the event log just returned a similar error message:
ISAPI Filter ‘c:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_filter.dll’ could not be loaded due to a configuration problem. The current configuration only supports loading images built for a AMD64 processor architecture. The data field contains the error number. To learn more about this issue, including how to troubleshooting this kind of processor architecture mismatch error, see http://go.microsoft.com/fwlink/?LinkId=29349.
After doing a bit of digging around on the web, the solution to this problem was to simply re-register IIS using the following command:
Everything then thankfully burst back into life!
As part of his fantastic ‘What is .NET standard‘ presentation at DDD12, Adam Ralph provided an amazing amount of detail in such a short amount of time. One of the most valuable points, which is completely obvious when you think about it, is how you should work with .NET standard when creating libraries. NET standard now comes in a multitude of flavours: currently 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6 and 2.0. When starting out . . .
If you’re trying to access a class library (.NET Standard) from a traditional console application (in VS2017 those can be found under ‘Windows Classic Desktop’) you will run into problems; which can feel a little strange for something that was pretty simple in VS2015 and earlier. You can add a reference to the class library project (Resharper will even volunteer to add the dependency / namespace reference if you don’t already have it). But the . . .
Be aware that running this script changes all app pools to run v4.0 framework which is maybe not what you want! I had to change mine back to v2.0
This did fix my problem though, so a big thanks.
TonyD, Glad it helped and thanks for pointing the potential app pool issue. At the time I only had one website on the server that suffered the fault and I wanted it to be v4.0 so didn't see the issue – but I could imagine the problems it could cause.