Open wwuck opened 11 years ago
Fixed and new nuget package (v2.2.1) pushed up. try that.
That commit doesn't appear to check for a nullref on HttpContext.Current.Error. During my testing I found that HttpContext.Current wasn't null, only HttpContext.Current.Error. Still good to have the nullref check on HttpContext.Current though.
Hmm. weird. So an error has occurred ... but we don't have an error.
I've updated the code and pushed a new package up. test away!
Looks like that fixes the errors I was seeing. Thanks!
I'm getting a NullReferenceException appearing when HttpContext.Current.Error is null. It only seems to happen for me when I do a request to a Web-Api controller that requires authentication, and the user hasn't yet authenticated via forms auth. Adding in a check for null values on currentError appears to resolve the problem and Web-Api then returns the correct 401 response.
CustomErrorHandlingModule.cs#L98
I'll try to submit a pull request after I work out how to use git.