.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Ajax call not working on production box - Using ASP.NET MVC 2

Posted By:      Posted Date: October 04, 2010    Points: 0   Category :ASP.Net


The following .post command in a .js file works fine in Dev and Test but not on our production box (Windows Server 2003).  I believe the URL is not being found on the production box since the function(result) is not being run.  Or it could be that the index method is not returning the jsonresult.

    $.post(BASE_APP_URL + "Beast/Index", $("#beastForm").serialize(), function(result) {
    }, "json");


    <script type="text/javascript">
        var BASE_APP_URL = '<%=Url.Content("~/")%>';   
Index Method:
        public ActionResult Index(BeastPrompt b,string hiddenSubmit, string btnRun)
            beast.errorMessage = string.Empty;

View Complete Post

More Related Resource Links

AJAX call is not working on F5 load balancer web farm setup

I have the following web farm setup in production server.Browser --> HTTPS --> Load Balancer --> HTTP --> webserver nodeF5 Load balancer handles off box SSL termination. It implies that SSL resides on F5 load balancer. Problem Statement: Ajax calls do not go through unless "Access data sources across domains" option is enabled in IE security settings. I have the similar setup in staging server except F5 Load balancer. The ASP.Net application makes perfect AJAX calls on both HTTP and HTTPS.However, the staging server web farm use windows NLB and SSL resides on individual web server nodes

AJAX call to webservice is not working for strange reasons.


I have a webservice "DataService.asmx" which I am using for AJAX calls for insert, update, delete and some other tasks. All the pages are calling webservice smoothly but this new page I added and calling my webservice using the same ajax method not working. Strange thing is that neither its going on SUCCESS nor FAILURE...and put a breakpoint on my webservice but its not going into the webservice...plz help as its been 6 hours now figuring what the problem is..here is the code.

<script type="text/javascript">

    function UpdateBillRow(billingMonthObj, currentBillUnitsObj, bdueDateObj, AdvIncTaxObj, wHoldingTaxObj, gstObj, amtAfterDDObj, gRowID)
        var bmonth = document.getElementById(billingMonthObj).value;
        var currentunits = document.getElementById(currentBillUnitsObj).value;
        var duedate = document.getElementById(bdueDateObj).value;
        var advIncTax = document.getElementById(AdvIncTaxObj).value;
        var wTax = document.getElementById(wHoldingTaxObj).value;
        var gst = document.getElementById(gstObj).value;
        var amtafterdd = document.getElementById(amtAfterDDObj).value;
        var gridRowID = document.getElementById(gRowID);

        alert("button called and now going to call ajax...");

        //Call Ajax to check userid availability 

Ajax not working in production environnement



I developed a web page using asp.net 2.0 and ajax toolkit on my laptop on Windows 7 and IIS 6.

I have my ajax/atlas toolkit DLL in my bin.

The updatePanel works fine and does not postback my page.

But when i hosted my website on a dedicated server the page postback totally like i have no updatepanel/ajax in my page...

I am using :

  • Windows server 2008
  • IIS 6
  • Ajax 2.0 installed on the server

I don t understand what is the difference with windows server or IIS or something else ?

Any idea ?



Using jQuery to directly call ASP.NET AJAX page methods

Here I am looking to explain how to call page methods using jQuery. Using jQuery to directly call ASP.NET AJAX page methods

JQuery Treeview plugin is not working with Ajax page load in ie8


Hi there,

I developed a page where i m using jquery treeview plugin to generate tree. It worked fine on FF, IE8 with out ajax.

But when my page loads thro' ajax call in IE8, it is not collapsing or expanding tree.

Any idea?

Thanks in advance.

MaterPage Ajax calendar extender not working


AJAX with MasterPage not working.

Setup simple test site below, no error just not working. TIA

    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server" />
        <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">

<%@ Page Title="" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="ajaxDev.WebForm1" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
  <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
  <asp:CalendarExtender ID="TextBox1_CalendarExtender" runat="server" 
    Enabled="True" TargetCo

Jquery Ajax Call to Mvc Action tips.


I try to do a ajax call via the jquery api.

The scritp :

