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