?
Solved

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

Posted on 2014-09-05
8
Medium Priority
?
193 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
Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

 

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 2000 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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
It is possible to export the data of a SQL Table in SSMS and generate INSERT statements. It's neatly tucked away in the generate scripts option of a database.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Suggested Courses

770 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