Server Error in Application

An unhandled exception occurred during the execution of the current web request
posts - 60 , comments - 75 , trackbacks - 50

My Links

News

Archives

Post Categories

ASP.NET

Web Methods with return type void

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

    }

 

}

 

http://msdn2.microsoft.com/en-us/library/system.web.services.protocols.soapdocumentmethodattribute.oneway.aspx

 

Cheers!!!

Mahesh


ASP.NET Interview Questions | C# Interview Questions | .NET Interview Questions | Dot Net Interview Questions | VB.NET Interview Questions | Oracle Interview Questions

Print | posted on Thursday, November 2, 2006 5:30 AM |

Feedback

No comments posted yet.
Post A Comment
Title:
Name:
Email:
Comment:
Verification:
 

Powered by: