<p>Can anyone recommend an efficient method to execute XSLT transforms of XML data within a Ruby application? The XSL gem (REXSL) is not available yet, and while I have seen a project or two that implement it, I'm wary of using them so early on. A friend had recommended a shell out call to Perl, but I'm worried about resources. </p>

<p>This is for a linux environment.</p>

[{'answer_id': 75460, 'author': 'Compulsion', 'author_id': 3675, 'author_profile': 'https://Stackoverflow.com/users/3675', 'pm_score': 3, 'selected': False, 'text': '<p>Try setting your ScriptManager to this.</p>\n\n<pre><code>&lt;asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true" /&gt; \n</code></pre>\n'}, {'answer_id': 97842, 'author': 'Aaron Powell', 'author_id': 11388, 'author_profile': 'https://Stackoverflow.com/users/11388', 'pm_score': 2, 'selected': False, 'text': '<p>In addition to ensuring you have the ScriptManager on your page you need to ensure that your web.config is appropriately configured.</p>\n\n<p>When ASP.NET AJAX 1.0 was released (for .NET 2.0) there was a lot of custom web.config settings which added handlers, controls, etc.</p>\n\n<p>You\'ll find the config info here: <a href="http://www.asp.net/AJAX/documentation/live/ConfiguringASPNETAJAX.aspx" rel="nofollow noreferrer">http://www.asp.net/AJAX/documentation/live/ConfiguringASPNETAJAX.aspx</a></p>\n'}, {'answer_id': 200316, 'author': 'Tom Carter', 'author_id': 2839, 'author_profile': 'https://Stackoverflow.com/users/2839', 'pm_score': 2, 'selected': False, 'text': "<p>Make sure that any client scripts you have that interact with .NET AJAX have the following line at the end:</p>\n\n<pre><code>if (typeof(Sys) !== 'undefined')  Sys.Application.notifyScriptLoaded();\n</code></pre>\n\n<p>This tells the script manager that the whole script file has loaded and that it can begin to call client methods</p>\n"}, {'answer_id': 538200, 'author': 'MadMax1138', 'author_id': 65187, 'author_profile': 'https://Stackoverflow.com/users/65187', 'pm_score': 2, 'selected': False, 'text': '<p>I was having this same issue and after much wrangling I decided to try and isolate the problem and simply load the script manager in an empty page which still resulted in this same error.  Having isolated the problem I discovered through a comparison of my site\'s web.config with a brand new (working) test site that changing <code>&lt;compilation debug="true"&gt;</code> to <code>&lt;compilation debug="false"&gt;</code> in the system.web section of my web.config fixes the problem.  </p>\n\n<p>I also had to remove the <code>&lt;xhtmlConformance mode="Legacy"/&gt;</code> entry from system.web to make the update panel work properly.  <a href="http://weblogs.asp.net/scottgu/archive/2006/12/10/gotcha-don-t-use-xhtmlconformance-mode-legacy-with-asp-net-ajax.aspx" rel="nofollow noreferrer">Click here</a> for a description of this issue.</p>\n'}, {'answer_id': 678245, 'author': 'TygerKrash', 'author_id': 7652, 'author_profile': 'https://Stackoverflow.com/users/7652', 'pm_score': 0, 'selected': False, 'text': '<p>Was having a similar issue,  except that my page was consistently generating the Sys is undefined error. </p>\n\n<p>For me the problem stems from the fact that I\'ve just installed the AJAX 1.0 extension for .NET 2.0 but had already created my web project  in Visual Studio.</p>\n\n<p>When tried to create AJAX controls I kept encountering this error, I spotted Slace\'s and MadMax1138s posts here.  And figured it was my web.config, I created a new project using the new "AJAX enabled web site" project type,  and sure enough the web.config has a large number of customizations necessary to use the AJAX controls.   </p>\n\n<p>I just updated that web.config with the web.config updates I had already made myself and dropped it into my existing project and everything worked fine.</p>\n'}, {'answer_id': 1718513, 'author': 'Dean L', 'author_id': 127887, 'author_profile': 'https://Stackoverflow.com/users/127887', 'pm_score': 6, 'selected': False, 'text': '<p>I fixed my problem by moving the <code>&lt;script type="text/javascript"&gt;&lt;/script&gt;</code> block containing the Sys.* calls lower down (to the last item before the close of the body\'s <code>&lt;asp:Content/&gt;</code> section) in the HTML on the page. I originally had my the script block in the HEAD <code>&lt;asp:Content/&gt;</code> section of my page. I was working inside a page that had a MasterPageFile. Hope this helps someone out.</p>\n'}, {'answer_id': 2563888, 'author': 'Ray', 'author_id': 4872, 'author_profile': 'https://Stackoverflow.com/users/4872', 'pm_score': 4, 'selected': False, 'text': '<p>When I experienced the errors </p>\n\n<ul>\n<li>Sys is undefined</li>\n<li>ASP.NET Ajax client-side framework failed to load</li>\n</ul>\n\n<p>in IE when using ASP.NET Ajax controls in .NET 2.0, I needed to add the following to the web.config file within the <code>&lt;system.web&gt;</code> tags:</p>\n\n<pre><code>&lt;httpHandlers&gt;\n  &lt;remove verb="*" path="*.asmx"/&gt;\n  &lt;add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/&gt;\n  &lt;add verb="GET" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler" validate="false"/&gt;\n&lt;/httpHandlers&gt;\n</code></pre>\n'}, {'answer_id': 2789879, 'author': 'Arsalan', 'author_id': 335611, 'author_profile': 'https://Stackoverflow.com/users/335611', 'pm_score': -1, 'selected': False, 'text': "<p>Please please please do check that the Server has the correct time and date set...</p>\n\n<p>After about wasting 6 hours, i read it somewhere...</p>\n\n<p>The date and time for the server must be updated to work correctly...</p>\n\n<p>otherwise you will get 'Sys' is undefined error.</p>\n"}, {'answer_id': 2856354, 'author': 'kaash', 'author_id': 343901, 'author_profile': 'https://Stackoverflow.com/users/343901', 'pm_score': -1, 'selected': False, 'text': '<p>Just create blank .axd files in your solutions root foder problem will be resolved. (2 file: scriptresouce.asx, webresource.asxd)</p>\n'}, {'answer_id': 3511184, 'author': 'g9ncom', 'author_id': 341062, 'author_profile': 'https://Stackoverflow.com/users/341062', 'pm_score': 0, 'selected': False, 'text': '<p>I have been seeing the exact same error today, but it was not a config or direct JavaScript issue.</p>\n\n<p>An external .net project had been updated but the changes not picked up properly in the compilation of the web site. My presumption is that ASP.NET ajax was not able to construct the client representations of the .NET objects properly and so was failing to load correctly.</p>\n\n<p>To resolve, I rebuilt the external project(s), and rebuilt my solution that was experiencing issues. The problem went away. </p>\n'}, {'answer_id': 3757770, 'author': 'Anish', 'author_id': 453539, 'author_profile': 'https://Stackoverflow.com/users/453539', 'pm_score': -1, 'selected': False, 'text': '<p>Hi thanx a lot it solved my issue ,</p>\n\n<p>By default vs 2008 will add </p>\n\n<pre><code> &lt;!--&lt;add verb="*" path="*.asmx" validate="false" type="Microsoft.Web.Script.Services.ScriptHandlerFactory, Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /&gt;\n      &lt;add verb="GET" path="ScriptResource.axd" type="Microsoft.Web.Handlers.ScriptResourceHandler" validate="false" /&gt;--&gt;\n</code></pre>\n\n<p>Need to correct Default config(Above) to below code\n<strong>FIX</strong></p>\n\n<pre><code> &lt;add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/&gt;\n  &lt;add verb="GET" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler" validate="false"/&gt;\n</code></pre>\n'}, {'answer_id': 4260550, 'author': 'Alcides Martínez', 'author_id': 518003, 'author_profile': 'https://Stackoverflow.com/users/518003', 'pm_score': 3, 'selected': False, 'text': '<p>You must add these lines in the web.config</p>\n\n<p>\n    \n      \n        \n        \n          \n          \n          \n        \n      \n    \n  </p>\n\n<pre><code>&lt;httpHandlers&gt;\n  &lt;remove verb="*" path="*.asmx"/&gt;\n  &lt;add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/&gt;\n  &lt;add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/&gt;\n  &lt;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"/&gt;\n&lt;/httpHandlers&gt;\n&lt;httpModules&gt;\n  &lt;add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/&gt;\n&lt;/httpModules&gt;\n&lt;/system.web&gt;\n</code></pre>\n\n<p>\n    \n      \n      \n    \n  \n  \n    \n    \n      \n    \n    \n      \n      \n      \n      \n    \n  </p>\n\n<p>Hope this helps.</p>\n'}, {'answer_id': 6020313, 'author': 'JonK', 'author_id': 755955, 'author_profile': 'https://Stackoverflow.com/users/755955', 'pm_score': 0, 'selected': False, 'text': '<p>I found the error when using a combination of the Ajax Control Toolkit ToolkitScriptManager and URL Write 2.0.</p>\n\n<p>In my <code>&lt;rewrite&gt; &lt;outboundRules&gt;</code> I had a precondition:</p>\n\n<pre><code>&lt;preConditions&gt;\n    &lt;preCondition name="IsHTML"&gt;\n        &lt;add input="{RESPONSE_CONTENT_TYPE}" pattern="^text/html"/&gt;\n    &lt;/preCondition&gt;\n&lt;/preConditions&gt;\n</code></pre>\n\n<p>But apparently some of my outbound rules weren\'t set to use the precondition. </p>\n\n<p>Once I had that preCondition set on all my outbound rules:</p>\n\n<pre><code>&lt;rule preCondition="IsHTML" name="MyOutboundRule"&gt;\n</code></pre>\n\n<p>No more problem.  </p>\n'}, {'answer_id': 6291807, 'author': 'Zara_me', 'author_id': 121336, 'author_profile': 'https://Stackoverflow.com/users/121336', 'pm_score': 1, 'selected': False, 'text': '<p>I solved this problem by creating separate asp.net ajax solution and copy and paste all ajax configuration from web.config to working project.</p>\n\n<p>here are  the must configuration you should set in web.config</p>\n\n<pre><code>    &lt;configuration&gt;\n&lt;configSections&gt;\n    &lt;sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"&gt;\n        &lt;sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"&gt;\n            &lt;section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/&gt;\n&lt;/sectionGroup&gt;\n\n    &lt;/sectionGroup&gt;\n&lt;/configSections&gt;\n</code></pre>\n\n<p></p>\n\n<pre><code>        &lt;assemblies&gt;\n\n            &lt;add assembly="System.Web.Extensions,     Version=1.0.61025.0,       Culture=neutral, PublicKeyToken=31bf3856ad364e35"/&gt;\n\n        &lt;/assemblies&gt;\n           &lt;/compilation&gt;\n        &lt;httpHandlers&gt;\n        &lt;remove verb="*" path="*.asmx"/&gt;\n        &lt;add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/&gt;\n        &lt;add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/&gt;\n        &lt;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"/&gt;\n    &lt;/httpHandlers&gt;\n    &lt;httpModules&gt;\n        &lt;add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/&gt;\n    &lt;/httpModules&gt;\n&lt;/system.web&gt;\n    &lt;system.webServer&gt;\n    &lt;validation validateIntegratedModeConfiguration="false"/&gt;\n    &lt;modules&gt;\n        &lt;add name="ScriptModule" preCondition="integratedMode" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/&gt;\n    &lt;/modules&gt;\n    &lt;handlers&gt;\n        &lt;remove name="WebServiceHandlerFactory-Integrated"/&gt;\n        &lt;add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/&gt;\n        &lt;add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/&gt;\n        &lt;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"/&gt;\n    &lt;/handlers&gt;\n&lt;/system.webServer&gt;\n</code></pre>\n'}, {'answer_id': 6870078, 'author': 'Max', 'author_id': 260093, 'author_profile': 'https://Stackoverflow.com/users/260093', 'pm_score': 0, 'selected': False, 'text': '<p>Make sure you don\'t have any Rewrite rules that change your url.</p>\n\n<p>In my case the application thought it was only level deeper then the url reached.</p>\n\n<p>Example: <a href="http://mysite.com/app/page.aspx" rel="nofollow">http://mysite.com/app/page.aspx</a> was the real url.\nBut i cut off /app/ this worked fine for ASP.net and WCF, but clearly not for Ajax.</p>\n'}, {'answer_id': 9350258, 'author': 'Zviadi', 'author_id': 299203, 'author_profile': 'https://Stackoverflow.com/users/299203', 'pm_score': 3, 'selected': False, 'text': '<p>I was using telerik and had exactly same problem.</p>\n\n<p>adding this to web.config resolved my issue :)</p>\n\n<pre><code>&lt;location path="Telerik.Web.UI.WebResource.axd"&gt;   \n   &lt;system.web&gt;  \n     &lt;authorization&gt;  \n       &lt;allow users="*"/&gt;  \n     &lt;/authorization&gt;  \n   &lt;/system.web&gt;  \n&lt;/location&gt;\n</code></pre>\n\n<p>maybe it will help you too. it was Authentication problem.</p>\n\n<p><a href="http://blogs.telerik.com/blogs/posts/10-03-16/common-reasons-for-the-lsquo-sys-is-undefined-rsquo-error-in-asp-net-ajax-applications.aspx" rel="nofollow">Source</a></p>\n'}, {'answer_id': 9442728, 'author': 'v s', 'author_id': 1023156, 'author_profile': 'https://Stackoverflow.com/users/1023156', 'pm_score': 0, 'selected': False, 'text': '<p>I had similar problems and to my surprise what I found that one of my developer had saved web.config in the same folder/solution as <strong>web123.config</strong> and by mistake both of these files were uploaded.</p>\n\n<p>As soon as I deleted the <strong>web123.config</strong> file, this error disappeared and ajax framework was loading correctly. even though I have </p>\n\n<pre><code>&lt;compilation debug="true"&gt;\n</code></pre>\n\n<p>In my case I also have following segment. My project is using framework 3.5</p>\n\n<pre><code>    &lt;httpHandlers&gt;\n  &lt;remove verb="*" path="*.asmx"/&gt;\n  &lt;add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/&gt;\n  &lt;add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/&gt;\n  &lt;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"/&gt;\n&lt;/httpHandlers&gt;\n&lt;httpModules&gt;\n  &lt;add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/&gt;\n&lt;/httpModules&gt;\n&lt;/system.web&gt;\n</code></pre>\n'}, {'answer_id': 11031391, 'author': 'Carl Onager', 'author_id': 1400368, 'author_profile': 'https://Stackoverflow.com/users/1400368', 'pm_score': 0, 'selected': False, 'text': "<p>This is going to sound stupid but I had a similar problem with a site being developed in VS2010 and hosted in the VS Dev Server. The page in question had a scriptmanager to create the connection to a wcf service. I added an extra method to the service and this error started appearing. </p>\n\n<p>What fixed it for me was changing from 'Auto-assign Port' to 'Specific port' with a different port number in the oroject Web settings.</p>\n\n<p>I wish I knew why...</p>\n"}, {'answer_id': 13631823, 'author': 'GoldBishop', 'author_id': 659246, 'author_profile': 'https://Stackoverflow.com/users/659246', 'pm_score': 0, 'selected': False, 'text': 'Development Environment:\n<ul>\n<li>Dev-Env: VS 2012</li>\n<li>FX: 4.0/4.5</li>\n<li>Implementations: Master(ScriptManager + UpdatePanel/Timer) + Content (UpdatePanel)</li>\n<li>Patterns: PageRouting.</li>\n</ul>\n<h2>Disclaimer:</h2>\n<p>If all the <code>web.config</code> solutions do not work for you and you have implemented PageRouting (IIS 7+), then the code snippet below will solve your problems.</p>\n<h2>Background:</h2>\n<p>Dont mean to Highjack this question but had the same problem as everyone else and implemented 100% of the suggestions here, with minor modifications for .Net 4.0/4.5, and none of them worked for me.</p>\n<p>In my situation i had implemented <a href="http://msdn.microsoft.com/en-us/library/cc668201.aspx" rel="nofollow noreferrer">Page Routing</a> which was ghosting my problem.  Basically it would work for about 20, or so, debug runs and then BAM would error out with the <code>Sys is undefined</code> error.</p>\n<p>After reviewing a couple other posts, that got to talking about the Clean-URL logic, i remembered that i had done PageRouting setup\'s.</p>\n<p>Here is the resource i used to build my patterns: <a href="http://msdn.microsoft.com/en-us/library/cc668201.aspx" rel="nofollow noreferrer">Page Routing</a></p>\n<p>My one-liner code fixed my VS2012 Debugging problem:</p>\n<pre><code>rts.Ignore(&quot;{resource}.axd/{*pathInfo}&quot;)    \'Ignores any Resource cache references, used heavily in AJAX interactions.\n</code></pre>\n'}, {'answer_id': 14865444, 'author': 'Mahesh', 'author_id': 446154, 'author_profile': 'https://Stackoverflow.com/users/446154', 'pm_score': 0, 'selected': False, 'text': '<p>Even after adding the correct entry for web config still getting this error ?  most common reason for this error is JavaScript that references the Sys namespace too early.\nThen most obvious fix would be   move the java script block below the ScriptManager control:</p>\n'}, {'answer_id': 16109767, 'author': 'RacerNerd', 'author_id': 1634605, 'author_profile': 'https://Stackoverflow.com/users/1634605', 'pm_score': 0, 'selected': False, 'text': '<p>I don\'t think this point has been added and since I just spent some time hunting this down I hope it can help.<br/><br/>\nI am working with IIS 7 and using the ASP.NET v4 Framework.<br/>\nIn my case it was <strong>important that an entry be added to both the  and  section of the  entry in the web.config file.</strong><br/><br/>\nMy web.config file has a lot of handlers and in my case it was easiest to add the ScriptResources entry to the top of the handlers section.  <strong>Most importantly, it needs to be placed before any entry that will act as a wildcard and capture the request.</strong>  Adding it after a wildcard entry will cause it to be ignored and the error will still appear.<br/><br/>The module can be added to the top or bottom of the section.<br/><br/>\nWeb.config Sample:</p>\n\n<pre><code>&lt;system.webServer&gt;\n    &lt;handlers&gt;\n      &lt;clear /&gt;\n      &lt;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" /&gt;\n      &lt;!-- Make sure wildcard rules are below the ScriptResource tag --&gt;\n    &lt;/handlers&gt;\n    &lt;modules&gt;\n      &lt;add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/&gt;\n      &lt;!-- Other modules are added here --&gt;\n    &lt;/modules&gt;\n  &lt;/system.webServer&gt;\n</code></pre>\n'}, {'answer_id': 16822213, 'author': 'David Glass', 'author_id': 1521279, 'author_profile': 'https://Stackoverflow.com/users/1521279', 'pm_score': 1, 'selected': False, 'text': '<p>In case none of the above works for you, and you happen to be overriding OnPreRenderComplete, make sure you call base.OnPreRenderComplete. My therapist is going to be happy to see me back</p>\n'}, {'answer_id': 17256975, 'author': 'goodeye', 'author_id': 292060, 'author_profile': 'https://Stackoverflow.com/users/292060', 'pm_score': 3, 'selected': False, 'text': '<p>Dean L\'s answer, <a href="https://stackoverflow.com/a/1718513/292060">https://stackoverflow.com/a/1718513/292060</a> worked for me, since my call to Sys was also too early. Since I\'m using jQuery, instead of moving it down, I put the script inside a document.ready call:</p>\n\n<pre><code>$(document).ready(function () {\n  Sys. calls here\n});\n</code></pre>\n\n<p>This seems to be late enough that Sys is available.</p>\n'}, {'answer_id': 18301056, 'author': 'Farschidus', 'author_id': 1379217, 'author_profile': 'https://Stackoverflow.com/users/1379217', 'pm_score': 1, 'selected': False, 'text': "<p>I had the same problem after updating my AjaxControlToolkit.dll to the latest version 4.1.7.725 from 4.1.60623.0. \nI've searched and came up to this page, but none of the answers help me.\nAfter looking to the sample website of the Ajax Control Toolkit that is in the CodePlex zip file, I have realized that the <code>&lt;asp:ScriptManager&gt;</code> replaced by the new <code>&lt;ajaxtoolkit:ToolkitScriptManager&gt;</code>. I did so and there is no <em>Sys.Extended is undefined</em> any more.</p>\n"}, {'answer_id': 28965519, 'author': 'onlyme', 'author_id': 3954673, 'author_profile': 'https://Stackoverflow.com/users/3954673', 'pm_score': 0, 'selected': False, 'text': '<p>I had same probleme but i fixed it by: </p>\n\n<p>When putting a script file into a page, make sure it is </p>\n\n<pre><code>&lt;script&gt;&lt;/script&gt; and not &lt;script /&gt;.\n</code></pre>\n\n<p>I have followed this:\n<a href="http://forums.asp.net/t/1742435.aspx?An+element+with+id+form1+could+not+be+found+Script+error+on+page+load" rel="nofollow">http://forums.asp.net/t/1742435.aspx?An+element+with+id+form1+could+not+be+found+Script+error+on+page+load</a></p>\n\n<p>Hope this will help</p>\n'}, {'answer_id': 30093900, 'author': 'Jawad Siddiqui', 'author_id': 1085016, 'author_profile': 'https://Stackoverflow.com/users/1085016', 'pm_score': 0, 'selected': False, 'text': '<p>Add</p>\n\n<pre><code>if (typeof(Sys) !== \'undefined\') Sys.Application.notifyScriptLoaded(); \n</code></pre>\n\n<p>Please check  <a href="https://msdn.microsoft.com/en-us/library/vstudio/bb310952(v=vs.100).aspx" rel="nofollow">enter link description here</a></p>\n'}, {'answer_id': 32057625, 'author': 'Alexandre N.', 'author_id': 1398758, 'author_profile': 'https://Stackoverflow.com/users/1398758', 'pm_score': 3, 'selected': False, 'text': '<p>Try one of this solutions: </p>\n\n<p><strong>1. The browser fails to load the compressed script</strong></p>\n\n<p>This is usually the case if you get the error on IE6, but not on other browsers.</p>\n\n<p>The Script Resource Handler – ScriptResource.axd compresses the scripts before returning them to the browser. In pre-RTM releases, the handler did it all the time for all browsers, and it wasn’t configurable. There is an issue in one of the components of IE6 that prevents it from loading compressed scripts correctly. See KB article <a href="http://support.microsoft.com/default.aspx?scid=kb;en-us;Q312496" rel="noreferrer">here</a>. In RTM builds, we’ve made two fixes for this. One, we don’t compress if IE6 is the browser client. Two, we’ve now made compression configurable. Here’s how you can toggle the web.config.</p>\n\n<p>How do you fix it? First, make sure you are using the AJAX Extensions 1.0 RTM release. That alone should be enough. You can also try turning off compression by editing your web.config to have the following:</p>\n\n<pre><code>&lt;system.web.extensions&gt;\n&lt;scripting&gt;\n&lt;scriptResourceHandler enableCompression="false" enableCaching="true" /&gt;\n&lt;/scripting&gt;\n&lt;/system.web.extensions&gt;\n</code></pre>\n\n<p><strong>2. The required configuration for ScriptResourceHandler doesn’t exist for the web.config for your application</strong></p>\n\n<p>Make sure your web.config contains the entries from the default web.config file provided with the extensions install. (default location: C:\\Program Files\\Microsoft ASP.NET\\ASP.NET 2.0 AJAX Extensions\\v1.0.61025)</p>\n\n<p><strong>3. The virtual directory you are using for your web, isn’t correctly marked as an application (thus the configuration isn’t getting loaded) - This would happen for IIS webs.</strong></p>\n\n<p>Make sure that you are using a Web Application, and not just a Virtual Directory </p>\n\n<p><strong>4. ScriptResource.axd requests return 404</strong></p>\n\n<p>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.</p>\n\n<p>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</p>\n\n<pre><code>&lt;script src="/MyWebApp/ScriptResource.axd?[snip - long query string]" type="text/javascript"&gt;&lt;/script&gt;\n</code></pre>\n\n<p>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.</p>\n\n<p><strong>5. Resolving the "Sys is undefined" error in ASP.NET AJAX RTM under IIS 7</strong></p>\n\n<p>Put this entry under <code>&lt;system.webServer/&gt;&lt;handlers/&gt;</code>:</p>\n\n<pre><code>&lt;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" /&gt;\n</code></pre>\n\n<p>and remove the one under <code>&lt;system.web/&gt;&lt;httpHandlers/&gt;</code>.</p>\n\n<p>References: \n<a href="http://weblogs.asp.net/chrisri/demystifying-sys-is-undefined" rel="noreferrer">http://weblogs.asp.net/chrisri/demystifying-sys-is-undefined</a>\n<a href="http://geekswithblogs.net/lorint/archive/2007/03/28/110161.aspx" rel="noreferrer">http://geekswithblogs.net/lorint/archive/2007/03/28/110161.aspx</a></p>\n'}, {'answer_id': 37473809, 'author': 'hsobhy', 'author_id': 1030977, 'author_profile': 'https://Stackoverflow.com/users/1030977', 'pm_score': 0, 'selected': False, 'text': '<p>In my case, I\'ve found a very hidden reason ... There was this page route with in <strong>Global.ascx.cs</strong> which doesn\'t appear in my tests in sub-folders but returns the question error all the time .. another day with strange issues.</p>\n\n<pre><code>routes.MapPageRoute("siteDefault", "{culture}/", "~/default.aspx", false, new RouteValueDictionary(new { culture = "(\\\\w{2})|(\\\\w{2}-\\\\w{2})" }));\n</code></pre>\n'}, {'answer_id': 39619160, 'author': 'Fernando Meneses Gomes', 'author_id': 1291937, 'author_profile': 'https://Stackoverflow.com/users/1291937', 'pm_score': 1, 'selected': False, 'text': '<p>In my case the problem was that I had putted the following code to keep the gridview tableheader after partial postback:</p>\n\n<pre><code>    protected override void OnPreRenderComplete(EventArgs e)\n    {\n        if (grv.Rows.Count &gt; 0)\n        {\n            grv.HeaderRow.TableSection = TableRowSection.TableHeader;\n        }\n    }\n</code></pre>\n\n<p>Removing this code stopped the issue.</p>\n'}, {'answer_id': 46821137, 'author': 'Hawkeye', 'author_id': 4036454, 'author_profile': 'https://Stackoverflow.com/users/4036454', 'pm_score': 3, 'selected': False, 'text': '<p>I hate adding to such a huge topic and so much later, but I\'ve think I have a solution that works in VS2015 at the very least.</p>\n<p>I was on a hunt to find a reason for the sys error, and the only solution that worked for me was to add <code>EnableCdn=&quot;true&quot;</code> in a <code>ScriptManager</code> like this:</p>\n<pre><code>&lt;asp:ScriptManager ID=&quot;ScriptManager1&quot; runat=&quot;server&quot; EnableCdn=&quot;true&quot; /&gt;\n</code></pre>\n<p>See the <a href="https://learn.microsoft.com/en-us/dotnet/api/system.web.ui.scriptmanager.enablecdn?view=netframework-4.8" rel="nofollow noreferrer">MSDN</a> for more information.</p>\n<p><strong>Why do we need to do this?</strong></p>\n<p>When working on a asp.net web application, you have to enable CDN so that Microsoft can download the <code>Sys.</code> library.</p>\n<p>There was probably a script in your page that was using the <code>Sys</code> function. Setting <code>EnableCdn=&quot;true&quot;</code> would ensure that the <code>Sys</code> library is downloaded before it is used.</p>\n<p><strong>What\'s CDN?</strong></p>\n<p>It stands for &quot;Content Delivery Network&quot; and enabling it allows certain resources to download with simple references.</p>\n<p>A quote from <a href="https://www.sitepoint.com/7-reasons-to-use-a-cdn/" rel="nofollow noreferrer">https://www.sitepoint.com/7-reasons-to-use-a-cdn/</a></p>\n<blockquote>\n<p>Most CDNs are used to host static resources such as images, videos,\naudio clips, CSS files and JavaScript. You’ll find common JavaScript\nlibraries, HTML5 shims, CSS resets, fonts and other assets available\non a variety of public and private CDN systems.</p>\n</blockquote>\n<p>Both Google and Microsoft have CDNs. All you have to do is add a reference. Usually CDNs are added via a script resource:</p>\n<pre><code>&lt;script src=&quot;https://ajax.aspnetcdn.com/ajax/4.5.1/1/MicrosoftAjax.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;\n</code></pre>\n<p>Once you set <code>EnableCdn=&quot;true&quot;</code> and Microsoft will add it\'s little CDN reference (like the one above) in the page which downloads the <code>Sys</code> library.</p>\n<p>I hope that helps anybody that ran into the same issue.</p>\n'}, {'answer_id': 64142737, 'author': 'Bm Z', 'author_id': 1542087, 'author_profile': 'https://Stackoverflow.com/users/1542087', 'pm_score': 0, 'selected': False, 'text': '<p>I know this is an old thread but I found a somewhat unique solution.  In my case I was getting the error because I am using both Webforms and MVC in the same ASP.NET web application.  After mapping routes the issue showed up.  I fixed it by adding the following code to ignore routes for both &quot;{resource}.aspx/{*pathInfo}&quot; and &quot;{resource}.axd/{*pathInfo}&quot;</p>\n<pre><code>    private void RegisterRoutes(RouteCollection routes)\n    {\n        routes.IgnoreRoute(&quot;{resource}.aspx/{*pathInfo}&quot;);\n        routes.IgnoreRoute(&quot;{resource}.axd/{*pathInfo}&quot;);\n\n        routes.MapRoute(\n           &quot;Default&quot;, \n           &quot;{controller}/{action}/{id}&quot;, \n           new { controller = &quot;Test&quot;, action = &quot;Index&quot;, id = UrlParameter.Optional }\n       );\n    }\n</code></pre>\n'}]
['https://Stackoverflow.com/questions/75340', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/13320/']