About the author

Steven HarmanSteven Harman is a passionate developer who believes that writing great software isn't just a job, its a craft.

ASP.NET MVP

For recent posts and more about me, scroll to the bottom.

Subscribe

  • Subscribe to my feed. via RSS
  • Subscribe via email via email

News

devLINK Technical Conference

Jobs

Badges

  • Subtext Project
  • Support Subtext
  • HiddenNetwork.com Banner

WebForm_PostBackOptions is Undefined - Check Your httpModules

While working on a new client application and ran into a bizarre issue with the WebResource.axd handler. The issue manifests itself as a JavaScript error when trying to do a PostBack from your WebForm.

In IE7 you'll get the standard Error pop-up message informing you that

'WebForm_PostBackOptions' is undefined

Error MessageNot exactly the most useful error message. After a little JavaScript debugging in Firebug I found that the error was thrown because the WebForm_PostBackOptions method was missing. Yikes!

How is it missing?

As of asp.net 2.0, the Framework uses a new WebResource.axd handler to send assembly resources (like images, CSS files, JavaScript files, etc...) down to the browser. I fired up Fiddler and took a look at the WebResource.axd?d=xxx files sent down to the browser... and they were empty!

Yeah, the server was sending empty resource files down to the browser for all of the requests to the WebResource.axd handler.

After much Googling, debugging, and head-banging-against-the-desk... I had no solution. Lucky for me I work with a pretty smart guy and he was able to shed some light on the problem.

Check your httpModules

It turns out that I had configured a custom httpModule that was interfering with the WebResource.axd handler. After removing that pesky httpModule from my web.Config file all was well!

So, if you're seeing the WebResource.axd handler return empty resource files take a look at the httpModules and make sure they are all playing nice.

What others are saying.

# WebForm_PostBackOptions is Undefined - Check Your httpModules
Gravatar DotNetKicks.com
Apr 11, 2007
You've been kicked (a good thing) - Trackback from DotNetKicks.com
# re: WebForm_PostBackOptions is Undefined - Check Your httpModules
Gravatar Derek
Jun 05, 2007
Nice catch -- the HttpCompress module from blowery.org is in the "behaving badly" bucket.
# re: WebForm_PostBackOptions is Undefined - Check Your httpModules
Gravatar Hitesh
Jul 31, 2007
Are bhai solution to do?
# re: WebForm_PostBackOptions is Undefined - Check Your httpModules
Gravatar codewarrior
Aug 11, 2007
Hey Steve!

What's the solution man? This thing is driving me nuts!

Your assistance in this matter will be highly appreciated.

Thanks
# re: WebForm_PostBackOptions is Undefined - Check Your httpModules
Gravatar jamie rogers
May 19, 2008
i found cristal reports was interfering..... try removing it if using it....
# re: WebForm_PostBackOptions is Undefined - Check Your httpModules
Gravatar Romita
Jun 13, 2008
Hi Steve,

I am facing the above "WebForm_PostBackOptions is Undefined" problem in one of my files in a .net 2008 project. Exception is arising due to validating controls in it, if they are removed its working fine.

I tried including WebResource.asd into my project, removed Http Module section also from the Webconfig file.

But still my problem is persisting. Please show us a way out of this. Till today the same coding was working, today suddenly its popping up.

Looking forward for a positive response from you.

Regards,

Romita
Comments have been closed on this topic.