ASP.NET - Ajax Not working on production server

Asked By Rtanesh on 05-Mar-12 01:35 PM
Earn up to 30 extra points for answering this tough question.
Hi,

   I have made an application in .net 2008 and used Ajax version 3.5. The Ajax is working fine in my development and testing environment i.e Page is not getting refreshed. But when  i  deployed it on my production server (In my case production server in GO DADDY) The Ajax is not working i.e page is get refreshed. I have tried to use TOOLKITSCRIPT manager instead of asp SCRIPT manager but ii didn't work.



Please help.



Thanks,
dipa ahuja replied to Rtanesh on 05-Mar-12 01:51 PM
Make sure you have register it in the web.config :

Untitled document

Make sure you have added the dll and the ajax registration in Bin directory and the web.config file :

 

1. Installing AjaxToolkit


2. Add the ajaxtoolkit.dll in the BIN directory of your website

 

3. Add  this in the web.config inside Controls node:

<controls>

<add tagPrefix="cc1" namespace="System.Web.UI"

assembly="System.Web.Extensions, Version=1.0.61025.0,Culture=neutral,PublicKeyToken=31bf3856ad364e35"/>

<add namespace="AjaxControlToolkit" assembly="AjaxControlToolkit" tagPrefix="cc1"/>

</controls>


 


Rtanesh replied to dipa ahuja on 05-Mar-12 11:53 PM
Hi Deepa,

I have all ready added dll in bin and web config. But still it didnot work.


Thanks,


Ratnesh Singh
Reena Jain replied to Rtanesh on 06-Mar-12 12:47 AM
Hi,

I had also puzzled with the problem of ajax in Godaddy
Godaddy right now hosting for .net 1.1, 2.0, 3.5 and PHP 5 an all in one server for their shared hosts. So I would like to suggest you that get a contact with godaddy.com to ask for supporting for Ajax and ask for their help with your website configuration. As final configuration will be done by host company itself. I had contact with them and they resolved my problem regarding this
Danasegarane Arunachalam replied to Rtanesh on 06-Mar-12 02:15 AM
GoDaddy Support article says that you have installed the the

System.Web.Extensions.dll

in their system GAC and requesting not place the the dll in the application Bin Folder

Did you check that one ?

And also check this article
Somesh Yadav replied to Rtanesh on 06-Mar-12 03:24 AM

Hi Rtanesh,

Firstly, you'd better download  a sample here.  It should work on .NET Framework 2.0.  If ASP.NET Ajax Extension v1.0 is not installed, please install it first.  You can get the install file here.  (ASP.NET AJAX Extension for .NET Framework 3.5 is integrated into .NET Framework 3.5).
If it works, please compare it with your sample. Especially, the web.config part.
If all these cannot figure out your problem, please download the version of .NET Framework 2.0 here (the version 1.0.20229 with source code).  Before use it, please recompile it first. The installation steps, please follow the first two video tutorials here.
If you are using .NET Framework 2.0, please compare your sample's web.config with the downloaded sample.  Otherwise, if you are using .NET Framework 3.5, please compare it with the downloaded sample either.
Note:
Version 3.0.20229
2008-02-29 release of the AJAX Control Toolkit targets the official release of .NET Framework 3.5 and Visual Studio 2008.
Version 1.0.20229
You can also download the Toolkit for .NET Framework 2.0, ASP.NET AJAX 1.0 and Visual Studio 2005.   
Version 3.0.30512
2009-05-13 release of the AJAX Control Toolkit targets the official release of .NET Framework 3.5 SP1 and Visual Studio 2008 SP1.

Some tutorials:
http://www.asp.net/ajax/ajaxcontroltoolkit/samples/
http://www.asp.net/ajax/downloads/
http://www.codeplex.com/Wiki/View.aspx?ProjectName=AtlasControlToolkit
http://www.asp.net/learn/Ajax-Control-Toolkit/tutorial-47-cs.aspx
http://www.asp.net/learn/ajax-videos/video-81.aspx

Best regards,

kalpana aparnathi replied to Rtanesh on 06-Mar-12 02:40 PM
hi,

Firstly do following:
  1. Check whether page has any javascript errors. Javascript error make asynchronous postback to synchronous postback.
  2. Check the versions of ajax in Dev Box and Remote Box. Version conflict causes this behaviour.
  3. Copy the System.Web.Extensions dll reffered in your web.config from dev box to your remote server bin folder of app.

click here for more detail about your problem.

Regards,

[)ia6l0 iii replied to Rtanesh on 14-Mar-12 01:24 AM
Apart from all the suggestions above, you should ensure that the scriptmanager has the script references pointing to the right files. There are possibilities that you can get this path to be mistated in your file. I am talking about the below section. 

<asp:ScriptManager ID="scriptmanager1" runat="server">
      <Services>
        <asp:ServiceReference Path="path to the asmx here" />
      </Services>
</asp:ScriptManager>


Open the website thru Internet Explorer or Chrome and look for network Errors. Both the browsers, give you sufficient information to figure out failing requests. 

One way to figure out the missing files is to use developer tools in almost every modern browser or use Fiddler and check the broken requests. 

For developer tools in IE - Press F12, and go to Network tab, and press start capturing.


Or in chrome, use the Network tab to figure out all 404 requests.


Hope this helps.