Monday, March 26, 2012

ASP.NET AJAX Beta 2 Bug

I have a popup window in a web project that on postback executes the following startup JavaScript:

window.opener.document.getElementById('rptrOtherCrit_ctl01_PTSValList1_hdnValues').value ='NJ';window.opener.__doPostBack('rptrOtherCrit$ctl01$PTSValList1$hdnValues','')window.opener.focus();window.close();

The hidden control in the opening page that is being modified is within an <asp:UpdatePanel> control. Everything works fine when using IE 6 but, when using Firefox 2.0 the following error appears in the Error Console:

Error: [Exception... "Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIXMLHttpRequest.status]" nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)" location: "JS frame :: http://localhost/TaxBrowser/ScriptResource.axd?d=rrMPh95m1EXHDVTP53sdlY7yEQVgCg7PqciEiGs1HCx_e6TnjvyveNwrB2X38b1_rlFCHP1MhbU0L_WYwgrZDpG_PF1uwTqLpZqVE5wb1XLd2paC8td9zt_W4KlqoZhrtCCwf7Z_N-6whUkZJdtjEe1ZeMEM-Pqb3wvBBXghujU1&t=633008283654152282 :: Sys$Net$XMLHttpExecutor$get_statusCode :: line 3509" data: no]
Source File: http://localhost/TaxBrowser/ScriptResource.axd?d=rrMPh95m1EXHDVTP53sdlY7yEQVgCg7PqciEiGs1HCx_e6TnjvyveNwrB2X38b1_rlFCHP1MhbU0L_WYwgrZDpG_PF1uwTqLpZqVE5wb1XLd2paC8td9zt_W4KlqoZhrtCCwf7Z_N-6whUkZJdtjEe1ZeMEM-Pqb3wvBBXghujU1&t=633008283654152282
Line: 3509


Certainly looks like a bug to me.

Try to test?it?in?IE?7.0,Opera,Escape?or?Safari?and?check?if?it?gets?the?same?error.Maybe?the?error?message?is?caused?by?
FireFox, not?Ajax?bug. Besides,can you post some codes here?This maybe?gives?us?to?fix?the?problem.
Try?to?debug?your?codes?and?fix?which?code?lines?cause?the?error?message.

I'm getting the same error (in firefox) just trying the sample at:

http://ajax.asp.net/docs/ViewSample.aspx?sref=Sys.Net.PageMethod%23PageMethod.aspx but not in IE 6. I'll try updating firefox


You need to add "[Microsoft.Web.Script.Services.ScriptService]" in front of the web service class in Ajax Beta 2.It is said this is a known bug in Ajax Beta 2.Try to add it and test your codes in IE,FireFox,Opera and Safari.Please let me know the testing results.

No comments:

Post a Comment