首页 \ 问答 \ 网站AJAX错误(Website AJAX Errors)

网站AJAX错误(Website AJAX Errors)

我们重启了我们的服务器,突然间我们所有的网站都开始抛出这个错误。 看起来ScriptManager未被识别。 我试图回滚,重新安装更改应用程序池但收到此错误。 无论我们在哪里进行webservice调用,我们都会收到此错误。 有快速解决方法吗? 这是错误

网页错误详情

Message: 'Sys' is undefined


Sys.Application.initialize();
Sys.WebForms.PageRequestManager._initialize('ctl00$ScriptManager1', document.getElementById('aspnetForm'));
Sys.WebForms.PageRequestManager.getInstance()._updateControls([], [], [], 90);

请帮忙。


We rebooted our server, and all of sudden all of our sites started throwing this error. Looks like ScriptManager is not being recognized. I tried to roll back, reinstall change app pool but getting this error. Everywhere we are doing webservice calls, we are getting this error. Is there a quick fix to it? Here are the errors

Webpage error details

Message: 'Sys' is undefined


Sys.Application.initialize();
Sys.WebForms.PageRequestManager._initialize('ctl00$ScriptManager1', document.getElementById('aspnetForm'));
Sys.WebForms.PageRequestManager.getInstance()._updateControls([], [], [], 90);

Please help.


原文:https://stackoverflow.com/questions/5791303
更新时间:2019-07-13 05:24

最满意答案

小提琴: http//jsfiddle.net/iambriansreed/kCtLh/

(function($) {
    $.fn.replace = function(obj) {
        var a = $(this).html();
        for (var i in obj){
           a = a.replace(new RegExp(i.replace(/([.?*+^$[\]\\(){}|-])/g, "\\$1"), "g"), obj[i]);
        }
        return $(this).html(a);
    };
})(jQuery);

$('#myDiv').replace({
    ':)': '<img src="http://bit.ly/dbtoez" />'
});​

最终版本。 它为你逃脱了所有的角色。 :)


Fiddle: http://jsfiddle.net/iambriansreed/kCtLh/

(function($) {
    $.fn.replace = function(obj) {
        var a = $(this).html();
        for (var i in obj){
           a = a.replace(new RegExp(i.replace(/([.?*+^$[\]\\(){}|-])/g, "\\$1"), "g"), obj[i]);
        }
        return $(this).html(a);
    };
})(jQuery);

$('#myDiv').replace({
    ':)': '<img src="http://bit.ly/dbtoez" />'
});​

Final Version. It escapes all the characters for you. :)

相关问答

更多
  • 最后一个片段的问题是它使用当前类别的名称来定位最后选择的标签以便翻转。 相反,如何搜索“:”(如果您在其中一个选项中有“:”,这将不起作用),然后替换该部分字符串。 将第5行更改为: , old = $("select option:contains(':')") 和第8行: oldbar && old.html(oldbar.replace(oldbar.substr(0, oldbar.indexOf(':') + 2),'')); 让我知道如果这不适合你! 编辑:作为事后的想法,你可以考虑添加这一 ...
  • 你是说要阻止<和>字符。 这是一种更简单的方法,只要在keydown事件发生时忽略这些字符。 另外我建议使用jQuery - 如果可以的话。 http://api.jquery.com/event.which/ var ignoredChars = [188, 190]; // <, > $('#myTextField').keydown(function(e) { if(ignoredChars.indexOf(e.which) > -1) { e.preventDefault(); ...
  • 小提琴: http : //jsfiddle.net/iambriansreed/kCtLh/ (function($) { $.fn.replace = function(obj) { var a = $(this).html(); for (var i in obj){ a = a.replace(new RegExp(i.replace(/([.?*+^$[\]\\(){}|-])/g, "\\$1"), "g"), obj[i]); ...
  • 我会更多地依赖于解析能力的浏览器,并让浏览器找出什么是有效的HTML等。 像这样的东西应该工作 function linkify(inputText) { var dom = new DOMParser(), doc = dom.parseFromString('
    '+ inputText +'
    ', 'text/html'), ref = doc.getElementById('wrap'), reg = /[-a-zA-Z0 ...
  • 原来的解决方案不起作用的原因是它没有检查它是否匹配整行/单词/数字。 因此,例如在用ff1替换ff1 ,您的缓冲区现在是: FF01 ff2 ff3 FF010 FF011 ff20 ff21 ff23 gb20 gb10 gh23 The reason your original solution doesn't work is that it isn't checking that it's matching a whole line/word/number. So for instance afte ...
  • 您可以使用反射从Java文件中提取信息。 您可以使用Scanner读取Java文件的每一行,然后使用BufferedWriter编写(覆盖)Java文件并进行必要的更改。 You could use reflection to pull information from a Java file. You could use a Scanner to read each line of the Java file, and then use a BufferedWriter to write (overwri ...
  • 你问: 每次调用循环时,调用是否必须重新初始化b和c? 答案是,是的。 你问: 我是否应该使用静态T b,c代替Call函数? 答案是,很可能不是。 如果您担心创建T实例的成本,可以使用以下方法对函数进行一点优化: T Call(T a) { return Call3(Call2(Call1(a))); } You asked: Is Call going to have to reinitialise b and c everytime it is called in the loop? The ...
  • 好吧,我想到了其他可能想要使用以下代码的人: A)允许您在每个灯箱的标题中放置一个指向slimbox图像的链接,而不需要为每个灯箱添加大量代码。 您所要做的就是使用提供的代码,然后将您要链接的图像放在与灯箱图像相同的文件夹中,并将“_lg.jpg”添加到链接图像的标题中,代码告诉它链接到一个名为“_lg.jpg”的人。 接着 B)允许你使用图像映射激活slimbox而不仅仅是单个图像,方法是放置$("#map area").slimbox()其中#map是你的map id值, area部分告诉它在按下地图区 ...
  • 你可以用这个: 在每行末尾的空格后放置\,这可以防止编译器检查新行或输入按下的键。 这使得代码可读。 然后,您可以在方法中的任何位置使用MY_NOTIFICATIONS。 #define MY_NOTIFICATIONS [[NSNotificationCenter defaultCenter] addObserver:self \ selector:@selector(_gotECSlidingViewAnchorRightOrRightrNotification) \ name:ECSlidingVie ...
  • #define MyEventLog(message) [[MyEventLogManager sharedInstance] newLogWithText:message] 但是,您会发现提供该方法的varargs版本很有用,因此您可以传递格式化文本: - (void)newLogWithFormat:(NSString *)format, ... { va_list va; va_start(va, format); NSString *message = [[NSString ...

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)