Geeks With Blogs

News




ThreadAbortException my experiments with //Web

Recently one of our customers had an issue when migrating from ASP.NET 1.1 to ASP.NET 2.0.  The issue came up particularly in the deployment server where any page that had validations raised the error ‘Webform_PostBackOptions’ is undefined.

If you had worked with ASP.NET 1.1 you would recollect there was an aspnet_client folder that contains all the scripts that help in client side validation as well as raising the postback events.

In ASP.NET 2.0, the “WebResource.axd” file is the handler that generates all the client side scripts which were earlier processed by the aspnet_client folder.

Coming back to this particular customer scenario, they were running URL Scan utility on their server http://learn.iis.net/page.aspx/473/using-urlscan 

URL Scan is an useful free utility that can be installed on servers that allows you to restrict the file extensions served by the IIS.  This way, potentially harmful requests can be denied and thereby injection attacks avoided.

However, the WebResource.axd handler had to be manually added as an extension to be allowed and thereafter this error went off.

There are many more causes of this particular error and I found that it has been discussed enough in forums.  Here below is one of them for your reference

http://www.eggheadcafe.com/tutorials/aspnet/03cedfc8-e623-4fee-81d8-04663b71b675/aspnet-11-to-aspnet-2.aspx

 

Cheers !!!

Posted on Wednesday, January 7, 2009 5:59 PM ASP.NET | Back to top


Comments on this post: 'WebForm_PostBackOptions' is undefined error, ASP.NET 2.0

# re: 'WebForm_PostBackOptions' is undefined error, ASP.NET 2.0
Requesting Gravatar...
how can compile ASP.NET software
Left by Vivek Rastogi on Jan 09, 2009 9:45 PM

# re: 'WebForm_PostBackOptions' is undefined error, ASP.NET 2.0
Requesting Gravatar...
Hi I am having the WebForm_PostBackOptions' is undefined error, ASP.NET 2.0.

How my problem is

I have not migrated from .net 1.X.
Compression is not running on the IIS server
axd mapping are set
check when file exists box is not ticked.
I am not using the Global...

Can you help please with any other suggestions!!!!!!
Left by James McDonagh on Apr 09, 2009 2:27 PM

# re: 'WebForm_PostBackOptions' is undefined error, ASP.NET 2.0
Requesting Gravatar...
just try iisreset
Left by gc on May 08, 2009 5:18 PM

# re: 'WebForm_PostBackOptions' is undefined error, ASP.NET 2.0
Requesting Gravatar...
I had this problem when it was running on a VM it was because of the date/ time on the VM was incorrect.
Put the day of Today, and Works!!!
Left by Diego on May 22, 2009 8:35 PM

# re: 'WebForm_PostBackOptions' is undefined error, ASP.NET 2.0
Requesting Gravatar...
I was getting this error in a load balanced production environment, but once the network admin turned on sticky sessions, all the errors went away. I assume it was trying to load the .axd file from the other web server and perhaps that caused a security problem which didn't allow the file to load. Not sure but just thought I'd share what fixed it for me.
Left by Laura on Aug 01, 2009 7:29 PM

# re: 'WebForm_PostBackOptions' is undefined error, ASP.NET 2.0
Requesting Gravatar...
Ok. I found a fix for this problem in my case. The problem occurred when I upgraded an asp.net / vb.net application from VS 2003 to VS 2008 that contained Required Field Validator controls and used a Application_PreRequestHandlerExecute in the Global.asax file. I was getting the error Microsoft JScript runtime error: 'WebForm_PostBackOptions' is undefined. After much troubleshooting, googling, head banking against desk, and finally getting Microsoft involved, we discovered that if you remove or comment out the Application_PreRequestHandlerExecute event then do a full compile, all worked well. Then you can simply put back the Application_PreRequestHandlerExecute event and all continues to work well. Microsoft is doing research as to the root cause. Hope this helps someone!
Regards,
Todd
Left by Todd Byers on Nov 18, 2009 9:20 AM

# re: 'WebForm_PostBackOptions' is undefined error, ASP.NET 2.0
Requesting Gravatar...
Todd, has a similar project, tried that fix, no joy. Seems to happen about once a month to us, we jump through hoops and somehow it disappears. Hoops that actually fix the problem remain unknown.
Left by Bill on Nov 20, 2009 9:22 AM

# re: 'WebForm_PostBackOptions' is undefined error, ASP.NET 2.0
Requesting Gravatar...
I am configuring Sharepoint and when I click on "Administrative tasks" it gives me Java script error "'WebForm_PostBackOptions'is undefined".
I can see this error when I click on "Error on page" at the right bottom of the IE browser.

I think due this error I am facing below problem,
When I click on any link on sharepoint Central admin it asks for authentication many times and after clicking on 'Cancel' button 3-4 times it displays the page (where it must go without asking any authentications) and if I click on 'OK' 10-12 times I will get in.

