views:

597

answers:

2

On the developement machine my website is working fine but I am getting javascript 'Sys' is undefined error on hosting server and my AJAX is not working.

I have make a sample page and scriptmanager on it, Please look into this. http://nexapps.com/default2.aspx

button and textbox is in AJAX updatepanel, but when hit to button page is full postback.

Note: hosting server--IIS7, but my other websites are working fine on the same server

Thanks

+1  A: 

Sounds like your web.config, see if any of this info helps out.

rick schott
After google search, I have found this URL very first, but implement the thing that have mention in this, but could not help out. after that I have posted the issue on forum. Thanks
Muhammad Akhtar
A: 

After some hardworking I have resolve the problem, there are some handlers that were automatically added in the live web.config by plesk, I have remove all those and add local website handlers it is working now.

these kind of handler added in the web.config

<add name="Plesk_Handler_0439968595" path="*.asp" verb="GET,HEAD,POST,TRACE" modules="IsapiModule" scriptProcessor="c:\windows\system32\inetsrv\asp.dll" resourceType="Either" />
  <add name="Plesk_Handler_0439968699" path="*.cer" verb="GET,HEAD,POST,TRACE" modules="IsapiModule" scriptProcessor="c:\windows\system32\inetsrv\asp.dll" resourceType="Either" />

....there are many more..

and add following and then site is working

<remove name="WebServiceHandlerFactory-Integrated"/>
  <remove name="ScriptHandlerFactory"/>
  <remove name="ScriptHandlerFactoryAppServices"/>
  <remove name="ScriptResource"/>
  <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
  <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
  <add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
Muhammad Akhtar
So, it was in fact your web.config...:)
rick schott
yes, these handlers were automatcially added from the plesk server. I have asked about these handlers to support team and they don't know as well. Thanks
Muhammad Akhtar