.net build made web.config in section and which dll use in project and bin folder. Sample: my project use PrettyUI.dll, Interop.OWC10.dll etc. Beta 2 useses default assemblies below ;
dışındaki herşeyi silmek olacaktır. bunları silmek için publish ettikten sonra herhangi bir text editörünü kullanabilirsiniz.
bu arasa ajax beta2 yi ISS makinasına yüklemek yada yükletmek için çaba sarfetmeniz gerekmiyor. bunun için ise AjaxControlToolkit.dll, Microsoft.Web.Extensions.Design.dll,Microsoft.Web.Extensions.dll dosylarını bin dizinine kopyalayın ve
siteniz o şekli ile publish edin ve web.config deki yukarıdaki değişikliği tekrar yapın. böylece ISS de değişiklik yapmadan yeni veriyonu güle güle kullanabilirsiniz.[Yes]
I've been through a world of pain with this (as has everyone else it seems).
Having followed all the advice on this thread I was still getting the sys: undefined error (using ASP.NET AJAX Beta 2).
It seems my problem was related to compression.
In my case we're using the WinFxProgrammer, ASP.NET HTTP Compression Module. It seems that the files were being compressed twice - once by WinFX, and once by the ScriptResourceHandler. However, IE was only uncompressing them once, resulting in a file on
the client that was still full of compressed gibberish.
My solution was to copy the ScriptLibrary directory from the ASP.NET AJAX install directory (C:\Program Files\Microsoft ASP.NET\ASP.NET 2.0 AJAX Extensions\v1.0.61025) into the root of my web site.
I then referenced the scripts through the ScriptReference properties of the ScriptManager:
Referencing the scripts in this way stops the Microsoft.Web.Handlers.ScriptResourceHandler from compressing them, leaving the WinFxProgrammer, ASP.NET HTTP Compression Module to get on with compression by itself.
Also, if you have the following setting in web.config:
<system.web>
<compilation debug="true">
...
then the actual scripts that get included in the output are as follows:
/ScriptLibrary/Debug/MicrosoftAjax.debug.js
/ScriptLibrary/Debug/MicrosoftAjaxWebForms.debug.js
/ScriptLibrary/Debug/MicrosoftAjaxTimer.debug.js
Within the ScriptLibrary directory I copied to into the root of my web site, I then copied the 3 .js files, and renamed then with an extension of .debug.js, so I now have the following 6 files in my /ScriptLibrary/Debug directory:
MicrosoftAjax.debug.js
MicrosoftAjax.js
MicrosoftAjaxWebForms.debug.js
MicrosoftAjaxWebForms.js
MicrosoftAjaxTimer.debug.js
MicrosoftAjaxTimer.js
I also have this nasty 'Sys is undefined' Error Message on our live-Server.
While developing on on Server on our local network everything went fine.
Today we tried to run the application on the live-Servers (webfarm with 2 Servers) and got the 'Sys is undefined' Error.
When I compare the temporary internet files after visiting the site on the dev-Server with the temporary internet files after visiting the live-servers, I see that on the live servers only a few of the the webressource and scriptressource.axd files where
transfered.
Actually what fix my problem was well documented... but I hope next Ajax release, the team includes these lines in the project template because it is very easy to overlook them.
In my case I had to add manually the following <BOLD> lines to the web.config in order to run WebServices:
In my case, I have found a resolution and I hope that this might be able to shed some light to those who are having the same problem as mine. I am using AJAX ASP .NET Beta 2 without any prior experience with Beta 1. I have added the necessary lines to my
web.config file such as the httpHandlers and httpModules but still having problem with 'Sys is undefined' error.
Here's my scenario:
There are 3 files required for my page to work properly. The javascript file (.js), the .aspx file and the .vb file.
I got the 'Sys is undefined' error when I add 'Sys.WebForms.PageRequestManager.instance.add_beginRequest(beginRequestHandler)' to my .js file.
The line above is not contained within any javascript function and is expected to run as soon as the page loads. Apparently those codes in the .js files are being executed first before the HTML elements are being populated in the .aspx file. In other words,
the line above is being called first even before the references to the ScriptResource or WebResource is established on the .aspx file. Since the 'Sys' object refers to its definition in either the ScriptResource or WebResource, and neither exists yet during
the call for the object, an error will occur.
Resolution:
Encase the line above or any calls for the 'Sys' object in a <script> tag. For example,
Add the block of codes above to the end of the .aspx file preferably right before the body tag closes </body>. This way the line above will only be executed after all the HTML elements are being populated on the page. If you insist in having all your javascript
codes reside in your .js file, then you will need to use addEventListener for Firefox or attachEvent for Internet Explorer to listen to the 'load' event at the window level.
The release notes talk about the web.config changes but my web.config was fine.
The problem was the Application configiration of my virtual directory. When I edited the application mapping for the .axd extension to point to the right folder (C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll) the problem
went away.
Steps to do:
open the properties window by right clicking the Virtual directory
Click on the Configuration Button on the Virtual directory tab
Select .axd extension on the Application Mappings tab
Check if the Executable path is pointing to the right folder ( in my case it was pointing to C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322)
Click Edit button to change the executable path to point to the right folder
Finally figured out my own 'Sys undefined' error and hope someone else will benefit from this posting.
Our installation uses SiteMinder for web site authorization and it seems the fact that ScriptResource.axd doesn't physically exist in the root was the cause of our error. One astute sys admin suggested putting a 0 byte ScriptResource.axd file in the root
directory and that fixed the problem. I don't even want to admit to how many wasted hours (and 100s of blog entries) I wasted on this one.
I really have enjoyed using the Ajax Control Toolkit and I want to say thanks to all you guys working on it.
ah, so you have your iis configured to serve only files that exist in your web app....hum, thanks for sharing since this is a good tip for future problems.
--
Regards,
Luis Abreu
email: labreu_at_gmail.com
EN blog:http://msmvps.com/blogs/luisabreu
justinalucar...
Member
12 Points
3 Posts
Re: KB912812 may fix it.
Nov 16, 2006 04:40 AM|LINK
U Can't let every client uninstall the patch,and I'm not counting on the beta 2 version.
I just hope it can be fixed in the release version.
I would rather use the MagicAjax now,At least there aren't so many bugs!
levf
Member
5 Points
1 Post
I made it !!!
Nov 16, 2006 11:51 AM|LINK
first sorry about my english :(
.net build made web.config in section and which dll use in project and bin folder. Sample: my project use PrettyUI.dll, Interop.OWC10.dll etc. Beta 2 useses default assemblies below ;
<assemblies>
<
add assembly="Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/><
add assembly="Microsoft.Web.Extensions.Design, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/></
assemblies>when you build project vs .net 2005 append assemblies in default settings ( some times not)
<
add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/><
add assembly="MSDATASRC, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/><
add assembly="ADODB, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/><
add assembly="stdole, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>then you'll never run this compiled web project in ISS couse ever time get "Sys undefined"
This is solution:
publish web site to ISS and open web.config with notepad or other text editor. Then delete all assemblies except below
<add assembly="Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add assembly="Microsoft.Web.Extensions.Design, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
that's all. [Yes]
note: you don't need setup beta 2 to ISS machine. just copy AjaxControlToolkit.dll, Microsoft.Web.Extensions.Design.dll,
Microsoft.Web.Extensions.dll to bin directory and bulid and publish project to ISS folder.
Then run web page from browser.[:)]
Tur: Ajax 2 beta yı yükledikten sonra sayfalarınızda sys undfeined hata mesajı alıyorsanız. tek yapmanız gereken web.config deki <assemblies> kısmına eklenen
<add assembly="Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add assembly="Microsoft.Web.Extensions.Design, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
dışındaki herşeyi silmek olacaktır. bunları silmek için publish ettikten sonra herhangi bir text editörünü kullanabilirsiniz.
bu arasa ajax beta2 yi ISS makinasına yüklemek yada yükletmek için çaba sarfetmeniz gerekmiyor. bunun için ise AjaxControlToolkit.dll, Microsoft.Web.Extensions.Design.dll,Microsoft.Web.Extensions.dll dosylarını bin dizinine kopyalayın ve siteniz o şekli ile publish edin ve web.config deki yukarıdaki değişikliği tekrar yapın. böylece ISS de değişiklik yapmadan yeni veriyonu güle güle kullanabilirsiniz.[Yes]
chrisstead
Member
12 Points
3 Posts
Re: 'Sys' is undefined.
Nov 16, 2006 12:39 PM|LINK
I've been through a world of pain with this (as has everyone else it seems).
Having followed all the advice on this thread I was still getting the sys: undefined error (using ASP.NET AJAX Beta 2).
It seems my problem was related to compression.
In my case we're using the WinFxProgrammer, ASP.NET HTTP Compression Module. It seems that the files were being compressed twice - once by WinFX, and once by the ScriptResourceHandler. However, IE was only uncompressing them once, resulting in a file on the client that was still full of compressed gibberish.
My solution was to copy the ScriptLibrary directory from the ASP.NET AJAX install directory (C:\Program Files\Microsoft ASP.NET\ASP.NET 2.0 AJAX Extensions\v1.0.61025) into the root of my web site.
I then referenced the scripts through the ScriptReference properties of the ScriptManager:
<asp:ScriptManager ID="scriptManager" runat="server" EnablePartialRendering="false"
OnAsyncPostBackError="scriptManager_AsyncPostBackError">
<Scripts>
<asp:ScriptReference Name="MicrosoftAjax.js" Path="/ScriptLibrary/Debug/MicrosoftAjax.js" />
<asp:ScriptReference Name="MicrosoftAjaxWebForms.js" Path="/ScriptLibrary/Debug/MicrosoftAjaxWebForms.js" />
<asp:ScriptReference Name="MicrosoftAjaxTimer.js" Path="/ScriptLibrary/Debug/MicrosoftAjaxTimer.js" />
</Scripts>
</asp:ScriptManager>
Referencing the scripts in this way stops the Microsoft.Web.Handlers.ScriptResourceHandler from compressing them, leaving the WinFxProgrammer, ASP.NET HTTP Compression Module to get on with compression by itself.
Also, if you have the following setting in web.config:
<system.web>
<compilation debug="true">
...
then the actual scripts that get included in the output are as follows:
/ScriptLibrary/Debug/MicrosoftAjax.debug.js
/ScriptLibrary/Debug/MicrosoftAjaxWebForms.debug.js
/ScriptLibrary/Debug/MicrosoftAjaxTimer.debug.js
Within the ScriptLibrary directory I copied to into the root of my web site, I then copied the 3 .js files, and renamed then with an extension of .debug.js, so I now have the following 6 files in my /ScriptLibrary/Debug directory:
MicrosoftAjax.debug.js
MicrosoftAjax.js
MicrosoftAjaxWebForms.debug.js
MicrosoftAjaxWebForms.js
MicrosoftAjaxTimer.debug.js
MicrosoftAjaxTimer.js
Everything is now working (phew!)
Codematic
Member
81 Points
42 Posts
Re: 'Sys' is undefined.
Nov 16, 2006 01:35 PM|LINK
I also have this nasty 'Sys is undefined' Error Message on our live-Server.
While developing on on Server on our local network everything went fine.
Today we tried to run the application on the live-Servers (webfarm with 2 Servers) and got the 'Sys is undefined' Error.
When I compare the temporary internet files after visiting the site on the dev-Server with the temporary internet files after visiting the live-servers, I see that on the live servers only a few of the the webressource and scriptressource.axd files where transfered.
Any Idea?
Codematic
Member
81 Points
42 Posts
Re: 'Sys' is undefined.
Nov 16, 2006 02:23 PM|LINK
In addition to the upper post, not one scriptressource.adx file get transfered on the live-system.
uri
Member
65 Points
13 Posts
Re: 'Sys' is undefined.
Nov 16, 2006 11:47 PM|LINK
Actually what fix my problem was well documented... but I hope next Ajax release, the team includes these lines in the project template because it is very easy to overlook them.
In my case I had to add manually the following <BOLD> lines to the web.config in order to run WebServices:
jason2k
Member
12 Points
3 Posts
Re: 'Sys' is undefined.
Nov 22, 2006 12:44 AM|LINK
In my case, I have found a resolution and I hope that this might be able to shed some light to those who are having the same problem as mine. I am using AJAX ASP .NET Beta 2 without any prior experience with Beta 1. I have added the necessary lines to my web.config file such as the httpHandlers and httpModules but still having problem with 'Sys is undefined' error.
Here's my scenario:
There are 3 files required for my page to work properly. The javascript file (.js), the .aspx file and the .vb file.
I got the 'Sys is undefined' error when I add 'Sys.WebForms.PageRequestManager.instance.add_beginRequest(beginRequestHandler)' to my .js file.
The line above is not contained within any javascript function and is expected to run as soon as the page loads. Apparently those codes in the .js files are being executed first before the HTML elements are being populated in the .aspx file. In other words, the line above is being called first even before the references to the ScriptResource or WebResource is established on the .aspx file. Since the 'Sys' object refers to its definition in either the ScriptResource or WebResource, and neither exists yet during the call for the object, an error will occur.
Resolution:
Encase the line above or any calls for the 'Sys' object in a <script> tag. For example,
<script type="text/javascript">
Sys.WebForms.PageRequestManager.instance.add_beginRequest(beginRequestHandler);
</script>
Add the block of codes above to the end of the .aspx file preferably right before the body tag closes </body>. This way the line above will only be executed after all the HTML elements are being populated on the page. If you insist in having all your javascript codes reside in your .js file, then you will need to use addEventListener for Firefox or attachEvent for Internet Explorer to listen to the 'load' event at the window level.
I hope this will be able help someone.
AmitSharma
Member
5 Points
1 Post
Re: 'Sys' is undefined.
Dec 01, 2006 11:59 PM|LINK
I was finally able to resolve this issue.
The release notes talk about the web.config changes but my web.config was fine.
The problem was the Application configiration of my virtual directory. When I edited the application mapping for the .axd extension to point to the right folder (C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll) the problem went away.
Steps to do:
open the properties window by right clicking the Virtual directory
Click on the Configuration Button on the Virtual directory tab
Select .axd extension on the Application Mappings tab
Check if the Executable path is pointing to the right folder ( in my case it was pointing to C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322)
Click Edit button to change the executable path to point to the right folder
tampadotnet
Member
9 Points
4 Posts
Re: 'Sys' is undefined.
Dec 05, 2006 11:22 AM|LINK
Finally figured out my own 'Sys undefined' error and hope someone else will benefit from this posting.
Our installation uses SiteMinder for web site authorization and it seems the fact that ScriptResource.axd doesn't physically exist in the root was the cause of our error. One astute sys admin suggested putting a 0 byte ScriptResource.axd file in the root directory and that fixed the problem. I don't even want to admit to how many wasted hours (and 100s of blog entries) I wasted on this one.
I really have enjoyed using the Ajax Control Toolkit and I want to say thanks to all you guys working on it.
Luis Abreu
All-Star
25674 Points
5369 Posts
MVP
Re: 'Sys' is undefined.
Dec 05, 2006 02:10 PM|LINK
hello.
ah, so you have your iis configured to serve only files that exist in your web app....hum, thanks for sharing since this is a good tip for future problems.
Regards,
Luis Abreu
email: labreu_at_gmail.com
EN blog:http://msmvps.com/blogs/luisabreu