In both cases either I click on 'Cancel' or 'OK' I will get in but in case I click on 'Cancel' It asks for 3-4 times but in case of 'OK' it asks 10-12 times.

Any quick help will be appreciated.

Thanks,
Sumit P.
Left by Sumit on Dec 28, 2009 4:00 AM

# re: 'WebForm_PostBackOptions' is undefined error, ASP.NET 2.0
Requesting Gravatar...
I had the same problem but solved it today. I discovered it was my system date that was wrong (27 Aug 2007). To solve this problem, just set the time to current.
Left by Demo.B on Jan 02, 2010 9:03 AM

# re: 'WebForm_PostBackOptions' is undefined error, ASP.NET 2.0
Requesting Gravatar...
System date is not an issue with me.
If some one has find the solution of above problem then please let me know.
Below I am describing again.
1.Whenever I try to click an "ok" button (for example when creating a new Web Application) on the Administration site I get the following JavaScript error.
"WebForm_PostBackOptions is undefined"

2. Whenever I click on a link on the Administration Site I get multiple login dialogs even if I click "Cancel" on this I am still able to proceed.


Thanksin advance.
Sumit P.
Left by Sumit on Jan 03, 2010 10:55 PM

# re: 'WebForm_PostBackOptions' is undefined error, ASP.NET 2.0
Requesting Gravatar...
check your system date and change your system date for example make system date 1 month later and close internet explorer and open new explorer then try again
Left by utku cinar on Mar 18, 2010 9:31 PM

# re: 'WebForm_PostBackOptions' is undefined error, ASP.NET 2.0
Requesting Gravatar...
On my win2k3 box with Moss 2007 I was getting this error while creating a site. Somehow my date and time was changed. I reset the time and date to the current time and restarted the IIS and the error went away.
Left by Sam on Mar 31, 2010 11:07 AM

# re: 'WebForm_PostBackOptions' is undefined error, ASP.NET 2.0
Requesting Gravatar...
Hi RegCure, what is the JS file you mentioned that i can check to see that WebForm_PostBackOptions function is really there? thanks!
Left by chempz on Apr 13, 2010 5:12 PM

# re: 'WebForm_PostBackOptions' is undefined error, ASP.NET 2.0
Requesting Gravatar...
I'm a little late to this thread, but I just wanted to say that I had the same problem when moving my site from a staging virtual directory to a production virtual directory. On IIS I looked through the configuration for the site and unchecked the "Verify that file exists" box for the axd type. The problem went away.
Left by bill on May 18, 2010 11:56 PM

# re: 'WebForm_PostBackOptions' is undefined error, ASP.NET 2.0
Requesting Gravatar...
Changing the date to today's date worked for me.
Thanks Diego!
Left by noman on Jun 18, 2010 9:22 PM

# re: 'WebForm_PostBackOptions' is undefined error, ASP.NET 2.0
Requesting Gravatar...
OK, I'm struggling with this issue when running my site from Visual Studio using Cassini. My clock is correct (although I had been doing some testing earlier with the clock set forward), I've reset IIS (even tho this is Cassini), my global.asax does not contain the Application_PreRequestHandlerExecute override. Any other suggestions?
Left by Jules on Jul 28, 2010 8:43 AM

# re: 'WebForm_PostBackOptions' is undefined error, ASP.NET 2.0
Requesting Gravatar...
changing the system date is worked for me also.
no need to change anything else
Left by s p on Aug 13, 2010 8:53 PM

# re: 'WebForm_PostBackOptions' is undefined error, ASP.NET 2.0
Requesting Gravatar...
My file global.asax had contained the Application_PreRequestHandlerExecute overriden for stopping one-click attack in ASP.NET 1.1. After removing that code in ASP.NET 3.5, the problem was gone. Thanks for idea.
Left by Eduard on Sep 11, 2010 1:43 AM

# re: 'WebForm_PostBackOptions' is undefined error, ASP.NET 2.0
Requesting Gravatar...
Awesome guys. thank you. i just changed my system date.
Left by Priya on Oct 02, 2010 5:23 PM

# re: 'WebForm_PostBackOptions' is undefined error, ASP.NET 2.0
Requesting Gravatar...
I had the same problem, Thanks for the help.
Left by St. Louis Divorce Attorney on Oct 26, 2010 12:04 AM

# re: 'WebForm_PostBackOptions' is undefined error, ASP.NET 2.0
Requesting Gravatar...
Superb guys, just changed the system date and time and everything worked fine.

Could anyone let me know why the system date and time was throwing up this error?

Cheers
Left by redbridge on Nov 02, 2010 12:57 AM

