Geeks With Blogs

Server Error in Application An unhandled exception occurred during the execution of the current web request

There are some situations where we call a web service method having return type “void”. It is not good choice to wait for the response because it will not return any thing.

There is “SoapDocumentMethod” attribute having property named “OneWay” which is by default false, means every time client call web method waits for the result. If we set “OneWay” to true then web services return HTTP 202 status to client which indicates to client that web server has started processing the message.


public class SomeClass : WebService



    [SoapDocumentMethod(OneWay = true)]

    [WebMethod(Description = "Some process which return nothing.")]

    public void SomeVoidMethod()


        // some code







ASP.NET Interview Questions | C# Interview Questions | .NET Interview Questions | Dot Net Interview Questions | VB.NET Interview Questions | Oracle Interview Questions Posted on Thursday, November 2, 2006 5:30 AM | Back to top

Comments on this post: Web Methods with return type void

No comments posted yet.
Your comment:
 (will show your gravatar)

Copyright © Mahesh Singh | Powered by: