Classic .NET : Make Multiple Async Calls, Return When All Complete?
Sep 14, 2010
I need to gather information (via GET) from several other websites (not under my control), do some processing (specific to each source) on the data returned, and then print all the info out to the user.
Right now I'm making the GET request to website A, waiting for it to return, processing it, then calling website B, and so on... Obviously this is too damn slow. I'd like to make async requests to A, B, and C, then process each response as it comes back, and once I have all the responses, print it all out to the user.
I'm allowed to use classic asp or vb.net. I'm more familiar with classic asp but I'm willing to learn...
View 2 Replies
Similar Messages:
Nov 19, 2010
I am trying to make 2 separate AJAX calls using buttons. What I want to happen is: when Button1 is clicked ProductsTable shows data from the webservice; when Button2 is clicked OthersTable shows its own data from the webservice. But right now, when either button is clicked, nothing shows up. I know the code works if there's only one of them and it's not wrapped around a .click function.
No error messages. ASP.NET 4.0, JQuery 1.4.4. Not using ScriptManager. Not using UpdatePanels.
Code below:
[Code]....
View 3 Replies
May 7, 2015
$.ajax({
type: "POST",
url: "./InActiveMerchantList.aspx/LoadStakchart",
[Code]....
View 1 Replies
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
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
Jun 2, 2010
I have site that I need to have a vendor send an Http Post to us, using querystring parameters, then I have to look up some data and return a few results and parameters back to them. Can this be done using CLASSIC ASP? I ask this because I am still in a learning phase with .NET and have limited resources available to set up a web service.
View 2 Replies
Jan 28, 2011
I have create a table and create edmx file, and I create a Stored Procedure that return a single row (select by primary key), and I want the edmx to have a function that calls that SP and return a type.
View 1 Replies
May 22, 2010
I want to provide status updates during a long-running task on an ASP.NET WebForms page with AJAX.Is there a way to get the ScriptManager to execute and process a script for a web service request concurrently with an async postback? I have a script on the page that makes a web service request. It runs on page load and periodically using setInterval(). It's running correctly before the async postback is initiated, but it stops running during the async postback, and doesn't run again until after the async postback completes.
View 3 Replies
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
Dec 11, 2010
Say I have 2 UpdatePanels on the page and each UpdatePanel has a one server Button each. When I click on the first button and then the second button and look in Firebug, I see that the 2nd async postback is not triggered until the first one completes.
Is this working as expected? My understanding was with AJAX postbacks, the event handlers for the buttons trigger simultaneously.
View 1 Replies
Nov 14, 2010
How do I go about making true ajax requests to an asp.net page? (Not update panels). I read this tutorial but couldn't get it working. Is there a better approach? Or should this work?
[URL]
View 2 Replies
Mar 24, 2014
function addToFavorites(prod, box) {
var favPage;
var response;
if (box.checked == true) {
favPage = "xyz.aspx?type=add&product=" + prod;
} else {
favPage = "xyz.aspx?type=remove&product=" + prod;
[Code] ....
I am using the above javascript to call a page on check box click.It is working fine on my visual studio project.
But when i deploy that it is not working.javascript is calling but not able to call that page.
I am using visual stuido 2008 / 3.5 as my development server.
View 1 Replies
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
May 12, 2010
I am currently building an asp.net webforms application in ASP.NET C# using Visual studio 2008 and the Framework .NET 3.5.In my application main page, I use some javascript code to make AJAX calls to different handlers (.ashx files) in order to get some information.In this handlers définition (in the CodeBehind), I use the Oracle provider for .NET (Oracle.DataAccess.Client) to get the requested information from an Oracle database.The thing is, when I make a first call to one of these handlers, everything works just fine, but when the main page try to repeat the call in order to update the information requested, I encounter a problem.In fact, it appears that the different Oracle SQL request results that were made during the first call are still in memory and that the requests are not repeated correctly in order to obtain the updated information from the database. The application keeps the first results and this is these results that are sent back to the main page once again.I don't know how to force the handler to obtain new results and work with it instead of working with the previous results.In the handlers définition, the IsReusable methods are all set to false.I have called the Dispose() méthods of every Oracle object at the hand of the handlers définition and then the System.GC.Collect() méthod to force Garbage Collection. But this does not seem to be sufficient to be sure that nothing is kept in memory.
View 3 Replies
Feb 28, 2010
What best synchronization feature should I use in my asynccontroller action? [calling while(OutstandingActions > 0) is not an option)],
a. Async fetch 3 items from data service in parallel,
b. synchronize.
c. compute a value using the 3.
d. async save all 3 results to data service in parallel.
e.synchronize.
f. finish
View 9 Replies
Jan 12, 2010
I am having a problem with users clicking submitting pages multiple times. What is happening is a user will click a link, if nothing happens in .025 seconds they click another link or menu item, etc. I handle users clicking the back button and the impatient user winds up getting directed to my "Dont click the back button" page even though they dont click the back button.
I need to prevent mutiple submits by disabling all submit controls on my pages. I dont have a single submit button, i have pages with menus, gridviews, yada yada that all need to get turned off.
I have pages that use update panels and pages that dont. All my pages inherit from a BasePage class. I would like to solve this problem by implementing the solution in my BasePage class.
I did a little research and found this little script that works for synchronous postbacks:
[Code]....
View 12 Replies
Aug 12, 2010
I'm trying to create a modal popup that has multiple buttons that a user will click to choose options. This is all well and good but when the user clicks an option it fires a full postback. The modal opens async, but I can't get it to hide async. Heres some code:
[Code]....
View 2 Replies
Oct 31, 2012
I am developing a movie database, in that i have autpcomplete with image feature for the users to search film titles. In that when the text box suggests the film titles with image if the user clicks the film title the title text is copied into the text box and if we click the search button then only it is redirecting to another page, my requirement is when the suggestion comes and if the user clicks a particular suggestion the page has to be redirected to another page and there i have written code to fetch details of the film from the database. I have used web service and the code is
<%@ WebHandler Language="C#" Class="Search_CS" %>
using System;
using System.Web;
using System.Data.SqlClient;
using System.Configuration;
using System.Text;
public class Search_CS : IHttpHandler {
[CODE] ...
View 1 Replies
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
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
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
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
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
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
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