If you’ve tried using the HttpListener API to build a web server, then you may have noticed that many runtime errors come back as wrapped Win32 errors rather than different exception types. Since HttpListener doesn’t say what specific Win32 errors might occur and the underlying HTTP Server API mostly points to the list of 15,999 kinds of errors defined by WinError.h, it can be a bit of a detective job figuring out what errors might occur and can safely be handled.
I happen to have come across some notes I made a few years ago while working on our HttpListener based web server for WCF. I don’t know how many of these have changed since then or how many were even correct in the first place, but here you go for entertainment purposes only. Included is the WinError.h definition of the error code and some additional notes were applicable.
Out of memory errors- you probably shouldn’t try to recover after these as something is seriously wrong.
Less fatal, but possibly still bad, errors.