System.Net trace configuration feature in ASP.Net 2.0 onwards is extremely useful when dealing with certificate related errors. Jeff P. Sanders from WinInet/System.Net API Escalation team has written this valuable post for troubleshooting ASP.Net certificate