Freigeben über


Javascript Error: Webform_DoPostbackWithOptions is undefined

A javascript error. Simple. Neat. Clean.

But... since you noticed it, no Sharepoint controls are working. No paging controls, no buttons, generally any control that would require a postback between the webbrowser and the server will cease to function properly.

As a root cause analysis for the issue it quickly becomes obvious that the javascript holding the function definition is not available in the browser.Invstigating where the javascript resides you will find out that it is being generated at runtime by the webresource.axd so no js file for the function on the server.

At this point you may wonder : how come it worked or (even more funny) how come it works SOMETIMES ?

Well, following the rabit traces into it's hole, we can identify the following potential resons for the behavior:

  1. access to webresource.axd is restricted (either your firewall restricts some path or you ran URLSCAN on the server and axd files are denied)
  2. Son of Smart Part is installed and somehow reformats the URL that should get to the axd resource
  3. Output caching profiles defined.

As resolution for the possible causes above you should probably:

  1. check your firewall logs for denied axd requests
  2. see Jan Tielen 's https://weblogs.asp.net/jan/archive/2006/03/22/440793.aspx
  3. Edit the Site Collection cache Profiles in the Administration site and modify the Public Internet (Purely Anonymous)  Profile

         Change Vary by HTTP Header from Browser to User-Agent

Perform a clear cache on the object cache and you should be back in business.

Have fun

Comments

  • Anonymous
    January 01, 2003
    The comment has been removed
  • Anonymous
    September 09, 2010
    Hi there ! Don't know if this thread's still alive, but I exactly encounter that problem, (Webform_DoPostBackWithOptions is undefined) BUT my sharepoint behaves pretty strangely : In fact, the error won't pop-up or do an alert on the bottom left-hand corner of the window. The javascript just won't work (but the code behind is perfectly executed, and when I refresh the page, everything's good ! So to know what was going on I turned on the I.E. dev. tools, that shown me the error. Then I found your article, so I checked the connections with fiddler, and found that webresource.axd is accessed, but in that file, there is no method called Webform_DoPostBackWithOptions (). And there's no firewall and no cache. May that be due to an incorrect version of ASP.NET ? Thanks for your help. Cheers, S.