Link to home
Start Free TrialLog in
Avatar of skillilea
skillilea

asked on

Web timeout: Need to understand what the page is waiting for and if I can stop it.

Running Win Server.
Sql: 2012

My Ajax call is called this way:
param ={....all the fields};


 
   $.ajax({
        type: 'POST',
        url: 'HandleSettingFieldCRUD',
        dataType: 'json',
        contentType: 'application/json; charset=utf-8',
        data: param
    });

Open in new window


My web service is called this way:

        [WebMethod]
        [ScriptMethod(ResponseFormat = ResponseFormat.Json)]
        public bool HandleSettingFieldCRUD(string UserGUID, int LangID, int RegionID, string EGUID, string UpdateValue)
        {
            InnoFinanceDataContext db = new InnoFinanceDataContext();
            db.ps_0XW_HandleSettingFieldCRUD(UserGUID, LangID, RegionID, EGUID,UpdateValue);
            return true;
        }

Open in new window



The Stored procedure runs between 7-20seconds but has no return to the page.

How can I get the page[POST] to not wait for it's return.  (Sorry if that's a dumb question but, I want the AJAX to fire off the update and not care about the return).

tnx in advance
Avatar of Gary
Gary
Flag of Ireland image

AJAX to fire off the update and not care about the return
Thats what AJAX does, it's asynchronous - once it's fired it doesn't wait around.  If there is a post back then your success function would fire but only if there is a post back
Avatar of skillilea
skillilea

ASKER

In the code above I get a "SQL timeout error".  From what I understand the AJAX should not be looking for any response.

I think then the page is timing out but...that makes no sense.

Any ideas?

tnx sk
Where are you seeing the error?
A timeout error happens (SQL timeout) on my web service  and visual studio pops open the linq call behind the WS.

does that help?
From the designer...it fails on something like this.

            
            [global::System.Data.Linq.Mapping.FunctionAttribute(Name="dbo.ps_SNP_HandleSnapshotCRUD")]
            public int ps_SNP_HandleSnapshotCRUD([global::System.Data.Linq.Mapping.ParameterAttribute(DbType="VarChar(50)")] string userGUID, [global::System.Data.Linq.Mapping.ParameterAttribute(DbType="Int")] System.Nullable<int> langID, [global::System.Data.Linq.Mapping.ParameterAttribute(DbType="BigInt")] System.Nullable<long> snapshotID, [global::System.Data.Linq.Mapping.ParameterAttribute(DbType="NVarChar(200)")] string snapshotName, [global::System.Data.Linq.Mapping.ParameterAttribute(DbType="Int")] System.Nullable<int> typeID, [global::System.Data.Linq.Mapping.ParameterAttribute(DbType="Int")] System.Nullable<int> dataTag)
            {
                  IExecuteResult result = this.ExecuteMethodCall(this, ((MethodInfo)(MethodInfo.GetCurrentMethod())), userGUID, langID, snapshotID, snapshotName, typeID, dataTag);
                  return ((int)(result.ReturnValue));
            }
ASKER CERTIFIED SOLUTION
Avatar of Gary
Gary
Flag of Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
So I make it void instead of bool (which  I am doing nothing with anyway)...correct?
Thanks for the help