0

I am trying to use the AjaxToolkit for a Asp.net 3.5 project. I have an existing project that I added the ajax configuration using this link http://www.asp.net/ajax/documentation/live/ConfiguringASPNETAJAX.aspx but I am getting a javascript error of Sys not defined. I am wondering if it has something to do with the handlers that were set up. I am using IIS 6 on a windows 2003 server using a .net 3.5 project any one have any ideas?

HTTP Handlers:

 <remove verb="*" path="*.asmx" />
  <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
  <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
  <add verb="GET,HEAD" path="ScriptResource.axd" validate="false" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />

My full web.config

http://pastebin.com/8AFLA3KA

atrljoe
  • 8,031
  • 11
  • 67
  • 110
  • try these 1) http://encosia.com/updated-your-webconfig-but-sys-is-still-undefined/ (2) http://stackoverflow.com/questions/75322/sys-is-undefined and also this http://stackoverflow.com/questions/3822733/ajaxtoolkit-iis7-asp-net-4-0-sys-is-not-defined-handler-mapping-issue – Waqar Janjua Aug 22 '12 at 14:12

1 Answers1

0

You are missing the web.config entry in system.webserver. Without the system.webserver entry, it will work on the development server and iis 6-, but not on IIS 7+ in integrated mode. Another option is to switch the IIS7 app-pool into classic mode.

The Visual Studio web application templates got updates with a service pack, but your project got created before that update :)

Just make sure you installed all updates, create a new ajax project, and compare the web.config file.

Stefan Steiger
  • 78,642
  • 66
  • 377
  • 442