Solved

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

Posted on 2014-09-05
8
191 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
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 

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

Business Impact of IT Communications

What are the business impacts of how well businesses communicate during an IT incident? Targeting, speed, and transparency all matter. Find out more in this infographic.

Question has a verified solution.

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

In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
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

688 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