Jump to content
Sign in to follow this  
miffe

'Sys' is Undefined

Recommended Posts

Hello everyone,I am receiving the 'Sys' is undefined error while running my C#/ASP.NET Web App on my local server in IE6.First of all let me assure you I have been through the posts on the ASP.NET forum, I have been through private blog posts, and I have been through the solutions posted on ArcGIS Server Blog without success.The error only occurs after refreshing the page. The first time I enter it works, after pressing F5 (or refresh button) it fails. I have tested this on multiple machines so it is not my computer's fault. It does work on my dev machine, even with IE6, but on the local server I receive that error (running IIS7).I am using .Net Framework 3.5, and I am calling a local WebService (ASMX) from the website to fetch data and populate Google Maps. I also do a few width transformations on a div or two, and hide a few checkboxes.First of all I thought it might be an issue described by Joel Rumerman as "The problem that we saw was the dreadful Internet Explorer Operation Aborted error. The Operation Aborted error, which occurs when the DOM is illegally modified and causes the page to completely fail, was occurring on slower connections when the map was loaded for the first time."I do not have the "Operation Aborted" error, however I had the impression this might be the problem as I do change de width of various dom elements, and I also use an AJAX call which might take some time to load.Joel's posts explaining (and solving) the issue can be found here:http://seejoelprogram.wordpress.com/2008/0...-aborted-in-ie/http://seejoelprogram.wordpress.com/2008/1...itialize-again/However his solution requires the AJAX JS file in .NET to be modified. I do not have access to modify those files on the live server so it is out of the question.I then found Nikhil Shampur's solution posted at the ArcGIS Server .NET Software Development Team where he provides a block of code that can be inserted right in the page where the Sys.Application.initialize() call is made. It involves overriding the .initialize function.Nikhil's solution can be found here:http://blogs.esri.com/Dev/blogs/arcgisserv...t-Explorer.aspxI tried this solution by inserting the code block in the header, above the asp:ScriptManagerProxy, and at the end, none of them made any progress.I then tried searching for the error directly, and found out several posts and threads:http://forums.asp.net/t/1040236.aspx?PageIndex=5http://forums.asp.net/t/1538027.aspxhttp://weblogs.asp.net/chrisri/archive/200...-undefined.aspxFirst of all most solutions tell you to insert the Ajax Extensions 1.0.610 (Microsoft.Web.Extensions) in your web.config, however, this was for .NET version 2.0. In later .NET Frameworks AJAX Extensions forms part of the framework as System.Web.Extensions, i.e. in version 3.5.0.0 such as the one I use.The last link I mentioned provides 4 solutions for the problem: 1. The browser fails to load the compressed script: (make sure you are using the AJAX Extensions 1.0 RTM release --> I have this included in System.Web.Extensions in the Framework), (try turning off compression by editing your web.config --> I tried adding <scriptResourceHandler enableCompression="false" enableCaching="true" /> without success). 2. The required configuration for ScriptResourceHandler doesn’t exist for the web.config for your application --> (Yes, I do have the handlers, the assembly, the script resource definition, and the system.web.extensions tag) 3. The virtual directory you are using for your web, isn’t correctly marked as an application --> (Yes, it is set up as a Web Application, I am using IIS7) 4. ScriptResource.axd requests return 404 --> (The mapping is working correctly, the file is returned by IIS)As a last bit of information, I do have AjaxToolKit.dll file in the bin folder of my server, I do have compilation debug="false" in the web.config.These are the keys I am using in my web.config: * Under <assemblies>: <add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> * Under <httpHandlers>: <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false" /> (Repeated in system.webServer)And last but not least I have this extra section:

<system.web.extensions>	<scripting>		<webServices>			<jsonSerialization maxJsonLength="1000000000" />		</webServices>		<scriptResourceHandler enableCompression="false" enableCaching="true" />	</scripting></system.web.extensions>

The problem only occurs on the web pages where I make the call to my local webservice, and I load a Google Maps interface, and I change a few widths on divs.I would seriously appreciate it if anyone could give me a hand with this situation as it has been troubling me for quite a few days now and I have not been able to find a proper solution.Thanks in advance,LeMiffe

Share this post


Link to post
Share on other sites

Check your event logs on the server as well as the client machine for errors.

Share this post


Link to post
Share on other sites
Guest paul d

I found the workaround here: http://weblogs.asp.net/israelio/archive/20.../11/424852.aspx.Someone mentions the following, which worked great for me!!:"If you are getting the dreaded sys error with ajax, you have to had a blank file to you app directory called ScriptResource.axd and as mentioned in a earlier post you also need WebResource.axd, then everything works just fine. I am sure these small issues are related to the fact that mod_aspdotnet does not support .net 2.0 officially yet."I hope this helps. Thanks!Paul Dpdipalma@jdnext.com

Share this post


Link to post
Share on other sites
I found the workaround here: http://weblogs.asp.net/israelio/archive/20.../11/424852.aspx.Someone mentions the following, which worked great for me!!:"If you are getting the dreaded sys error with ajax, you have to had a blank file to you app directory called ScriptResource.axd and as mentioned in a earlier post you also need WebResource.axd, then everything works just fine. I am sure these small issues are related to the fact that mod_aspdotnet does not support .net 2.0 officially yet."I hope this helps. Thanks!Paul Dpdipalma@jdnext.com
i am getting the below error when i execute the application & click on a button<script type="text/javascript">//<![CDATA[sys.Application.initialize();//]]></script></form>i am using VS2005 with ajax & frame work 2.0 on windows 7 os with IE8 & IIS7i tried many ways , but culd not eeven debug he errori have script resource .asd filein my app directry

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...