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 related issues.
I am adding it here as a quick reference for others and myself.
Great article!