Hi, I am calling a ASP.NET webservice which is marked as one-way. I wrapped the code that calls the web service in a try catch block, but it is not catching the exceptions thrown by the web service. when I test the webservice separately by entering the url in the browser, it throws an error, but the exception is not sent to the calling code for some reason. here is the sample code
/// <summary>
/// Summary description for WebService
/// </summary>
[WebService(Namespace = "http://mycompany.com/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[ToolboxItem(false)]
public class TestWebService : System.Web.Services.WebService
{
[SoapDocumentMethod(OneWay = true)]
[WebMethod(Description="Start a long running process.")]
public void LongRunningProcess()
{
//do some long process
}
}
//calls proxy class method
TestWebService testWebService = new TestWebService();
testWebService.Timeout = Timeout.Infinite;
testWebService.Credentials = CredentialCache.DefaultCredentials;
testWebService.Url = <url> //the web service url
testWebService.LongRunningProcess()
any help would be appreciated.