# re: 'WebForm_PostBackOptions' is undefined error, ASP.NET 2.0
Requesting Gravatar...
Could anyone let me know why the system date and time was throwing up this error?
Left by رجيم on Nov 03, 2010 1:17 PM

# re: 'WebForm_PostBackOptions' is undefined error, ASP.NET 2.0
Requesting Gravatar...
Same happening with me, I can't change to time/date as I don't have dedicated host... Any suggestions?
Left by Kabroo on Nov 22, 2010 5:05 AM

# re: 'WebForm_PostBackOptions' is undefined error, ASP.NET 2.0
Requesting Gravatar...
Thanks for sharing info about Webform_PostBackOptions.
I just changed my system date.

Panama, Rep. Panama
Left by Luis vargas on Nov 27, 2010 11:14 PM

# re: 'WebForm_PostBackOptions' is undefined error, ASP.NET 2.0
Requesting Gravatar...
Thank you very much! Following errors could be solved changing the system date:
1. Microsoft JScript runtime error: 'WebForm_SaveScrollPositionSubmit' is undefined
2. Microsoft JScript runtime error: 'WebForm_SaveScrollPositionOnSubmit' is undefined
3. Microsoft JScript runtime error: 'WebForm_RestoreScrollPosition' is undefined
Left by BF on Dec 10, 2010 3:42 PM

# re: 'WebForm_PostBackOptions' is undefined error, ASP.NET 2.0
Requesting Gravatar...
hi, your solution is excellent, it was past date on my system, when it is corrected, problem solved.
Left by jitendra on Dec 14, 2010 5:46 PM

# re: 'WebForm_PostBackOptions' is undefined error, ASP.NET 2.0
Requesting Gravatar...
The change date works for me, thank's, gracias :)
Left by Abril on Dec 22, 2010 2:09 AM

# webform_postback option is undefined
Requesting Gravatar...
when i run my website and click on submit button, i get webform_postbackoption is undefined error occure. so pls send solution.
regards
priya
Left by priya on Feb 01, 2011 3:52 PM

# re: 'WebForm_PostBackOptions' is undefined error, ASP.NET 2.0
Requesting Gravatar...
WebForm_PostBackOptions' is undefined error, ASP.NET 2.0.

In my case it was because the system's date was set backwards after ASP.NET was installed. We need this configuration. In my case after setting the date backwards (in the past), running CHKDSK /F fixed the issue. ASP.NET apparently doesn't want to run before it is installed ;-)
Left by Chris on Nov 08, 2011 4:55 AM

# re: 'WebForm_PostBackOptions' is undefined error, ASP.NET 2.0
Requesting Gravatar...
I solved this problem finally but just workaround. To my case, the system is current date and no globla.axa setting and web.config additional setting. but the js error still appear.

Workaround

Use this at your own risk. It's not a solution, it is a workaround. If you acquire a copy of the "WebResource.axd" file and copy it to your ASP.NET 2 application directory, it will get served up in place of the automagically-generated one. You will need to do a CTRL-F5 in Internet Explorer (or the equivalent in your browser of choice) on the problem page(s) to make the change take effect. I got a copy of WebResource.axd by visiting a web site that was running ASP.NET 2 successfully, and looking in C:\Documents and Settings\[your username here]\Local Settings\Temporary Internet Files for a WebResource.axd file. The one in Temporary Internet Files has some querystring data in the filename, remove this (rename the file to just plain WebResource.axd) & copy to your web application directory.

To save you all that mucking about, I've put a copy at http://www.inventua.com/Portals/0/Module Downloads/WebResource.axd.zip. Again, use at your own risk.

more details, pls check http://inventua.com/Default.aspx?tabid=135&EntryID=5&AspxAutoDetectCookieSupport=1
Left by Mark on Nov 24, 2011 1:38 PM

# re: 'WebForm_PostBackOptions' is undefined error, ASP.NET 2.0
Requesting Gravatar...
Date time change and validation works fine, why it failed no idea, but solution worked,

Thanks u saved my day
Left by Girish on Apr 17, 2012 6:40 PM

# re: 'WebForm_PostBackOptions' is undefined error, ASP.NET 2.0
Requesting Gravatar...
Hi,your solution is excellent, it was past date on my system, when it is corrected, problem solved. It saved my time.
Left by Pooja on Jun 06, 2012 10:56 AM

# re: 'WebForm_PostBackOptions' is undefined error, ASP.NET 2.0
Requesting Gravatar...
hi after all of googling and all of u said i finally find he solution
the problem was my web.config
i reset web.config and every thing become fine, i dont know which line was problem but i am sure problem is in web.config
Left by mehrdad on Mar 27, 2015 11:37 PM

Your comment:
 (will show your gravatar)


Copyright © Harish Ranganathan | Powered by: GeeksWithBlogs.net | Join free