Fix for DatabaseInterface.SetCookies

Jan 22, 2010 at 11:57 PM
Edited Jan 22, 2010 at 11:58 PM

In line 314 UserAgent.Substring(0, 150) throws an exception if the UserAgent is shorter than 150 characters.

Possible Fix (Works on My Machine): HttpContext.Current.Request.UserAgent.Substring(0, Math.Min(150, HttpContext.Current.Request.UserAgent.Length))

Also thanks for this great provider. Really like it. Keep up the good work!