开发者

corrupt MicrosoftAjax.js? unexpected token? what is this?

I have an asp.net form that contains some html, 2 controls a calendar from the AjaxControlToolkit and a custom SandTrap.WebControls textbox which works fine on several other servers we have this form running on. However on one server It breaks and when I debug the javascript It seems I have a corrupt MicrosoftAjax.js being downloaded - it says unexpected token illegal

Here is what is coming through inside MicrosoftAjax.js line 2932

Sys.UI.Key.prototype = {
    backspace: 8,
    tab: 9,
    enter: 13,
    esc: 27,
    ...
    126�=NCys.UI.�ey.ra�isterEnum("Sn2.UI.Key");

First thing I did is compare the website directory with the other servers - same. Checked that the MicrosoftAjax.js is not corrupt. Everything is identical. So what could this be?

Edit: the culprit is ajaxToolkit:ToolkitScriptManager for sure. When I removed it, the page loads fine. I did a compare on the MicrosoftAjax.js and nothing different is coming up. I even replaced the file with another one from my pc still no luck.

Edit: Seems that if I set debug to false in the web.config the error goes away. Any other ideas as to what could be causing this? I looked at the .debug js file and it looks fine.

Would reinstalling the aja开发者_如何学编程xtoolkit somehow help? Or do I need to reinstall the .net framework?


Open Notepad, place the code in there, then save it back (making sure it's not saving Unicode). Someone might have opened it and saved it with Wordpad or some word processor. So, visually, things might "look" right, but they won't be.

You could also run a COMP against a known good file and your bad file. Or just copy a known good file over the bad file

Humans are the least trustworthy elements in the computing process.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