Javascript Error - WebForm_InitCallback is not defined

Jan 29, 2010 at 2:01 AM
Edited Jan 29, 2010 at 2:14 AM

I try to edit or delete widgets and I get a javascript error:

WebForm_InitCallback is not defined
What does this mean?
Thank you for any help!
Coordinator
Jan 29, 2010 at 2:14 AM

On the Settings tab in the control panel, there's an Advanced Settings section.  Try unchecking the "Compress Webresource.axd" option.

Jan 29, 2010 at 2:15 AM

Thanks for the response. I saw you mentioned this in other threads and it doesn't seem to have any effect.

 

Coordinator
Jan 29, 2010 at 2:53 AM

So after unchecking that option, you're still getting that same JavaScript error?

Are you on IIS6 or IIS7?  Can you view the RSS feed?  Does the Contact page work?

Jan 29, 2010 at 3:18 AM
Edited Jan 29, 2010 at 3:20 AM

Yes. Here is my blog: http://www.studentcasa.com/blog/

 

IIS7. Rss feed is not viewable (permissions denied). Contact page doesn't work yet. I don't have an email address setup.

 

Update, I tried re-uploading the blog software and now I'm getting this error:

editWidget is not defined

 

Jan 29, 2010 at 3:25 AM

Ah http://www.studentcasa.com/blog/js.axd?path=/admin/widget.js permission is denied for some reason.

 

Coordinator
Jan 29, 2010 at 6:40 AM

Yes, I also see the permission denied messages.  It's occurring on some, but not all the AXD extensions.  Including the WebResource.axd file, which is a standard ASP.NET resource handler (for JavaScript, CSS, images, etc).

http://www.studentcasa.com/blog/WebResource.axd?d=j246orv_38DeKtGbza6y6A2&t=633739631971222506

Another permission denied is on the blog.js file which is served thru BE's js.axd handler:

http://www.studentcasa.com/blog/js.axd?path=%2fblog%2fblog.js&v=1.5.0.7

The RSS feed is using BE's syndication.axd file -- which isn't working as you pointed out.

But, the CSS.axd handler built into BE *does* work interestingly:

http://www.studentcasa.com/blog/themes/Standard/css.axd?name=style1.5.0.7.css

The reason why the CSS.axd handler works is because the path to CSS.axd is not in the root of your blog (it's in a subfolder).  All the other AXD URLs are /blog/xxx.AXD, but the CSS AXD URL is /blog/themes/Standard/CSS.AXD.

The other AXD handlers work (they don't return 403) if we add a folder name before AXD.  For example with the WebResource.axd mentioned above, if I add /test in the path, it actually works:

http://www.studentcasa.com/blog/test/WebResource.axd?d=j246orv_38DeKtGbza6y6A2&t=633739631971222506

This is fun, but doesn't really solve the problem though  :)

Are you using the web.config file that comes with BE?

I'm wondering if you have some type of URL rewriting going on.  Do you have control over the parent folder (i.e. www.studentcasa.com) ?  If you do, I would check the root / parent folder's web.config file, and look for a <rewrite> section inside of it.  If you've modified the BE web.config file, you might even have a <rewrite> section in your BE web.config file.  There's other URL rewriting technologies out there, but the <rewrite> one is for the IIS7 Rewrite Module.  This may not be the case, but it might be that a rewriting rule is rewriting requests for AXD to some other path or filename which is leading to the Access Denied message.

Jan 29, 2010 at 1:46 PM

Wow! Thank you thank you thank you! You are absolutely right. I disabled my IIS7 rewrites and it's working now. I will have to look at them and spruce them up.

 

Thanks!

Jul 2, 2012 at 2:50 PM

Ben....

I have the same problem, WebForm_InitCallback is not defined, but I'm using the source download for 2.6 right out of the box, loading it into VS2010 by double-click on the solution file and pressing F5. The failure occurs when it tried to run on localhost. This is a Windows 7 system. I'm lost.

 

----Scott

Coordinator
Jul 2, 2012 at 3:06 PM

@scottgurvey - there are 2 options in admin/settings/advanced you can try, "enable http comression" and "compress webresource.axd". In some cases I had this error and changing one or both made it go away. Have to investigate more why this happens.

Jul 2, 2012 at 3:15 PM

Thanks I will try that. I did a little more digging and if I understand how this works (I'm a WPF developer just learning ASP.NET) this is the actual statement being processed at the time of the exception.....

BlogEngineRes = {webRoot: '/',applicationWebRoot: '/',blogInstanceId: '96d5b379-7e1d-4dac-a6ba-1e50db561b04',i18n: {"hasRated":"You already rated this post.","savingTheComment":"Saving the comment...","comments":"Comments","commentWasSaved":"The comment was saved. Thank you for the feedback","commentWaitingModeration":"Thank you for the feedback. The comment is now awaiting moderation","cancel":"Cancel","filter":"Filter","apmlDescription":"Missing Resource [apmlDescription]","beTheFirstToRate":"Be the first to rate this post","currentlyRated":"Currently rated {0} by {1} people","ratingHasBeenRegistered":"Your rating has been registered. Thank you!","rateThisXStars":"Rate this {0} star{1} out of 5"}};

and in the quickwatch the objects are....

-  BlogEngineRes {...} Object
  webRoot "/" String
  applicationWebRoot "/" String
  blogInstanceId "96d5b379-7e1d-4dac-a6ba-1e50db561b04" String
+  i18n {...} Object

 

Jul 3, 2012 at 2:20 PM

As I mentioned I am new to this so bare with me. I looked at admin/settings/advanced. Am I correct that these are settings the administrator can make once BlogEngine is up and running? If so, since my failure is occuring on load, I am out of luck.

Coordinator
Jul 3, 2012 at 4:03 PM

1. Run from VS by pressing Ctrl + F5 (without debugging).

2. If JS error comes up, just close it - it is just JS ans should not block application.

3. Log in, go to settings/advanced and make a change.

4. Go back to the site and do Ctrl + F5 again, this time to refresh page.

Check if error went away by using FireBug or F12 tools in IE. If not, repeat with another setting.

Jul 3, 2012 at 6:28 PM

Thank you.

Turning off "compress webresource.axd" makes this error go away.

I have a test server on my network, I'll try deploying it there rather than using localhost and see if the error appears and I'll let you know.

----S

 

Sep 10, 2012 at 10:27 PM

Hi,

I'm using BlogEngine 2.6.I'm trying to integrate blog in to an existing MVC3 application.

I followed all the steps povided in the forum.

But i'm getting 

WebForm_InitCallback is not defined ,WebForm_InitCallback();//]]> error

and
BlogEngineRes = {webRoot: '/',applicationWebRoot: '/',blogInstanceId: '96d5b379-7e1d-4dac-a6ba-1e50db561b04',i18n: {"hasRated":"You already rated thispost.","savingTheComment":
can you tell me what shud i do to solve this?
I tried turing off "compress webresource.axd" as well as "enable http comression"
but nothing worked out for me.
Any help would be really appreciated.