Usuário com melhor resposta
ASp.net IIS - Ajax não funciona (if (typeof(Sys) === 'undefined') throw new Error('ASP.NET Ajax client-side framework failed to load)

Pergunta
-
Bom dia galera,
Por favor me socorram, já fucei tudo na net mas nada resolve, meu ajax parou de funcionar, coloquei na minha página de logon um modal que é chamado quando está efetuando o logon.. o código funciona perfeitamente quando rodo pelo visual studio 10, e quando rodo em outra máquina, mas nessa minha máquina com wein 7 e IIS 7.5 ele parou de funcionar.. quando depuro pelo broser verifiquei que está ocorrendo este erro :
if (typeof(Sys) === 'undefined') throw new Error('ASP.NET Ajax client-side framework failed to load.'); // --> </script> <input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="/wEWBgKWwuakDgKqxuSSBQLWx+rOBAKvvu2ADgKvvvmADgK514y9BxI7Mi+et6kgriOlqIltegUqoLD8VCpk2/Dgjeqk22rS" />
Por favor galera, já tenho dias tentando resolver isso, agradeço qualquer ajuda.Segue o código da pa´gina de logon:
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="logon.aspx.cs" Inherits="logon" %> <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %> <asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" Runat="Server"> </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server"> <style type="text/css"> body,input,form,span,div{font-family:Tahoma;font-size:8pt; ; top: 0px; left: 0px; } </style> <div id = "d1"> <asp:Panel ID="Panel5" runat="server" style="; z-index: 1; left: 5px; top: 1px; height: 27px; width: 920px;"> <asp:Label ID="Label4" runat="server" Text="Logon do Controle de Chamados" style="z-index: 1; left: 353px; top: 4px; ; color: #336699; font-family: 'Segoe UI';"></asp:Label> </asp:Panel> </div> <!----------------------------------------label de informações >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>--> <div id = "linha1"> <hr /> </div> <asp:UpdatePanel ID="UpdatePanel2" runat="server"> <ContentTemplate> <asp:Panel ID="Panel4" runat="server" style="z-index: 1; left: 6px; top: 3px; ; height: 47px; width: 920px"> <asp:Label ID="Label5" runat="server" style="z-index: 1; left: 0px; top: 8px; ; width: 634px; right: 286px; height: 17px;" Text="Informe seu usuário e senha para efetuar logon no Controle de Notas de Serviço"></asp:Label> </asp:Panel> </ContentTemplate> </asp:UpdatePanel> <div id = "linha2"> <hr /> </div> <!----------------------------------------label de informações <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<--> <div> </div> <html xmlns="http://www.w3.org/1999/xhtml" > <head > <title></title> <!--background-color:#e6e6e6;---> <style type="text/css"> .modalBackground { background-color:#e6e6e6; filter:alpha(opacity=60); opacity:0.60; } </style> </head> <body> <fieldset id="FS2"> <legend>Inserir logon e senha</legend> <div> <asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> <!--//---------------------------------------- conteudo aki -----------------------> <asp:Panel ID="Panel1" runat="server" style="; top: 0px; left: 0px; height: 127px;"> <asp:Panel ID="Panel2" runat="server" BorderColor="Silver" BorderWidth="1px" Height="80px" style="z-index: 1; left: 309px; top: 10px; ; height: 100px; width: 260px"> <asp:Button ID="Button2" runat="server" style="z-index: 1; left: 171px; top: 73px; ; bottom: 7px; width: 70px; right: 19px" Text="Logar" Font-Size="X-Small" Height="20px" onclick="Button2_Click" TabIndex="1" /> <asp:TextBox ID="TextBox2" runat="server" style="z-index: 1; left: 15px; top: 73px; ; width: 129px; height: 17px; font-size: small;" Font-Size="X-Small" BackColor="#DEDEEF" Height="13px" TextMode="Password" TabIndex="2"></asp:TextBox> <asp:TextBox ID="TextBox1" runat="server" style="z-index: 1; left: 14px; top: 23px; ; width: 131px; height: 17px; right: 115px; font-size: small;" Font-Size="X-Small" BackColor="#DEDEEF" Height="15px" TabIndex="1"></asp:TextBox> <asp:Label ID="Label1" runat="server" Font-Size="Small" style="z-index: 1; left: 17px; top: 2px; " Text="Usuário"></asp:Label> <asp:Label ID="Label2" runat="server" style="z-index: 1; left: 17px; top: 53px; ; right: 193px;" Text="Senha"></asp:Label> </asp:Panel> </asp:Panel> <!--//---------------------------------------- conteudo aki <<<<<<<<<<<<<<<<<<<<<<<--> </ContentTemplate> </asp:UpdatePanel> </div> </fieldset> <!-- field set 2 ----------------------------------------> <fieldset> <legend>PageMethods</legend> <div> <asp:Label ID="lblDate2" runat="server"></asp:Label> <asp:Button ID="btnDate2" runat="server" Text="Get Date" OnClientClick="return btnDate2_Click()" /> </div> </fieldset> <!-- field set 2 ----------------------------------------> <!--background-color:#ffffff----> <asp:Panel ID="pnlProgress" runat="server" style="background-color:#ffffff;display:none;width:400px"> <div style="padding:8px"> <table border="0" cellpadding="2" cellspacing="0" style="width:100%"> <tbody> <tr> <td style="width:50%"></td> <td style="text-align:right"> <img alt="" src="indicator-big.gif" /> </td> <td style="text-align:left;white-space:nowrap"> <span style="font-size:larger">Carregando, aguarde ...</span> </td> <td style="width:50%"></td> </tr> </tbody> </table> </div> </asp:Panel> <cc1:modalpopupextender ID="mpeProgress" runat="server" TargetControlID="pnlProgress" PopupControlID="pnlProgress" BackgroundCssClass="modalBackground" DropShadow="true" /> <script type="text/javascript"> Sys.Net.WebRequestManager.add_invokingRequest(onInvoke); Sys.Net.WebRequestManager.add_completedRequest(onComplete); function onInvoke(sender, args) { $find('<%= mpeProgress.ClientID %>').show(); } function onComplete(sender, args) { $find('<%= mpeProgress.ClientID %>').hide(); } function btnDate2_Click() { PageMethods.GetDate( function (result) { var lbl = $get('<%= Label5.ClientID %>'); if (document.all) { lbl.innerText = result; } else { lbl.textContent = result; } } ); return false; } function pageUnload() { Sys.Net.WebRequestManager.remove_invokingRequest(onInvoke); Sys.Net.WebRequestManager.remove_completedRequest(onComplete); } </script> </body> </html> </asp:Content>
Obrigado
Respostas
-
Olá Tirson,
Confesso que nunca vi este erro, o máximo que posso fazer para te ajudar agora é indicar alguns links falando sobre este erro com possíveis soluções :(
http://forums.asp.net/t/1829978.aspx
http://www.codeproject.com/Questions/228016/if-typeof-Sys-equalsequalsequals-undefined-throw-n
http://ajaxcontroltoolkit.codeplex.com/workitem/26878
http://community.discountasp.net/threads/asp-net-ajax-client-side-framework-failed-to-load.7086/Vitor Mendes | http://www.vitormendes.com.br/
"Ajuda teu semelhante a levantar a sua carga, porém, não a carregá-la." (Pitágoras)
- Sugerido como Resposta Giovani Cr segunda-feira, 28 de outubro de 2013 16:40
- Marcado como Resposta Giovani Cr terça-feira, 29 de outubro de 2013 17:12
Todas as Respostas
-
-
Olá Tirson,
Confesso que nunca vi este erro, o máximo que posso fazer para te ajudar agora é indicar alguns links falando sobre este erro com possíveis soluções :(
http://forums.asp.net/t/1829978.aspx
http://www.codeproject.com/Questions/228016/if-typeof-Sys-equalsequalsequals-undefined-throw-n
http://ajaxcontroltoolkit.codeplex.com/workitem/26878
http://community.discountasp.net/threads/asp-net-ajax-client-side-framework-failed-to-load.7086/Vitor Mendes | http://www.vitormendes.com.br/
"Ajuda teu semelhante a levantar a sua carga, porém, não a carregá-la." (Pitágoras)
- Sugerido como Resposta Giovani Cr segunda-feira, 28 de outubro de 2013 16:40
- Marcado como Resposta Giovani Cr terça-feira, 29 de outubro de 2013 17:12