.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Post New Web Links

WebMethod call won't return ASAP. Seems blocked by other iframe call.

Posted By:      Posted Date: October 22, 2010    Points: 0   Category :ASP.Net
 

XP Pro,aspnet 2, IIS, Oracle

I have a primary webpage that displays a tab and some summary data. The tab uses an iframe and the summary data is loaded by an async WebMethod call back to C#. The iframe page takes a short while to load depending on how much data is in there (sometimes upto 20 seconds?). The WebMethod call, or at least the content of it, is very fast. BUT, the WebMethod call won't return until basically the iframe has finished loading.

I've verified through Fiddler that the browser is initiating both requests at basically the same time. It's initiating the iframe call first followed immediately by the WebMethod call within the same second. My understanding is that browsers are limited to only two calls at once.

If I set a breakpoint at the end of my WebMethod call (even commenting out ALL it's guts so it just returns an empty string), that breakpoint won't fire until the aspnet page serving up the iframe has finished. Using threads window, I see both calls at the server. I just don't understand why the server won't actually run the Webmethod call until the first call has finished. I've searched the code looking Monitor.Enter, lock, etc to make sure nobody has inserted any other type of blocking code and I can't find anything. I've basically emptied out the WebMethod call and it just returns


View Complete Post


More Related Resource Links

InvalidOperationException error with jquery call to webmethod

  
Hi, I'm having an issue which results in returning the following from XHR requests to an webmethod on my form. {"Message":"Authentication failed.","StackTrace":null,"ExceptionType":"System.InvalidOperationException"}Simplified form Code is as follows. [WebMethod]        public string LoadContact()        {            return string.Format("Hello From Server");        }I'm using JQuery to make the call: $.ajax({            type: "POST",            url: "SYS_AjaxResearch.aspx/LoadContact",            data: "{}",            contentType: "application/json; charset=utf-8",            dataType: "json",            success: function(msg) {                $("#topPanel").text(msg.d.LoadContact);   

Multiple call to same webmethod in same call.. Urgent help

  
INFO: IIS 7+ .NET 4.0 I have a webservice with a webmethod [WebMethod] public string InsertUpdateCategory(string Language, int Parent, int Id, string Name, bool DeleteOnWeb)   I call it with<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"> <soap:Header/> <soap:Body> <InsertUpdateCategory xmlns="hidden"> <Language>EN</Language> <Id>5</Id> <Parent>0</Parent> <Name>TrÃ¥d EN</Name> <DeleteOnWeb>true</DeleteOnWeb> </InsertUpdateCategory> <InsertUpdateCategory xmlns="hidden"> <Language>EN</Language> <Id>6</Id> <Parent>0</Parent> <Name>Ting to</Name> <DeleteOnWeb>true</DeleteOnWeb> </InsertUpdateCategory> </soap:Body> </soap:Envelope> But the "InsertUpdateCategory" only execute the last part of the call specified (the one with Id 6), the first don't get executed

Getting "401 Unauthorized" error with jquery call to webmethod

  

Hello folks,

I have been struggling to get my jquery call to a webmethod to work. I am being bounced by the server with a "401 Unauthorized" response. I must have an incorrect setting in the web.config or somewhere else that would be preventing a successful call.

Your

WCF async call return a 10054 error: "An existing connection was forcibly closed by the remote host"

  

Hello!

I have a WCF consumed by a Windows Mobile 5.0 or above application with .NET Compact Framework 2.0 SP2 and C#.

When the application consume a asynchronous "method" it throws that message. This is also the stackTrace of inner exception:

at System.Net.Sockets.Socket.ReceiveNoCheck()
at
System.Net.Sockets.Socket.Receive()
at
System.Net.Connection.Read()
at
System.Net.HttpWebRequest.fillBuffer()
at
System.Net.HttpWebRequest.getLine()
at
System.Net.HttpWebRequest.parseResponse()
at
System

resolving type information of webmethod object parameters from non .NET client call

  

Hi,

I have a asmx web service that has exposed my Product and Order object.


I've a non .NET client that builds their own Product and Order classes using SOAP libraries.


Now, in my web serivce, i've a web method SaveEntity(object[] entities) where the entities array holds Product or Order or both objects it receives from non .NET client. 


Now, I need to extract the type information for each of the entities inside the object[] array. The first choice is object.GetType(). But my question is: is it guaranteed that object.GetType would return the exact type information (Product or Order for this instance)? 


Thanks in advance


HOW TO CALL WEBMETHOD ASYNCHRONOUSLY from asp.net page (VB code)

  

I have a asp.net (.aspx in vb code) page and that needs to access  remote web service Asynchronously.

I have a following webmethod available in the remote web service:

<WebMethod(MessageName:="get_output_information")> _

 Public Function get_output_information (ByVal tran_id As Object) As DataSet

        Try

            'do some code here

            Return ds1

        Catch ex As Exception

            Throw New soapException("An Error occurred while processing output information.",SoapException.ClientFaultCode)

        End Try

    End Function

 

MY Question is "HOW TO CALL ABOVE WEBMETHOD ASYNCHRONOUSLY?"

 

 


call JavaScript that has Return Value to C# (.cs File)

  

hai guys...i got trouble with javascript , please help me up to solve this problem

i have a javascript to check is client file exist in the client folder like this : 

function FileExists(strURL) {
    var x = new ActiveXObject("Scripting.FileSystemObject");
    return  x.FileExists(strURL);
}

this function will call in server side , but im getting trouble how to call that function in server side , some function in cs will consume that js function before loading image , so that function will check in the client file the file exist or not , if exist i will load the image from the local file

please help me guys....thx for ur help


regards angela.


How to save return value from store procedure in ssis and use that value to call another store proce

  

I have bunch of store procedures and each procedure is depend on previous procedure's return value.I am using Execute Sql task to call store procedure.I don't have any input parameters,just simple select statement.I want to save the return value from that store procedure into variable and use that value to call another store procedure.

Can someone help on this...

Thanks in advance..


Call Function return as Enum on the WCF

  

Hi all,

i am having problem on the WCF function return with Enum

 

For example as below:

<OperationContract()> _

Function CanLoadPage(ByRef DynRec as Datatable,Byval Transstring as string) as resultstatus

resultstatus actually is public enum.

 

How can i pass this enum back to client?

 

Thanks

 

Regards,

Bryan Tan


Webservice whose webmethod has to call a window's service and get back the results

  

I have a question which might be a beginner's question in .Net.

I have a webservice whose webmethod has to call a window's service and get
back the results.


What is the best way to implement this scenario.

I am adding reference to this windows service as an exe and i could not figure out a
way call its methods from webservice.

Please help me with a speedy reply

 Thanks in advance

Charpman

call JavaScript - jQuery code from ASP.NET Server-Side

  
jQuery got so close to me lately that I can see myself adding the scripts to my project almost unconsciously. The thing is, jQuery is very useful for me, in almost all situations and it has been a do or die enhancement for all my project since I first put my hands on it.

Of course while using it, you encounter few situations which need a bit of research to solve, mostly when you are trying to combine it with some other technologies like: UpdatePanels and ASP.NET Ajax. For instance there are many situations when I would like to run some jQuery magic based on some decision that I make on the server side.

Using jQuery to directly call ASP.NET AJAX page methods

  
Here I am looking to explain how to call page methods using jQuery. Using jQuery to directly call ASP.NET AJAX page methods

call JavaScript - jQuery code from ASP.NET Server-Side

  
jQuery got so close to me lately that I can see myself adding the scripts to my project almost unconsciously. The thing is, jQuery is very useful for me, in almost all situations and it has been a do or die enhancement for all my project since I first put my hands on it.

Of course while using it, you encounter few situations which need a bit of research to solve, mostly when you are trying to combine it with some other technologies like: UpdatePanels and ASP.NET Ajax. For instance there are many situations when I would like to run some jQuery magic based on some decision that I make on the server side

How to call an .exe file in .net

  
Sometimes a developer has to call an EXE from another EXE. While calling EXE there can be a requirement to pass parameter.

Call MOM: Instrument and Monitor Your ASP.NET Apps Using WMI and MOM 2005

  

The current version of Windows Management Instrumentation (WMI) satisfies many current and future manageability requirements. In this article Michael Jurek demonstrates how WMI provides important system management capabilities and develops a WMI-aware monitoring solution you can use to instrument your ASP.NET applications. He then introduces the capabilities of MOM 2005 that allow you to monitor these instrumented applications.

Michael Jurek

MSDN Magazine September 2005


Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend