473,396 Members | 2,011 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Asynchronous web service not getting kicked of.

I have a Web Service which I call ASynchronously. The problem its not
getting kicked off. This is how I am calling it over HTTP and after
calling the webservice I have a redirect to another page. I don't know
if that is allowed.

Here is how I call it on a click of a button.

COASTWebService.DeployService proxy = new
COASTWebService.DeployService();
IAsyncResult result;
result = proxy.BeginBuildPackage(deploymentID,
_currentPageParam.BranchID, null, null);
Session["IAsyncResult"] = result; //I really do not need this
Response.Redirect(string.Format("DeployStatus.aspx ?deployment_id={0}&branch_id={1}",deploymentID,_cu rrentPageParam.BranchID),true);
This is the web service code
namespace Composer.WebUI.COASTWebService {
using System.Diagnostics;
using System.Xml.Serialization;
using System;
using System.Web.Services.Protocols;
using System.ComponentModel;
using System.Web.Services;
/// <remarks/>
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("c ode")]

[System.Web.Services.WebServiceBindingAttribute(Nam e="DeployServiceSoap",
Namespace="http://tempuri.org/")]
public class DeployService :
System.Web.Services.Protocols.SoapHttpClientProtoc ol {

/// <remarks/>
public DeployService() {
this.Url =
"http://localhost/COASTWebService/DeployService.asmx";
}

/// <remarks/>

[System.Web.Services.Protocols.SoapDocumentMethodAt tribute("http://tempuri.org/BuildPackage",
RequestNamespace="http://tempuri.org/",
ResponseNamespace="http://tempuri.org/",
Use=System.Web.Services.Description.SoapBindingUse .Literal,
ParameterStyle=System.Web.Services.Protocols.SoapP arameterStyle.Wrapped)]
public void BuildPackage(int deploymentID, int branchID) {
this.Invoke("BuildPackage", new object[] {
deploymentID,
branchID});
}

/// <remarks/>
public System.IAsyncResult BeginBuildPackage(int deploymentID,
int branchID, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("BuildPackage", new object[] {
deploymentID,
branchID}, callback, asyncState);
}

/// <remarks/>
public void EndBuildPackage(System.IAsyncResult asyncResult) {
this.EndInvoke(asyncResult);
}
}
}
In the redirected page, on the LOAD of page this is what I do. I really
not do this as I constantly keep polling in the DB so I know the exact
state. But its just not happening.

if (Session["IAsyncResult"] != null)
{
COASTWebService.DeployService proxy = new
Composer.WebUI.COASTWebService.DeployService();
result = (IAsyncResult)Session["IAsyncResult"];
if (result.IsCompleted)
{
proxy.EndBuildPackage(result);
}
}

I am new to Async concept so please be easy...

Thanks

Feb 7 '06 #1
0 1081

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Matthew Groch | last post by:
Hi all, I've got a server that handles a relatively high number of concurrent transactions (on the magnitude of 1000's per second). Client applications establish socket connections with the...
0
by: orekinbck | last post by:
Hi There This question is about calling an asynchronous web service from the UI thread. Unless I am making a fundamental error, it appears that the asynchronous web service call seems to spark...
0
by: Jonathan Trevor | last post by:
Hi, I've found what appears to be a bug with ASP.NET web service method invocation - making it impossible to invoke and get the result of a synchronous web call after an asynchronous call has...
1
by: Alexander Kaplunov | last post by:
I have two different scenarios: 1. I have an application that calls a web service and passes an object. Web Service takes that object and does some stuff with it, which could take...
4
by: jim | last post by:
Hi All, I try to make an asynchronous call to a web service method as below under MS visual .NET studio 2003: WebService webSrv = new WebService(); AsyncCallback cb = new...
8
by: Simon Gorski | last post by:
I have a large problem, and I believe there is not yet a way to solve this using IIS and ASP.NET. I hope someone has a solution which we couldn't find. The current situation When a user logs...
33
by: JamesB | last post by:
I am writing a service that monitors when a particular app is started. Works, but I need to get the user who is currently logged in, and of course Environment.UserName returns the service logon...
1
by: jan.loucka | last post by:
I'm developing WinForms application in .NET 2.0 that talks to web service. The automatically generated proxy (reference class) has got methods for both synchronous and asynchronous invocations of...
1
by: jan.loucka | last post by:
I'm developing WinForms application in .NET 2.0 that talks to web service. The automatically generated proxy (reference class) has got methods for both synchronous and asynchronous invocations of...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.