Solved

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

Posted on 2014-09-05
8
168 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
  • 5
  • 3
8 Comments
 
LVL 58

Expert Comment

by:Gary
Comment Utility
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
Comment Utility
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
Comment Utility
Where are you seeing the error?
0
 

Author Comment

by:skillilea
Comment Utility
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
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 

Author Comment

by:skillilea
Comment Utility
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
Comment Utility
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
Comment Utility
So I make it void instead of bool (which  I am doing nothing with anyway)...correct?
0
 

Author Closing Comment

by:skillilea
Comment Utility
Thanks for the help
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Introduction Got endorsements from your clients?  Great!  There is almost nothing better than word-of-mouth advertising.  But how can you do that on the internet?  Sure you can make a page for endorsement quotations and list them all, but who is …
To properly understand GitHub, let’s divide it into two words ‘Git’ and ‘Hub’. Git is basically a ‘Distribution Version Control’ (DVC) and ‘Source Code Management’ (SCM) system widely used by software programmers while Hub means the efficient centre…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Via a live example, show how to shrink a transaction log file down to a reasonable size.

762 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now