raygun4net
raygun4net copied to clipboard
Allow for offline storage in ASP.NET applications
Testing failure to connect to the client API endpoint from the web server by routing api.raygun.io to an invalid IP address via a Host File entry I got the following error along with a connection failure error.
Error saving message to isolated storage Unable to create the store directory. (Exception from HRESULT: 0x80131468)
According to https://raygun.com/forums/thread/102940 offline storage and later sending is not really anticipated for ASP.NET. However, temporary failures may occur there too. I discovered the issue when disabling TLS 1.0 and 1.1 for IIS in anticipation of this being automatically disabled for Azure Web Apps in June 2018. All Raygun error reports failed until I set System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
This just as an example that error logging could fail due to environment changes. As it is the error reports are lost.
The issue with using isolated storage is probably that the IIS AppPool identity used does not have write access to isolated storage folders and on 3rd party hosted sites this may be impossible to grant. Maybe the App_Data folder could be used instead?
Thanks bgxie for this detailed issue. We'll look into this for a future release of Raygun4Net.
-Jason Fauchelle