Page view counter

Error on ajax.asp.net - sys is undefined

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

Sort Posts:

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

    01-06-2007, 2:47 PM
    • Loading...
    • clicksoft
    • Joined on 10-12-2006, 10:42 PM
    • Posts 11
    • Points 7

    Any luck on this? I'm using Windows XP/IE 6. AJAX RC

    My web config has beev verified. During a POST operation I don't seem to get the error. Only on a refresh (GET) of the page. 

     

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

    01-18-2007, 9:24 PM
    • Loading...
    • sean717
    • Joined on 01-16-2007, 11:43 PM
    • Vancouver, BC
    • Posts 8
    • Points 3

    I was having the same problem. But now it worked!  after I tried Jasson's suggestion as quoted

    Here is a summary of what I did:

    - local environment: WindowXP/ASP.NET 2.0/ASP.NET AJAX RC1
    - remote environment: Server2003/IIS6/ASP.NET 2.0/ASP.NET AJAX RC1
    - all aspx pages work fine on local
    - copied all aspx pages to remote machine
    - copied the "web.config" from "C:\Program Files\Microsoft ASP.NET\ASP.NET 2.0 AJAX Extensions\v1.0.61025" to my virtual directory
    - access the aspx pages on remote machine but got "Sys is not defined" error

    then: 

    - deleted very last element <system.webServer>...</system.webServer> in "web.config" (not sure whether this is necessary, just saw a relate thread suggesting doing so)
    - and did what Jasson suggested
    - everything works fine so far

     Thanks
     

    Jasson_King:
    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.


     

    阴晴圆缺在窗外,心中一片艳阳天
    Filed under:
  • Re: Error on ajax.asp.net - sys is undefined (PLEASE HELP ME!) -> possible solution.

    01-21-2007, 3:16 AM
    • Loading...
    • SuperGhost
    • Joined on 12-29-2005, 4:58 PM
    • Palmdale CA, USA
    • Posts 408
    • Points 1,738

    Anyone had any better luck? I've tried (D.) All of the above - but no luck thus far. However something funny that I noticed...

    I kicked up the Script Explorer and noticed that ScriptResource.axd is showing up, however the contents of the file are strange and also WebResource.axd is blank. Below is a snippet of the ScriptResource.axd contents (very small snippet):

    ���`I�%&/m�{J�J��t��`$ؐ@������� iG#)�*��eVe]f@�흼��{����{����;�N'���?\fdl��J�ɞ!���?~|?"�ǿ��{w��y~������Z]��żM�N��_Ӻj���>�WU��E���e�r�&��&�/��o����-F�v}��ٻ�O7����w���Y�-���~K���g���1����z���o��ҏ����u���IV��l����7�i���M�y;�f�tZ-��]{'�ſq��s�P{���tI}~��4�(�}d�}t��.�:xM�~�.��'��uY~�Q[����uޮ�e�C��ƗY���8�YY�h\/������"_��(������G�ʈ�yd���Q��A����_"m��P~)�ӭ�N����*�þ�Ä�M�`�d�����!Y��e��h�

    �tQ�G�N�b� ���}�{�yU�[hPз;���qZҏO>��������?;0��;%�Q�u�+d

    ��jU^o���&

    o*5��×�Ļ���Z��^�%yx����� ��V�l�l9�G�۰@���c��)J?$��c��yD(����������|�j��_>m��/l�%�� FMW8����� �2�Ӻ��1Oa���I�^�[�.D�33Q���@i��w�|��3�x�-�a>--�I����:�

    �d>^U��-.��[��Pv� ;�/N�}�*Oz5

    vP�u-�?�pB��E��Njb�Ut��p�v�{���H,c��=xo��؀������ή7����g�G��(�$�*�8�����G�����R�

    S��K&�C���ğ��ts'�Og���"�%N�h�%������-��F>6c�/�wV���p�bi����}6�C��s�e0#7������b���/����'��uڧ4��lr��w�wV�@���wc��'>Ԏj �4xG����P��C���\,�젞�C�Z��8���%�� =>�9��+�7d�{Jv�c7��9S���N⸐o"�<��e�ymf����8��wv,7��K%|���A�ƞ�QIߌ���K��NK���)-�~��l�&�>

    ** Hope this helps!

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

    01-21-2007, 8:18 AM
    • Loading...
    • Luis Abreu
    • Joined on 02-12-2005, 1:22 AM
    • Madeira [Portugal]
    • Posts 5,368
    • Points 25,660
    • TrustedFriends-MVPs
    hello.

    well, scriptresource.axd is handler that server embedded content. the contents may look weird, but i think that's because they're compressed before being sent to the client.

    what does fiddler show you?

    can you build a small demo page that reproduces the problem and put it here?
    --
    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-21-2007, 10:17 PM
    • Loading...
    • SuperGhost
    • Joined on 12-29-2005, 4:58 PM
    • Palmdale CA, USA
    • Posts 408
    • Points 1,738

    Well now I can view the contents of my WebResource.axd, before I couldn't and it shows up as normal javascript. However my ScriptResource.axd still shows up encoded. I'm pretty sure that I used to be able to view the javascript in ScriptResource.axd.

    I can't get fiddler to capture my localhost automatically, not sure why, everything looks correct. However when I build the request in Fiddler, ScriptResource.axd comes GZIP encoded and WebResource.axd does not. If I remove encoding then the javascript is displayed in plain text (in Fiddler).

    I am using the blowery.web http compression module in my app but thinking that could be the problem I completely removed it, rebuilt the app and still no luck. Even with the compression module on I had application/x-javascript excluded.

    Also another thing... I deployed the project to my IIS web server and when it runs I get the following, which I am not sure if it's related:

    [NullReferenceException: Object reference not set to an instance of an object.]
       System.Web.Script.Services.WebServiceData.GetWebServiceData(HttpContext context, String virtualPath, Boolean failIfNoData, Boolean pageMethods) +378
       System.Web.Script.Services.PageClientProxyGenerator.GetClientProxyScript(HttpContext context, IPage page, Boolean debug) +45
       System.Web.UI.ScriptManager.RegisterServices() +728
       System.Web.UI.ScriptManager.OnPagePreRenderComplete(Object sender, EventArgs e) +244
       System.Web.UI.Page.OnPreRenderComplete(EventArgs e) +2012724
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1566

    And when debugging on my local dev the project runs but I get a javascript error:

    Line: 1
    Error: Invalid character.

    I'm assuming it's talking about the ScriptResource.axd file because it's still encoded. When I hit debug on the JS error it takes me to my jsdebug file (I have debugging ON in my script files) and the error is: Microsoft JScript runtime error: 'Type' is undefined on this line:

    Type.registerNamespace('Notes');

    I'm assuming that is because the ScriptResource.axd is encoded and cannot be translated into a valid JavaScript file.

    I'll try to duplicate this in a smaller, new project

    ** Hope this helps!

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

    01-22-2007, 2:42 AM
    • Loading...
    • SuperGhost
    • Joined on 12-29-2005, 4:58 PM
    • Palmdale CA, USA
    • Posts 408
    • Points 1,738

    I found my problem! In my web.config a few days ago I uncommented out this line then later commented it out:

    <!--
    <scriptResourceHandler enableCompression="true" enableCaching="true" />
    -->
    So assuming from all the junk before that it was a compression issue I uncommented the line again and set enableCompression to false. It worked! 
     
    <scriptResourceHandler enableCompression="false" enableCaching="true" /> 
    ** Hope this helps!

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

    01-23-2007, 1:06 PM
    • Loading...
    • PDOC
    • Joined on 09-02-2004, 5:37 PM
    • Posts 39
    • Points 149

    What a joke.

     

    Thanks again to whoever created this time wasting crap. 

    Is there a fix on its way for this or are people gonna have to continue to bandaid this ?

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

    01-23-2007, 1:21 PM
    • Loading...
    • PDOC
    • Joined on 09-02-2004, 5:37 PM
    • Posts 39
    • Points 149

    Need edit button.

    Disregard previuos as I was stupid.

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

    01-31-2007, 4:18 PM
    • Loading...
    • wsyeager
    • Joined on 06-26-2002, 7:42 PM
    • Weston, Florida, USA
    • Posts 456
    • Points 1,733

    Well, I am getting the same error and cannot get this to work....

    I'm using WindowsXP SP2, with IIS6, IE7 and the production release of Atlas (v1.0). I'm also using VS2005 with the 2.0 framework.I tried all the steps above and am still getting the "

    'Sys' is undefined" error.

    Can someone please inform me how I can get this to work?

    Thanks,

    Bill Yeager MCP.Net, BCIP
  • Re: Error on ajax.asp.net - sys is undefined (PLEASE HELP ME!) -> possible solution.

    01-31-2007, 4:22 PM
    • Loading...
    • Luis Abreu
    • Joined on 02-12-2005, 1:22 AM
    • Madeira [Portugal]
    • Posts 5,368
    • Points 25,660
    • TrustedFriends-MVPs
    hello.

    sys undefined is normally caused by not gettig the client files on the client. normally, this means the the scriptresource handle isn't well configured (as one of the previous posts shows). you can use fiddler to see what's going on and check that the server is returning the client file.
    --
    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-31-2007, 4:43 PM
    • Loading...
    • PDOC
    • Joined on 09-02-2004, 5:37 PM
    • Posts 39
    • Points 149

    And don't forget something easy like starting your project as an ASP.Net project instead of starting it as an AJAX Enabled ASP.Net Project. 

     Also for anyone else reading this, it is my understanding Godaddy is not supporting AJAX at this time...

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

    02-01-2007, 9:32 AM
    • Loading...
    • davidanderson
    • Joined on 08-29-2006, 8:59 PM
    • Nashville TN
    • Posts 91
    • Points 94

    I just spend about 4 hours on this issue. Here's what I learned:

    1. Make sure your web.config conforms to that of an AJAX project.

    2. Make sure you uninstall the old AJAX before installing the new one. This can become very confusing since they are versioned the same. I accidentally installed the old version after uninstalling the old version.

    3. If using the control toolkit, be sure to remove the old one from your bin folder and put the new one in.

    4. After doing all that, restart iiS. This is important.

    5. After doing all that, it still may be necessary to clean out your local cache using the suggestions above.

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

    02-01-2007, 1:24 PM
    • Loading...
    • wsyeager
    • Joined on 06-26-2002, 7:42 PM
    • Weston, Florida, USA
    • Posts 456
    • Points 1,733

    If I am using the asp.net development serever (file based access) instead of IIS, is AJAX still supposed to work?

    I would need a sample of exactly what nodes I need in the web.config file specific to ATLAS/AJAX.

    This is the only version of Atlas I have installed (v1.0). No other previous versions existed.

    How do I clean out the local cache?

    Thanks,

    Bill Yeager MCP.Net, BCIP
  • Re: Error on ajax.asp.net - sys is undefined (PLEASE HELP ME!) -> possible solution.

    02-02-2007, 10:09 AM
    • Loading...
    • SuperGhost
    • Joined on 12-29-2005, 4:58 PM
    • Palmdale CA, USA
    • Posts 408
    • Points 1,738

    Cache:

    C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files

    or

    C:\WINDOWS\Microsoft.NET\Framework\<Framework Version Number>\Temporary ASP.NET Files

    ** Hope this helps!

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

    02-02-2007, 10:23 AM
    • Loading...
    • wsyeager
    • Joined on 06-26-2002, 7:42 PM
    • Weston, Florida, USA
    • Posts 456
    • Points 1,733
    I did not create the website with the asp.net ajax template. I just created it with a regular .net website. This is most likely the problem...
    Thanks,

    Bill Yeager MCP.Net, BCIP
Page 2 of 6 (81 items) < Previous 1 2 3 4 5 Next > ... Last »