Recaptcha error?

Topics: Controls
Feb 18, 2011 at 9:10 AM

I update my blog to v2.0.0.36. Works fine on my machine in both VS2010 and deploying to IIS7.5. But when I deploy to my hosting service I'm faced with two rather serious errors:

  1. Whenever I try to view a single post entry I get an error page.
  2. The page Admin/Settings/Rules.aspx does not work and I get an error page instead.

Everything else works.

I've managed to trace these errors a little bit by turning off custom errors but the stacktraces I see dont help me much... Can anyone help me? I'm thinking there is something in common with these two errors and that it has something to do with Recaptcha settings but I dont know where to look now :( The settings file is the default file I got with the source code download. It is uploaded to my host and as I said, everything works when I run on localhost so I cannot recreate the error.

Stack trace for first error:
[NullReferenceException: Object reference not set to an instance of an object.]
   App_Code.Controls.RecaptchaControl.get_MaxLogEntries() +22
   App_Code.Controls.RecaptchaControl.get_RecaptchaLoggingEnabled() +24
   App_Code.Controls.RecaptchaControl.OnUnload(EventArgs e) +20
   System.Web.UI.Control.UnloadRecursive(Boolean dispose) +252
   System.Web.UI.Control.UnloadRecursive(Boolean dispose) +188
   System.Web.UI.Control.UnloadRecursive(Boolean dispose) +188
   System.Web.UI.Control.UnloadRecursive(Boolean dispose) +188
   System.Web.UI.Control.UnloadRecursive(Boolean dispose) +188
   System.Web.UI.Control.UnloadRecursive(Boolean dispose) +188
   System.Web.UI.Control.UnloadRecursive(Boolean dispose) +188
   System.Web.UI.Page.UnloadRecursive(Boolean dispose) +23
   System.Web.UI.Page.ProcessRequestCleanup() +43
   System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +242
   System.Web.UI.Page.ProcessRequest() +80
   System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +21
   System.Web.UI.Page.ProcessRequest(HttpContext context) +49
   ASP.post_aspx.ProcessRequest(HttpContext context) in c:\windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\38073e0f\a4d9d522\App_Web_tf-b86xy.1.cs:0
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +181
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75

Stack trace for second error:

[NullReferenceException: Object reference not set to an instance of an object.]
   Admin.Settings.Rules.BindFilters() +48
   Admin.Settings.Rules.Page_Load(Object sender, EventArgs e) +62
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   System.Web.UI.Control.LoadRecursive() +50
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627

 

 

 


Feb 18, 2011 at 1:30 PM

I believe this issue is related to the one I posted here http://blogengine.codeplex.com/discussions/246574

I also get this error and the line previous to it

  var settings = ExtensionManager.GetSettings("Recaptcha");
settings is null. 

I'm looking into how to remove Recaptcha for something else or how to configure it.

After tracing It's also failing on the following in RecaptchaControl for the same reason above, but that one is thrown but doesn't surface.

   this.publicKey = settings.GetSingleValue("PublicKey");

Feb 18, 2011 at 9:33 PM

Can you see the extentions?

Feb 19, 2011 at 12:03 PM

Where/when should I see the extensions? If I go to page admin/Extension Manager/default.aspx I only get the title "Extensions" but nothing below.

Mar 8, 2011 at 4:40 PM

I am facing similar problem. Did you have any luck cracking this nut? If so, I would appreciate if you could share the trick.

Mar 9, 2011 at 7:45 AM

I'm still stuck, but I've traced the problem to the same lines of code that ssuing8825 found.

Mar 9, 2011 at 9:15 PM

i have smilar problem on iis 7.5 on windows2008 x64.

error

----------------

Is impersonating: False

Stack trace: at App_Code.Controls.RecaptchaControl.OnUnload(EventArgs e)
at System.Web.UI.Control.UnloadRecursive(Boolean dispose)
at System.Web.UI.Control.UnloadRecursive(Boolean dispose)
at System.Web.UI.Control.UnloadRecursive(Boolean dispose)
at System.Web.UI.Control.UnloadRecursive(Boolean dispose)
at System.Web.UI.Control.UnloadRecursive(Boolean dispose)
at System.Web.UI.Control.UnloadRecursive(Boolean dispose)
at System.Web.UI.Control.UnloadRecursive(Boolean dispose)
at System.Web.UI.Page.UnloadRecursive(Boolean dispose)
at System.Web.UI.Page.ProcessRequestCleanup()
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at ASP.post_aspx.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

-----------------------------------

 

I have put onunload to try catch clause to see if it will help.

protected override void OnUnload(EventArgs e)
{
try
{
if (this.RecaptchaLoggingEnabled)
{
if (!this.Page.IsCallback)
{
this.PageLoadTime = DateTime.Now;
this.RecaptchaAttempts = 0;
}

this.RecaptchaRenderTime = DateTime.Now;
}

base.OnUnload(e);
}
catch
{
}
}

Mar 13, 2011 at 6:04 AM

I was able to solve my problem. I took the following steps:

  1. In the BE 2.0 unzipped version MetaExtension.xml was missing. I copied this file from BE 1.6.0. A record was automatically generated in be_DataStoreSettings table in MSSQL.
  2. I kept App_Code at the website root level and website/blog levels. I deleted RecaptchaControl.cs and SimpleCaptchaControl.cs from the extension folder of App_Code.

I have not tested all the functionalities but I am able to get the list of extensions and able to edit and save them. The link is at -

http://www.kushbiz.com/blog/

Hope it may help somebody!