Sign in to follow this  
Followers 0
Girish Dubey

asynchronous Call a WebService in .net 4.0

1 post in this topic

I am trying to call a web service asynchronous in .net 4.0. I mean i don't want any kind of response from service side. I just want to execute a web method.

can you suggest me how i can call?

 

 

 

Service Code:

 

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;


namespace UILAYER.Service
{
    /// <summary>
    /// Summary description for TestService 
    /// </summary>
    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [System.ComponentModel.ToolboxItem(false)]
    // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. 
    //[System.Web.Script.Services.ScriptService]
    public class TestService : System.Web.Services.WebService
    {


        int Message = "success||Record has been updated.";


        [WebMethod]
        public object ExecuteProcessRawRunches()
        {
            try
            {
                if (Message.ToLower().StartsWith("success||"))
                {
                    return new { Result = "OK", Records = Message };
                }
                else
                {
                    return new { Result = "ERROR", Records = Message };
                }
            }
            catch (Exception ex)
            {
                return new { Result = "ERROR", Message = ex.Message };
            }
        }
    }
}

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0