hradyesh / recaptcha

Automatically exported from code.google.com/p/recaptcha
0 stars 0 forks source link

InvalidOperationException on attempting to write to event log. #53

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create an asp.net web application, add the recaptcha control to a form.
2. Ensure that the web application runs under an account that does not have
write permissions to the application log.
3. Ensure that the remote recaptcha server is unreachable.
4. Execute the web application, and submit the form.

What is the expected output? What do you see instead?
Expected output: Either the form should submit, or the validation failure
message should be displayed.  Instead, an uncatchable
InvalidOperationException is thrown when the control attempts to write the
WebException details to the event log.

What version of the product are you using? On what operating system?
recaptcha-dotnet-1.0.2.0, Server 2008

Please provide any additional information below.
It should not be assumed that the web application has permission to write
to the event log.  Some mechanism should be provided to allow developers to
disable event logging.

Original issue reported on code.google.com by jaker...@gmail.com on 30 Jun 2009 at 2:15

GoogleCodeExporter commented 9 years ago
I'm not sure whether this is the library problem.

We are not logging anything from the library, so any error related to logging 
may have 
been generated by the client code (i.e. the web application).

Original comment by adrian.g...@gmail.com on 24 May 2010 at 9:10

GoogleCodeExporter commented 9 years ago
Then why are so many people having this issue? 

Original comment by stonesif...@gmail.com on 13 Dec 2012 at 4:47

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
We are using version 1.0.5.o and using Telerik JustDecompile you can very well 
see that in the Validate method, when an exception is caught, it is trying to 
write to the event log. So this is clearly an issue with the library.

<code>
Catch webException As System.Net.WebException
  EventLog.WriteEntry("Application", webException.Message, EventLogEntryType.[Error])
  recaptchaNotReachable = RecaptchaResponse.RecaptchaNotReachable
  flag3 = True
</code>

Original comment by dwschuma...@gmail.com on 29 Apr 2014 at 5:43

Attachments: