C# - Multiple Calls To The Same Web Service Blocking?

Nov 18, 2010

We have a page that makes a request to a 3'rd party web service. When under heavy load this response time extends significantly, however the 3'rd party reports back that there times for processing remains constant. There timings show that from the time they receive a request to the time they send it back is always around 1.5-2.0 seconds. Now we are experiencing wait times of over 20 seconds. My understanding of ASP.NET is that each request will run on a IIS thread pool thread and make the request to the 3'rd party service return and process. So I don't really understand what could be blocking on our end. Is there something I am missing?? Is there a threshold limit beyond IIS that is blocking?

If I am missing something a physical book recommendation that covers this subject would also be a very welcome addition to any answer.

View 2 Replies


Similar Messages:

Multiple Webservice Calls / Some Of Its Calls Are Duplicated (with Difference Of Milliseconds)

May 10, 2010

I have a webservice (ASP.NET) deployed on a webfarm. A client application consumes it on daily basis. The problem is that some of its calls are duplicated (with difference of milliseconds). For example I have a function Foo(string a,string b). The client app calls this webmethod as Foo('test1','test2') once but my log shows that it is being called twice or sometimes 3 or 4 times randomly. Is this anything wrong with the webfarm or the code? Note that the webmethod has simple straighfarward insert and update statements.

View 1 Replies

Forms Data Controls :: Details View - Blocking Multiple Clicks When Updating?

Mar 12, 2010

I have a problem that is driving me insane. I have a simple detailsview that operates as you would expect a detailsview to do - the only difference being that in the updated event I send an email to various people to advise of detail changes (I have conditional testing to do this).

The problem is that if the user goes crazy with left clicking the update button, email recipients can receive multiple duplicate emails.

I have looked all over the net and seen many varied solutions for this problem - mainly using javascript - but none of them seem to be able to block multiple clicks without disabling or hiding the update button - which obviously causes issues with client side validation in the event that information is missing or incorrect.

View 4 Replies

Storing Last 10 Web Service Calls?

Feb 18, 2010

I have a SOAP web service and I'm trying to figure how to save/log the last 10 requests for each user. Each user is required to send their user/pass in each request, so it's easy to know who the request originated from. With these last 10 requests saved, my goal is to develop some sort of page that will allow them to log-in with their credentials and view the raw request, the actual SOAP message, http header information, and anything relevant that I can think of.

The point is to allow people to troubleshoot their own connection issues instead of having to contact me each time they can't connect, have trouble formatting their request, etc....

My first thought was to store all this information in memory in a hashtable or something, but that may have scalability issues when we have hundreds/thousands of users hitting the web service.

We could use our database to store these requests. Instead of hitting the database each time, I may need to create some "buffer" mechanism that will only update the database after the buffer gets to a certain number of requests. Is there an existing library or mechanism that will do this?

We can't store these requests on the file system on the machine hosting the web service. Since these requests can potentially contain sensitive information, it's a business decision that I'll need to work around. Or maybe there's a better way to achieve what I'm trying to do?

View 2 Replies

C# - Synchronicity Of Web Service Calls

Jul 29, 2010

Are web service calls synchronous or asynchronous by default? How is synchronicity determined, by the service or by the client?

I have code similar to the following:

try
{
string result = MakeWebServiceCall_1(); // this is a third party webservice
[code]....

In the above, SetStatus is writing to the same tables that the third party web services read from. If I change the status before both web service calls have completed, it's going to make a big mess and I'm going to get fired. How do I know/ensure that the webservice calls are synchronous?

View 1 Replies

VS 2008 - Log Web Service Calls

Nov 12, 2011

I've got a web app running with purely web services like these:

Code:
<WebMethod()> _
<ScriptMethod(ResponseFormat:=ResponseFormat.Json, UseHttpGet:=False)> _
Public Function EditService(ByVal toddtype As String _
, ByVal fromddtype As String _

[Code] ....

And I want to log each web service call. I don't want to bother my database with this log - I would prefer to have the web app log to a text file on the web server itself.

How would I open and access a log file like this from a bunch of web services? Does web app still have application startup like events???

View 1 Replies

Make API Calls To A Service Provider?

Sep 23, 2010

I'm trying to make API calls to a service provider. I've never tackled JSON requests before but I want to give it a go - as they seem less verbose than XML. Could someone be kind enough to give me a simple example here?

My confusion stems from some libraries I've come across. Do I need to add any libraries to my project? Or is it just a matter of creating a string that complies with JSON syntax and send it via a WebRequest?

View 3 Replies

How To Keep Session Alive Between Two Calls To A Web Service In A C# Application

Oct 5, 2010

This is quite straight forward. I'm calling a web-service (.asmx, with session enabled) from a c# application. I want each call to be with the same session key as the previous one (as opposed to creating a new session key each time).

Here's my (nothing-out-of-the-ordinary) code:

[Code].....

View 3 Replies

AJAX :: Use AutoCompleteExtender Control Without Web Service Calls?

Apr 17, 2010

I am successful in using the AutoCompleteExtender control by make use of web serivces as the data source (ServiceMethod) to the extender control. My question is do we have any way in assining a code behind method as data source to this control.

removing the ServicePath url and assiging code behind method to ServiceMethod attribute will resolve the issue.

View 4 Replies

C# - WCF Service Calls Always Fail After 30 Seconds With (502) Bad Gateway?

May 4, 2010

We have a WCF service (BasicHttpBinding) which will always fail after 30 seconds. Calls under 30 seconds complete without error. Anything over 30 seconds will fail with a 502 Bad Gateway exception:

System.Net.WebException: The remote server returned an error: (502) Bad Gateway.

But yet the WCF call continues to run in the background (and will eventually complete). We have confirmed that the BasicHttpBinding - Binding - sendTimeout (in web.config) is greater than 30 seconds (actually set to 5 minutes). We confirmed this both on the client and the server.

Here is the full stack trace:

System.ServiceModel.ProtocolException: The remote server returned an unexpected response: (502) Bad Gateway. ---> System.Net.WebException: The remote server returned an error: (502) Bad Gateway.
at System.Net.HttpWebRequest.GetResponse()
at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)

[Code]....

where this 30 second "timeout" is coming from or why a 502 Bad Gateway error is returned?

SOLUTION: We are using the IIS7 Application Request Routing Module which has Proxy settings of its own. The Proxy settings have a default timeout of 30 seconds. Increasing this to 600 seconds (10 minutes) solved our problem. The Bad Gateway error is not completely correct but WCF Trace Viewer (see answer) helped see that the problem was not the service itself but an issue in between the client and the wcf service.

View 1 Replies

AJAX :: Stop 2 Asynchronous Web Service Calls?

Nov 22, 2010

We have a custom Ajax checkbox control. In that control we set value (from inside the control) via a web service call (say WSCall1) to the business engine. There is also an event exposed on the OnClick of checkbox for the end user to have their custom code where the end user have their own web service call (say WSCall2). This event that end users will write is handled inside the ajax checkbox control on the "OnSuccess" of the internal web service call (i.e WSCall1) with an expectation that if WSCall1 succeeds, WSCall2 will get executed. This works fine with Firefox and Chrome but not in IE. In IE sometimes WSCall2 gets executed first and then WSCall1 -- actually there is no gurantee which web service gets called first. For WSCall1 we have used " Sys.Net.WebServiceProxy.invoke"

Is there a way we can make sure that WSCall2 gets only executed on the "OnSuccess" of WSCall1? Isn't the OnSuceess supposed to be executed when the WSCall1 thread returns?

View 1 Replies

Using Both Post And GetAjax Calls For The Same WebMethod In ASMX Web Service

Jan 20, 2010

I can't seem to call a web service method from Ajax with both POST and GET.

Initially only the POST would work and GET would causes this error:


{"Message":"An attempt was made to call the method u0027getDatau0027 using a GET request, which is not allowed.","StackTrace":" at System.Web.Script.Services.RestHandler.GetRawParams(WebServiceMethodData methodData, HttpContext context)at System.Web.Script.Services.RestHandler.ExecuteWebServiceCall(HttpContext
context, WebServiceMethodData methodData)","ExceptionType":"System.InvalidOperationException"}

I fixed that by adding this attribute: [ScriptMethod(UseHttpGet=true)] but now GET causes this error:

[code]....

So is it true that you can only use either POST or GET and not both from Ajax?

View 3 Replies

Adding Custom Perfomance Counters In Service Calls?

May 26, 2010

I have to show the time taken for a service call in Perfmon from my ASP.Net application. For this, I have added a stopwatch which starts at the service call start and stops at service call stop. Now I have a custom counter which user AverageTimer32 to log the stopwatch values to Perfmon. My question is, how can I show the service names on the Perfmon graph. I am using windows XP (I know windows server perfmon has some fancy stuff).

View 1 Replies

How To Configure A WCF Service That Calls Other Services Behind A Load Balancer

Sep 3, 2010

I haven't deployed behind a load balancer before. My customer has a WCF service built and tested on servers using a service model configuration that is relatively straightforward. It provides a service to return an image of a map for another application. To get the map, it calls other services.

The service was built in Visual Studio 2010 targeting the 3.5 framework. The customer is using IIS 7.5 and an F5 load balancer. When moving to the production server, the Web.config was changed to add the load balancer behavior and specify the endpoint to show the physical and logical address of the service:

[Code].....

There was a problem when the service was deployed to a server behind the load balancer. When I try to call the service from WCFStorm or WebServiceStudio I get the message "The provided URI scheme 'https' is invalid; expected 'http'.

The endpoints for the service itself look right to me. However in the development and testing versions of the config, the client section uses http instead of http, while on the production servers it uses the load balancer's https address. This seems like it should be obvious, but we're missing it.

View 1 Replies

C# - How To Retain Sessions Across Calls To Web Service From A Soap Client

Sep 14, 2010

Here is how my system is set up:

A web service using ASP.Net web service The web service has a web method with EnableSession=true
A client which refers to the web service using "Service References" (note: not "Web References")
The app.config of the client has allowCookies=true

[Code].....

The call to AppendUpload returns false, because of the mismatching session ids. Why is that?
As far as I can see, I have the right attributes for the web method, the client has the correct config, and the same instance of the proxy is used.

View 1 Replies

How To Separate Business Logic And Database Calls From A WCF Web Service

Jun 3, 2010

This question may have been asked before, but I'm looking for a different answer than what I've seen.

Our website is in ASP.NET and we use the model-view-presenter pattern to get business logic out of the markup codebehind.

Is there an accepted pattern for web services for getting business logic out of the codebehind? It seems like putting the logic in a 'presenter' is misleading since the calls don't really present anything to the user, and may not even send back data to the client.

View 1 Replies

Speed Up A Web Service For Auto Complete And Avoid Too Many Method Calls?

Jun 11, 2010

So I've got my jquery autocomplete 'working,' but its a little fidgety since I call the webservice method each time a keydown() fires so I get lots of methods hanging and sometimes to get the "auto" to work I have to type it out and backspace a bit because i'm assuming it got its return value a little slow. I've limited the query results to 8 to mininmize time. Is there anything i can do to make this a little snappier? This thing seems near useless if I don't get it a little more responsive.

[Code].....

View 5 Replies

How To Make Calls To A WCF Service With Jquery Ajax From An SSL- Secured Page

Jun 6, 2010

I have a WCF service returning JSON to jQuery ajax calls and presenting the results on an ASPX page. When the page is NOT under SSL, the ajax calls work perfectly. When the page IS under SSL, the calls fail. I understand that this behavior must be due to the Same Origin Policy (SOP).

So, how do I setup my WCF service to accept calls from an SSL-secured page? Does the WCF service also need to be secured? If so, how do I do this?

View 3 Replies

Web Forms :: Updating Client Side Controls Asynchronously From Service Calls

Oct 8, 2010

I am trying to update client side controls asynchronously with information from a service.

The service I am using has a callback delegate that points to the users web page (server side)

I would like to update information on the page that is initiated by another users also consuming the same service. exactly like a chatroom.

I am trying to use an update panel, and call updatepanel.update() (server side) once I recieve the information from the service. basically: how do I partially update control data from the server side so that client side can see it.

View 1 Replies

Are There Any Transactions Around Multiple Webservice Calls

Mar 31, 2011

Are there any transactions around multiple webservice calls.Let me start with a commonly used example -- the travel agency. A customer intends to create a travel plan through an online travel agency. To do this, the online travel application calls the following three Web services:

-Air ticket booking
-Hotel reservation
-Taxi reservation

These three services are available from three separate vendors. If any one of these three services fails, the customer does not wish to proceed with the transaction (again, either all three services must succeed or none at all).My language programming is Asp.net c#.

View 1 Replies

Transactions Around Multiple Webservice Calls?

Apr 4, 2011

Are there any transactions around multiple webservice calls?but in ASP.net forum I got the answer below:

http://jalpesh.blogspot.com/2010/05/using-transactions-with-linq-to-sql.html it's offering system.transaction.

View 2 Replies

C# - Linq To Sql Making Multiple Calls In .net Mvc 3

Mar 18, 2011

When I am updating a record with linq to sql my DeleteLesson() method is getting called multiple times.My controller looks like this :

public ActionResult Delete(int id)
{

deleteLesson(id);[code]....

EDIT.also if I use confirm = "Do you want to delete" in ajax options I will have to click okay three times.

View 1 Replies

Multiple Ajax Calls From Same Page

Aug 31, 2014

on my page I've to check if the UserName is available and sponsor code is correct. For that I'm using ajax call for both.

Code:
Sponsor User Name   <span id = "mesg"></span><asp:TextBox ID="txtSpUserName" runat="server" CssClass="DropText" onblur ="ShowAvailability()"></asp:TextBox>
Login Name <span id="Login"></span><asp:TextBox ID="txtLoginName" runat="server" CssClass="DropText" onblur ="ShowLoginName()"></asp:TextBox>

[code]....

Why they are not giving separate results?

View 2 Replies

Will Transactionscope Work Over Multiple Calls To Different Services

Jun 18, 2010

I'm writing some merge functionality in C# asp.NET MVC2. I am also using using Linq2SQL.

I have a block of code which calls two services, MessageService and UserService. These both in term call their appropriate repositories and make the amendments to the db. Each repository declares it's own instance of the repository so I'm thinking this will escalate the following code to DTC . The code is called from the AccountService, is this going to work at this level? And also is it bad practise to declare the DataContext at the top of every repository or should I pass the object around somehow?
//Run the merge
try
{
using (TransactionScope scope = new TransactionScope()) [code]....

View 2 Replies

Multiple WCF Calls For A Single .NET Page Load?

Apr 30, 2010

I have an existing asp.net web application I am redesigning to use a service architecture. I have the beginnings of an WCF service which I am able to call and perform functions with no problems. As far as updating data, it all makes sense. For example, I have a button that says Submit Order, it sends the data to the service, which does the processing.

Here's my concern: If I have an ASP.NET page that shows me a list of orders (View Orders page), and at the top I have a bunch of drop down lists for order types, and other search criteria which is populated by querying different tables from the database (lookup tables, etc). I am hoping to eventually completely decouple the web application from the DB, and use data contracts to pass information between the BLL, the SOA, and the web app. With that said, how can I reduce the # of WCF calls needed to load my "View Orders" page? I would need to make 1 call get the list of orders, and 1 call for each drop down list, etc because those are populated by individual functions in my BLL.

Is it good architecture to create a web service method that returns back a specialized data contract that consists of everything you would need to display a View Orders page, in 1 shot? Something like this pseudocode:

public class ViewOrderPageDTO
{
public OrderDTO[] Orders { get; set; }[code].....

Or is it better practice in the page_load event to make 5 or 6 or even 15 individual calls to the SOA to get the data needed to load the page? Therefore, bypassing the need for specialized wcf methods or DTO's that conglomerate other DTO?

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved