Error on ajax.asp.net - sys is undefined

Last post 04-30-2009 4:57 AM by Sandy1234. 80 replies.

Sort Posts:

  • Error on ajax.asp.net - sys is undefined

    12-18-2006, 5:03 AM
    Locked
    • Member
      20 point Member
    • dudedude
    • Member since 11-01-2006, 5:22 PM
    • Posts 6

    I'm not sure if the site has just been updated to the latest version of Ajax (RC1), but if I go to http://ajax.asp.net and clear my cache, reload the page, I get either:

     

    a page saying "Service Unavailable".

    or a series of javascript errors: "Line 142: 'Sys' is undefined", then "Line 588: 'Sys' is undefined'. Then the page loads, but it i is missing its styles and images and looks broken

    I am guessing this is a problem with thew neew build of Ajax, as it did not happen before

    This happens on other colleague's PCs as well.

    We are running IE6 SP2:

     Internet Explorer 6.0.2900.2180.xpsp_sp2_gdr.050301-1519

     

  • Re: Error on ajax.asp.net - sys is undefined

    12-20-2006, 1:57 AM
    Locked
    Try to install IE 7.0,FireFox or Opera to access http://ajax.asp.net website.I didn't run into any problems to access it.Maybe the website is updating sometimes when you want to access it and you will get some error message.
  • Re: Error on ajax.asp.net - sys is undefined (PLEASE HELP ME!)

    12-21-2006, 7:18 AM
    Locked
    • Member
      30 point Member
    • Rookie1
    • Member since 01-26-2005, 9:38 PM
    • Posts 9
    dudedude:

    I'm not sure if the site has just been updated to the latest version of Ajax (RC1), but if I go to http://ajax.asp.net and clear my cache, reload the page, I get either:

     

    a page saying "Service Unavailable".

    or a series of javascript errors: "Line 142: 'Sys' is undefined", then "Line 588: 'Sys' is undefined'. Then the page loads, but it i is missing its styles and images and looks broken

    I am guessing this is a problem with thew neew build of Ajax, as it did not happen before

    This happens on other colleague's PCs as well.

    We are running IE6 SP2:

     Internet Explorer 6.0.2900.2180.xpsp_sp2_gdr.050301-1519

     

    I'm having the same problem and i'm considering taking all ajax.net from my site. I can believe how buggy this is. On all windows XP it works OK, but on windows 2000 it doesnt always work (which is unacceptable). I have tried everything, AND I REALLY MEAN EVERYTHING (create ajax enabled sites, 0 byte axds, and so on) I'm now using RC1 and i also has that problem.

     It really sucks because i have created a whole application for my company and now i must remove all ajax components because of this bug an most of our windows 2000.

     

    The irony is that if you access the application from FF on windows 2000 it works perfectly. But if you use IExplorer you get Sys is undefined!

     

    I'm really disapointed on this framework.
     

  • Re: Error on ajax.asp.net - sys is undefined (PLEASE HELP ME!)

    12-21-2006, 12:10 PM
    Locked
    • Member
      26 point Member
    • hitandrun972
    • Member since 11-20-2006, 6:51 PM
    • Posts 7

    Did you find out a solution to this "Sys is undefined" error? Well, I continue seeing this error in my sample app since beta 1, 2 and now rc1 and still unable to resolve it.

    NOTE: It won't work once i published the code but worked in test environment.

     

     

     

     

     

  • Re: Error on ajax.asp.net - sys is undefined (PLEASE HELP ME!)

    12-21-2006, 12:17 PM
    Locked
    • Member
      7 point Member
    • herber
    • Member since 12-14-2006, 5:33 PM
    • Posts 6
    I deal with the same problem. 'Sys is undefined' is my nighmare since couple days now. Nothing ajaxed seems to work in my project. (but runs excelent on new ajax enabled site). Web.config the same, behavior different.. can't understand it.
  • Re: Error on ajax.asp.net - sys is undefined (PLEASE HELP ME!)

    12-21-2006, 9:12 PM
    Locked
    Hi All,
       Try to add the following configItems in web.config and check if it works(Ajax RC 1.0).
       <httpHandlers>
             <add verb="GET" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler" validate="false"/>
        </httpHandlers>

       <location path="ScriptResource.axd">
       <system.web>
           <authorization>
               <allow users="*"/>
           </authorization>
        </system.web>
        </location>
    If there is still the error message saying 'Sys is undefined', can you post a project with the issue or send it to my email:v-jicwan@microsoft.com? I'd like to test this and loop it to my team members.
  • Re: Error on ajax.asp.net - sys is undefined (PLEASE HELP ME!)

    12-22-2006, 9:45 AM
    Locked
    • Member
      26 point Member
    • hitandrun972
    • Member since 11-20-2006, 6:51 PM
    • Posts 7

    <%

    @ Page Language="VB" ValidateRequest="false" AutoEventWireup="true" CodeFile="Default.aspx.vb" Inherits="_Default" %>

    <!

    DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

    <

    html xmlns="http://www.w3.org/1999/xhtml">

    <

    head id="Head1" runat="server">

    <title>My Test Chat</title>

    </

    head>

    <

    body>

    <form id="form1" runat="server">

     

     

    <asp:Timer ID="Timer1" OnTick="Timer1_Tick" interval="1000" runat="server" />

    <asp:ScriptManager ID="ScriptManager1" runat="server">

    </asp:ScriptManager>

     

    <table width="800">

    <tbody>

    <tr>

    <td width="200"></td>

    <td>

     

    <asp:UpdatePanel ID="UpdatePanel1" UpdateMode="Conditional" runat="server">

    <Triggers>

    <asp:AsyncPostBackTrigger ControlID="Timer1" />

    </Triggers>

    <ContentTemplate>

     

    <asp:TextBox id="txtChatBox" runat="server" Readonly="true" width="550px" height="200px" textmode="multiline"></asp:TextBox>

    <br /><br />

    </contentTemplate>

    </asp:UpdatePanel> &nbsp;

     

    <table width="550">

    <tbody>

    <tr>

    <td width="150">

    <strong>Enter your name:</strong></td>

    <td><asp:TextBox id="txtName" runat="server"></asp:TextBox></td>

    </tr>

    <tr>

    <td width="150">

    <strong>Enter your message:</strong></td>

    <td><asp:TextBox id="txtMessage" runat="server" width="402px" MaxLength="100"></asp:TextBox></td>

    </tr>

    <tr>

    <td>&nbsp;</td>

    <td>

    <asp:Button id="btnPost" onclick="btnPost_Click" runat="server" text="Post Message" />

    <asp:Button id="btnClear" onclick="btnClear_Click" runat="server" text="Clear Log" />

    </td>

    </tr>

    </tbody>

    </table>

    </td>

    </tr>

     

    </tbody>

    </table>

     

     

    </form>

    </

    body>

    </

    html>

     <script runat="server">

    Sub

    Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)

    txtChatBox.Text = Application(

    "ChatLog")

    End Sub

    Protected Sub btnPost_Click(ByVal sender As Object, ByVal e As System.EventArgs)

    Dim NewMsg As String = Application("ChatLog") & vbCrLf & _

    TxtName.text &

    ":" & vbTab & txtMessage.text

    If NewMsg.Length > 500 Then

    NewMsg = NewMsg.Substring(0, 499)

    End If

    Application(

    "ChatLog") = NewMsg

    txtChatBox.Text = Application(

    "ChatLog")

    txtMessage.Text =

    ""

    End Sub

    Protected Sub btnClear_Click(ByVal sender As Object, ByVal e As System.EventArgs)

    Application(

    "ChatLog") = ""

    txtChatBox.Text = Application(

    "ChatLog")

    End Sub

    Public Sub Timer1_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles Timer1.Tick

    txtChatBox.Text = Application(

    "ChatLog")

    End Sub

    </script>

     

    that's the sample that I used. Test worked locally but not in the real world

  • Re: Error on ajax.asp.net - sys is undefined (PLEASE HELP ME!)

    12-24-2006, 11:08 PM
    Answer
    Locked
    I installed Visual Studio 2005 with Ajax RC 1.0 in my PC.My OS is Windows Server 2003 Enterprise. I tested your codes and access it from another PC through virtual directory in IIS. I found it worked fine.You should close firewall first,otherwise you can not remotely access it.Try to check the permissions in IIS.Right mouse click on the virtual directory and choose Properties,in the property panel,create application through clicking "Create" button and select "Scripts" or "Scripts and Executable" permission from the permission DropDownList.
    Wish this can help you.
  • Re: Error on ajax.asp.net - sys is undefined (PLEASE HELP ME!)

    12-30-2006, 1:33 PM
    Locked
    • Member
      168 point Member
    • dlaney
    • Member since 10-26-2006, 3:15 AM
    • Eau Claire, WI
    • Posts 52
    This worked for me.  Thanks Jasson.
  • Re: Error on ajax.asp.net - sys is undefined (PLEASE HELP ME!)

    01-03-2007, 12:02 PM
    Locked
    • Member
      84 point Member
    • tvdPatrick
    • Member since 07-06-2002, 9:57 AM
    • Posts 26

    Hi Jasson

    Still doesn't work for me. I'm working with AJAX RC 1.0 (latest bits) and my OS is VISTA (so IIS 7). It's a developer machine, so I'm working inside VS.NET 2005 SP1 and I use the internal WebServer from VS.

    I did all the configuration work you said, but no success. All samples return "sys is undefined..."

    Patrick S.
    http://sharpcuts.blogspot.com
  • Re: Error on ajax.asp.net - sys is undefined (PLEASE HELP ME!)

    01-03-2007, 7:52 PM
    Locked
    • Member
      168 point Member
    • dlaney
    • Member since 10-26-2006, 3:15 AM
    • Eau Claire, WI
    • Posts 52

    Does you web.config contain these entries:

     

    <

    location path="ScriptResource.axd">

    <

    system.web>

    <

    authorization>

    <

    allow users="*"/>

    </

    authorization>

    </

    system.web>

    </

    location>

     

    and

    <

    httpHandlers>

    <

    remove verb="*" path="*.asmx"/>

    <

    add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

    <

    add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>

    </

    httpHandlers>
  • Re: Error on ajax.asp.net - sys is undefined (PLEASE HELP ME!)

    01-03-2007, 8:32 PM
    Locked
    Hi Patrick,
    Try to check your web.config just as dlaney's solution in his post if it works.If you still have the same issue, try to send a simple ajax website with the exception message saying "'sys is undefined'" to my email:v-jicwan@microsoft.com? I'd like to test it and fix this issue in Vista with vs 2005 and ajax RC 1.0.

    <location path="ScriptResource.axd">
    <system.web>
    <authorization>
    <allow users="*"/>
    </authorization>
    </system.web>
    </location>

    <httpHandlers>
    <remove verb="*" path="*.asmx"/>
    <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
    <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
    </httpHandlers>
  • Re: Error on ajax.asp.net - sys is undefined (PLEASE HELP ME!) -> possible solution.

    01-03-2007, 11:56 PM
    Locked
    • Member
      8 point Member
    • Gobannos
    • Member since 01-04-2007, 4:40 AM
    • Pattaya, Thailand
    • Posts 4

    Hi Everyone

    Today, i was just running into the same problems as described above ('sys is undefined'). I've tried all the solutions mentioned here and on other Websites/Blogs, but nothing helped. Luckily, i figured out how to make my site working with the current AJAX framework. This is what i did (AJAX RC 1.0):

    1. I am NOT using the solutions mentioned here
    2. I am using the original Web.config delivered with the AJAX framework as a base Web.config
    3. I went to the Control Panel of my shared webhost (luckily there is one, ask your provider to follow these steps if you have no access to these functions on your host)
    4. I switched my application from ASP.NET 2.0 back to ASP.NET 1.1
    5. I switched my application from ASP.NET 1.1 back to ASP.NET 2.0
    6. I made a restart of my application on the webserver (IIS6, Srv 2003)

    'Wha...?! Look at this! It works...!'

    Just my two satangs, give it a try. Wish you all good luck finding a solution!

    Gobannos

  • Re: Error on ajax.asp.net - sys is undefined (PLEASE HELP ME!) -> possible solution.

    01-04-2007, 6:10 AM
    Locked
    • All-Star
      25,662 point All-Star
    • Luis Abreu
    • Member since 02-12-2005, 6:22 AM
    • Madeira [Portugal]
    • Posts 5,368
    • TrustedFriends-MVPs

    hello.

    question: have you tried restarting the web app after "ajaxing" it? 

    --
    Regards,
    Luis Abreu
    email: labreu_at_gmail.com
    EN blog:http://msmvps.com/blogs/luisabreu
  • Re: Error on ajax.asp.net - sys is undefined (PLEASE HELP ME!) -> possible solution.

    01-04-2007, 9:46 AM
    Locked
    • Member
      37 point Member
    • Bruce25
    • Member since 05-06-2006, 9:59 AM
    • Posts 9

    Hello, i had the same problem. (vista + IIS 7.0)

    If you create a new "ajax website"-template project in VS2005 you have at first to modify your web.config.

    You have to delete last section from the web.config   called <system.webServer> .

    After doing that the error disappears and it works for me.

    Hope that helps.

    Greets Bruce 




     

Page 1 of 6 (81 items) 1 2 3 4 5 Next > ... Last »