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

    02-07-2007, 3:59 PM
    Locked
    • Member
      2 point Member
    • jplank
    • Member since 02-07-2007, 8:52 PM
    • Posts 1

    I just spent the day figuring out why my ScriptResources.axd file wasn't being rendered and thus causing the "Sys is undefined" message in IE.  My problem had to do with inheriting from a custom base class (which in turn inherited from System.Web.UI.Page).  The "OnPreRenderComplete" event was being overridden but it wasn't making a call to "base.OnPreRenderComplete(e)."  Once I put the call to the base event on "Page", the ScriptResources.axd file was being output correctly.

    This was tricky, we're using a master page with the content pages using lots of custom user controls.  The user controls contain the Ajax enabled components.

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

    02-08-2007, 10:35 PM
    Locked
    • Contributor
      5,421 point Contributor
    • xpdit
    • Member since 08-25-2002, 5:20 PM
    • Victoria, BC, CANADA
    • Posts 1,086

    I am having this same "sys is not defined" problem implementing into DotNetNuke 4.4.0  ... It works fine locally running windows 2003, but is giving me the page error when used on the windows 2003 production server.  The only difference i can see is that VS.NET is not installed on the production server.

     

    Update:  I just checked and it appears that in DotNetNuke, although the base system.web.ui.page class is inherited into DotNetNuke.Framework.PageBase, we do not override the base OnPreRenderComplete function, so i do not think that is the problem.  I can see in view source that there is script trying to access the Sys namespace, but I am not sure what to be looking for to affirm that the asp.net ajax is loading, other than the error is still there.  I have added the web.config changes as mentioned, and it works without error locally...

     

    hmm

    Intuition without concept is blind; Concept without intuition is empty -- I. Kant : Critique of Pure Reason

    In the olden days, books were burned. Now the website is shut down.

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

    02-09-2007, 12:17 AM
    Locked
    • Member
      82 point Member
    • PVAUS
    • Member since 04-22-2005, 3:55 AM
    • Posts 15

    For all 'sys is undefined' error people, (who have gone to RC1 from beta) Simply change 

    THIS:

    <

    add verb="GET" path="ScriptResource.axd" type="Microsoft.Web.Handlers.ScriptResourceHandler" validate="false"/>

    TO THIS: 

    <

    add verb="GET" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler" validate="false"/>

    Cheers

    Let there be unrest first...
  • Re: Error on ajax.asp.net - sys is undefined

    02-09-2007, 1:57 PM
    Locked
    • Contributor
      5,421 point Contributor
    • xpdit
    • Member since 08-25-2002, 5:20 PM
    • Victoria, BC, CANADA
    • Posts 1,086

    I am still having this problem on server 2003 / .net /w ajax 1.  the files are in the gac, the web.config is correct.  works fine on my local box, but not production.  only difference is that prod does not have vs.net installed.  can anyone else help PLEASE? this is really frustrating!

    What else is required to implement this.... Bueller??

     

    You can see it at www.tagplace.net and view source....

    Intuition without concept is blind; Concept without intuition is empty -- I. Kant : Critique of Pure Reason

    In the olden days, books were burned. Now the website is shut down.

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

    02-09-2007, 11:32 PM
    Locked
    • Member
      298 point Member
    • Marchu
    • Member since 05-30-2006, 7:19 PM
    • Netherlands
    • Posts 68

    Hello,

    And if you turn off ViewState?

    Second,

    I had this strange thing suddenly..
    http://forums.asp.net/thread/1566064.aspx

    Maybe your time setting of your server?

    Both a shot in the dark, because sys is undefined can have lots (and lots) of causes.
    Most of them are allready mentioned here and on the forum, but you never know..

    Marchu

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

    02-13-2007, 8:26 PM
    Locked
    • Member
      25 point Member
    • errrick
    • Member since 09-01-2006, 4:42 PM
    • Posts 14

    This is my experience with this issue:

    When browser requested ScriptResource.axd it was returning a 404 not found error and it was being caused by a bad configuration on my web application with isapi mappings. The site where I found the solution explained it as follows:

     ------------------------------------------------------------------------------------------------------------

    4. ScriptResource.axd requests return 404

    This usually points to a mis-configuration of ASP.NET as a whole. On a default installation of ASP.NET, any web request to a resource ending in .axd is passed from IIS to ASP.NET via an isapi mapping. Additionally the mapping is configured to not check if the file exists. If that mapping does not exist, or the check if file exists isn't disabled, then IIS will attempt to find the physical file ScriptResource.axd, won't find it, and return 404.

    You can check to see if this is the problem by coipy/pasting the full url to ScriptResource.axd from here, and seeing what it returns

    <script src="http://forums.asp.net/MyWebApp/ScriptResource.axd?[snip - long query string]" type="text/javascript"></script>

    How do you fix this? If ASP.NET isn't properly installed at all, you can run the "aspnet_regiis.exe" command line tool to fix it up. It's located in C:\WINDOWS\Microsoft.Net\Framework\v2.0.50727. You can run "aspnet_regiis -i -enable", which does the full registration of ASP.NET with IIS and makes sure the ISAPI is enabled in IIS6. You can also run "aspnet_regiis -s w3svc/1/root/MyWebApp" to only fix up the registration for your web application.

     ------------------------------------------------------------------------------------------------------------

     

    I had a wildcard mapping that with the "Verify is file exists" activated and that was the problem. I deactivated it and finnally I stopped getting the 'Sys' is undefined error (and other similar JS errors such as 'AjaxControlToolkit' is undefined, etc)

    If this still didn't solve the problem, check this site out which had other very helpful tips:

    http://weblogs.asp.net/chrisri/archive/2007/02/02/demystifying-sys-is-undefined.aspx
     

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

    02-13-2007, 10:32 PM
    Locked
    • Star
      12,167 point Star
    • thecrispy1
    • Member since 06-24-2002, 1:06 PM
    • USA
    • Posts 2,434
    • TrustedFriends-MVPs

    If you try what is outlined in the obnoxiously yellow post (nothing personal errick) and you are getting a blank page, I highly recommend doing the uncomment in the web.config someone mentioned earlier in this thread. It was something like:

    <system.web.extensions>

    <scripting>

    <scriptResourceHandler enableCompression="false" enableCaching="true" />

    </scripting>

    </system.web.extensions>

    Chris Paterra


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

    02-13-2007, 10:47 PM
    Locked
    • Contributor
      5,421 point Contributor
    • xpdit
    • Member since 08-25-2002, 5:20 PM
    • Victoria, BC, CANADA
    • Posts 1,086

    this is now FIXED by uncommenting and turning off compression in the web.config setting:

     

    <

    system.web.extensions>

    <

    scripting>

    <

    webServices>

    <!--

    Uncomment this line to customize maxJsonLength and add a custom converter -->

    <!--

    <jsonSerialization maxJsonLength="500">

    <converters>

    <add name="ConvertMe" type="Acme.SubAcme.ConvertMeTypeConverter"/>

    </converters>

    </jsonSerialization>

    -->

    <!--

    Uncomment this line to enable the authentication service. Include requireSSL="true" if appropriate. -->

    <!--

    <authenticationService enabled="true" requireSSL = "true|false"/>

    -->

    <!--

    Uncomment these lines to enable the profile service. To allow profile properties to be retrieved

    and modified in ASP.NET AJAX applications, you need to add each property name to the readAccessProperties and

    writeAccessProperties attributes.

    -->

    <!--

    <profileService enabled="true"

    readAccessProperties="propertyname1,propertyname2"

    writeAccessProperties="propertyname1,propertyname2" />

    -->

    </

    webServices>

     

    <scriptResourceHandler enableCompression="false" enableCaching="true" />

     

    </

    scripting>

    </

    system.web.extensions>
    Intuition without concept is blind; Concept without intuition is empty -- I. Kant : Critique of Pure Reason

    In the olden days, books were burned. Now the website is shut down.

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

    02-14-2007, 9:48 AM
    Locked
    • Member
      25 point Member
    • errrick
    • Member since 09-01-2006, 4:42 PM
    • Posts 14
    thecrispy1:

    If you try what is outlined in the obnoxiously yellow post (nothing personal errick) and you are getting a blank page, I highly recommend doing the uncomment in the web.config someone mentioned earlier in this thread. It was something like:

    <system.web.extensions>

    <scripting>

    <scriptResourceHandler enableCompression="false" enableCaching="true" />

    </scripting>

    </system.web.extensions>

    That wasn't my problem since I had that uncommented from the beggining. My problem was that browser requested ScriptResource.axd and it always returned a 404 Error due to the "Verify that file exists" option being enabled in my ISAPI wildcard mapping

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

    02-18-2007, 11:51 AM
    Locked
    • Member
      405 point Member
    • Recon_609
    • Member since 03-05-2005, 11:48 PM
    • Posts 89

    None of this is working for me, I have a host.

     Everything was great until you guys decided to put it in the GAC

     How about making that optional.  I love it when MS decides how I should run my code.

     

    ScottG said this was done for 'windows update' reasons   - well, that is another mess of crap.  Perhaps I don't want Windows Update clobbering my code as well.

     

    So... I still get this error and I have no fix for it - I had a great site running, now it's hosed.

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

    02-18-2007, 11:52 AM
    Locked
    • Member
      405 point Member
    • Recon_609
    • Member since 03-05-2005, 11:48 PM
    • Posts 89
    Locally it runs fine and the host says they have it installed on the server.  But still getting 'sys is undefined' on my productions site...
  • Re: Error on ajax.asp.net - sys is undefined

    02-19-2007, 8:54 PM
    Locked
    • Member
      6 point Member
    • surdev
    • Member since 02-20-2007, 1:31 AM
    • Posts 3

    hello,

    I have this 'Sys Undefined' error when i access the website after deploying in our test Server (Windows 2003 Server running IIS6). I have done all the changes mentioned in this thread plus some of the suggesstion metioned in the google search. Problem still exists.

    1. No problem in the VS2005 dev enviroment. AJAX extended control works fine. 

    2. But got problem after deploying the web app in the test server with windows 2003 server with IIS6. AJAX extender control is not working now and i get the 'Sys' undefined error message. The browser i use to access the web app is IE6-sp1.

    Any help would be appreciated.

    Thanks. 

     

     

     

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

    02-20-2007, 10:23 AM
    Locked
    • Member
      6 point Member
    • surdev
    • Member since 02-20-2007, 1:31 AM
    • Posts 3

    Whooooooooooooo......

    Got my above problem resolved!!!!!!

    The problem is in configuring IIS6 for your web site.

    In the application configuration for your website, make sure the "Verify file exist" oiption is disabled for .axd. Just made this only change and boom got my AJAX control working like a charm...

    Now iam a happy camper.!!!!!!!!!!!!!

    -Suresh.

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

    02-25-2007, 8:50 PM
    Locked
    • Member
      242 point Member
    • dtaylo75
    • Member since 04-02-2006, 3:35 PM
    • Posts 66

    It seems that the "Sys not found" problem seems to be caused generically by IIIS being unable to load the AXD file.

     I have just upgraded to IIS7/Vista, and an existing website under my old OS (XP) will not run any AJAX app due to the "Sys not found".

    Initially it wouldn't run any ASP.Net 2.0 app, until I discovered that the applicationHost.config file was missing entries for some ASP.Net 2.0 mappings for ASPX files.  I wonder if it's also missing entries for AXD files.

     I tried copying an entry for the 1.1 AXD mapping and adjusting it to point to 2.0 framework, but that didn't change anything.

    <add name="ASPNET-ISAPI-2.0-AXD" path="*.axd" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="C:\Windows\Microsoft.Net\Framework\v2.0.50727\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv1.1,bitness32" responseBufferLimit="0" />

     I also notice that if I look at the browser source for an AJAX website that works (any public ajax website) and you copy the relative URL for the any included AXD file and paste it into the browser, it loads that AXD file.  But on my dev server, if I do the same, I get a 404 error.

    Some configuration setting is missing to support loading these AXD files into the browser.

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

    03-11-2007, 6:52 AM
    Locked
    • Member
      2 point Member
    • davidhagg
    • Member since 03-11-2007, 10:46 AM
    • Posts 3

     Hi,
    I was having this issue on Windows Vista + IIS7 and AJAX 1.0.
    In web.config under system.webServer/handlers I had te following entry:

    <

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

    but then I changed it and added preCondition="integratedMode" like so:

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

    And it works!

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