$("#sortColumn").click(function(e) {
                var columnName = $(this).attr('name');
                var sidx = columnName;
                var sord = '<%= (string)ViewData["sord"] == "asc" ? "desc" : "asc"%>';
                var page = '<%= ViewData["page"] %>';
                var rows = "5";
                type: "POST",
                url: "/Mailings/GetData2",
                data: {'sidx': sidx ,'sord': sord ,'page': page ,'rows':  rows },
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: function(response) {
                var jsonObject = (typeof response.d) == 'string' ? eval('(' + response.d + ')') : response.d;
                error: function(xmlHttpRequest, textStatus, errorThrown) {
                    document.getElementById('infoContentHeader').innerHTML = xmlHttpRequest.responseText;


And the

Ajax AutocompleteExtender not working from IIS


I am using  AjaxAutoCompleteExtender  in my asp.net program (C#) . I am applying the extender to a texbox and using internal Web Service. I am getting the desired result, when i am running from the development environment. After Publishing the site to IIS, I am not getting the list and not showing any errors. I have turned off custom errors. My website is not an Ajax Enabled WebSite. So i added the lines into my Web.Config.

I tried all service path.. http://localhost/Test/ WebService.asmx

and i tried ~/Test/WebService.aspx


While testing from the development environment, i am using the last one.

I am not sure whether this is the problem with the service path or any permission issue.



$.ajax post from asp.net page and __viewstate causing call to fail



Now I know that I won't be sending viewstate and eventvalidation in my ajax calls and that I will only want to send the actual form fields for efficiency purposes but I will need to know the answer to this question, to inform the more junior members of the team and my manager, so if anyone has any answers they are most welcome.

I have a simple form as follows

<form id="form1" runat="server"> 
<p>Field1: <

ajax call to webservice

I am new to jquery and want to make a simple jquery ajax call to webservice. My webservice is running fine but I am unable to get the data through ajax and jquery. My code is <%@ Page Language="C#" AutoEventWireup="true" CodeFile="WS.aspx.cs" Inherits="WS" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"><title></title> <script src="jquery-1.4.2.min.js" type="text/javascript"></script> <script  type="text/javascript"> $(document).ready(function() { $("#btGetDate").click(function() { //$("#dvDate").html("I am here"); $.ajax({ type: "POST", url: "WebService.asmx/GetDateTime", contentType: "application/json; charset=utf-8", dataType: "json", success: function(msg) { $("#dvDate").html(msg); } }); }); }); </script> </head> <body> <form id="form1" runat="server"> <div> <div id="dvDate"></div><input id="btGetDate" type="button" value="Get Date" /> </div> </form> </body>  

Ajax Date Picker Not working on Chrome

Hi ajax toolkit date picker is not working in latest google chrome browser. it works fine all browsers and earlier version of chrome but it doesnt work latest version. any body know the reason    

Ajax dropdown list not working

Dear All:I just implemented a simple Ajax drop down list. The problem I'm facing is that when I run the project I will not be able to select the values from drop down even though there are 4 values coming in. Here is my code:Default.aspx<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title>Untitled Page</title> <link href="StyleSheet.css" rel="stylesheet" type="text/css" /> </head> <body> <form id="form1" runat="server"> <asp:ScriptManager ID="ScriptManager1" runat="server" /> <div > Name:<asp:DropDownList ID="colorValue" runat="server" OnSelectedIndexChanged="colorValue_SelectedIndexChanged" ></asp:DropDownList> <ajaxToolkit:DropDownExtender ID="DropDownExtender1" runat="server" TargetControlID="colorValue" DropDownControlID="DropPanel" > </ajaxToolkit:DropD

AJAX Extenders not working

hi friends,I am trying to use some ajax extenders features like calendar extender, Textbox Watermark and every extender.It was all working in VS2008. But when from I installed VS 2010 Ultimate, none of them is working. Here is showing no error and no warning but its not working.This is What I am doingFile > New > WebsiteSet Target Platform 3.5 (Because my host does not support 4.0)Choose ASP.NET Website from Templates.(I have already added Ajax Toolkit, downloaded today from codeplex)And this is the code for Default.aspx file<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %><%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"> <title></title></head><body> <form id="form1" runat="server"> <div> <asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager> <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>

Get xhr object in vb.net when error occured in ajax call using JQuery.

Hi Dude,   I have a big problem in Jquery ajax call. I am calling the web service whenever click the update button. I have a separate web service class, in which consist of few methods. When I calling the web service method, I have made the error handling and log the error information in db after that I have to override the "ex" that means error object to XMLHttpRequest. Is it possible to assign the sqlexception to ajax object (xhr) in vb.net? Please help me its much more useful for me.   Thank in advance.

ajax-updateprogress not working in IE-7,8

Im trying to show animated gif file, a small in updateprogress one when aspx page is requesting server.... its working fine in firefox, chrome, but couldnt able to workit out in IE-7, 8. Any ideas? ------------------------------------------------------------------------------------------------------------------------------------------ CODE: <asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="UpdatePanel1"><ProgressTemplate>        <div style="position:absolute; left: 100px;top:10px">           <img src="Images\indicator.gif" alt = ""/>            Contacting server.....       </div></ProgressTemplate></asp:UpdateProgress>---------------------------------------------------------------------------------------------------------------------------------------

Ajax in subdomain not working

I have a website in a hosting service. There is a virtual directory working as a subdomain like "http://subdomain.website.com" .  After working a lot figuring out paths, everything works fine except AJAX. There is no error thrown but the updatepanel, calendar and nothing else works. I does full postbacks. I have tried copying the complete AspNetAjax directory to the root and setting the scriptpath to "http://www.website.com/AspNetAjax/". The web.config contains the assemblies and a tag prefix.Any suggestions will be appreciated !Humberto

Authentication timeout while making AJAX call?

Hi,I tried to take advantage of jQuery AJAX call to enhance user experience but I am facing a tricky problem.When the user does nothing for a period of time, e.g. 30 minutes to reach authentication timeout, making AJAX call becomes the problem. The server side will return login page and display in my target div section. The simplest solution I can think of is to inject a dummy tag in login page, and when detecting such dummy tag then use javascript to redirect to login page. But this means that I have to do that every time I make AJAX call. Is there any more decent way to do that? Regards,Charlie
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend