I was using ASP.NET 2.0 along with Ajax Extensions 1.0. I received this error ‘Sys’ is undefined error message every time I used an Ajax control. I was pulling my hair out on it and decided to give the Control Toolkit’s web.config a glance. The following lines were not available in my web.config, so i copied them over:
<httpHandlers>
<remove verb=”*” path=”*.asmx”/>
<add verb=”*” path=”*.asmx” validate=”false” type=”System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35″/>
<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″/>
<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”/>
</httpHandlers>
<httpModules>
<add name=”ScriptModule” type=”System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35″/>
</httpModules>
P.S: These lines go inside the System.Web section of your web.config file
Bingo.. the error vanished and all my controls started to function as they should
Thanks! This solved my problem
Thanks. Worked like a charm.
[...] by greywall 25 days ago3 votesAJAX Examples [2008-08-17 04:48:41]>> saved by im 40 days ago5 votes‘Sys’ is undefined – ASP.Net Ajax error>> saved by RandomAction 41 days ago1 votesAjax powered domain name checkers>> saved by [...]
good article, keep it up
Still the same error…
maybe ill forget using it on 2.0
Good one. All my problems solved with this.
Thanks
Thanks!! it worked!,
the only problem i had after copy the code, was some hiden characters, i had to copy to notepad and replace the hex characters for “.
Thanks!
My solution was more simple:
Inside the tags
Have fun, Jakob
Thanks.. Finally, got rid of the error!!
FYI, initially my project worked perfectly on my local machine, but I faced the same problem on the Server which is also being configured as a DNS with active directory hosting multiple sites.
This didn’t exactly worked for me but led me to my solution. I’ve tried many many versions of web.config that claimed to worked but just not for me. What did work for me was I have to explicitly copy the file ScriptResource.axd into my published folder. The server is running Windows Server 2003 adv server IIS6 ASP.NET 2.0 (VS 2005).
THANK YOU!!!
I was pulling my hair out over this. Lost an entire day trying to resolve it. Followed your recommendation and it took care of everything.
Again thank you for posting what you found. It would have taken me all week to get to this point. Thank you!