Solved

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

Posted on 2014-09-05
8
188 Views
Last Modified: 2014-09-15
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
0
Comment
Question by:skillilea
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
8 Comments
 
LVL 58

Expert Comment

by:Gary
ID: 40306701
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
0
 

Author Comment

by:skillilea
ID: 40307632
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
0
 
LVL 58

Expert Comment

by:Gary
ID: 40307639
Where are you seeing the error?
0
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 

Author Comment

by:skillilea
ID: 40307834
A timeout error happens (SQL timeout) on my web service  and visual studio pops open the linq call behind the WS.

does that help?
0
 

Author Comment

by:skillilea
ID: 40307839
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));
            }
0
 
LVL 58

Accepted Solution

by:
Gary earned 500 total points
ID: 40307840
If you don't want any response then you need to make sure your web service is not sending any, even when there is a problem.
VS is just reporting the result of the ajax call, doesn't have any effect on the page.
0
 

Author Comment

by:skillilea
ID: 40308326
So I make it void instead of bool (which  I am doing nothing with anyway)...correct?
0
 

Author Closing Comment

by:skillilea
ID: 40324349
Thanks for the help
0

Featured Post

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question