Which type of exception will be caught?

You are creating an ASP.NET application named MyWebApp. To MyWebApp, you add a Web reference to an XML Web service named UserService.

UserService consists of a Web method named RetrieveUserInfo. This Web method takes a user ID as input and returns a DataSet object containing user information. If the user ID is not between the values 1 and 1000, a System.ArgumentException is thrown.

In MyWebApp, you write a try/catch block to capture any exceptions that are thrown by UserService. You invoke RetrieveUserInfo and pass 1001 as the user ID.

Which type of exception will be caught?

You are creating an ASP.NET application named MyWebApp. To MyWebApp, you add a Web reference to an XML Web service named UserService.

UserService consists of a Web method named RetrieveUserInfo. This Web method takes a user ID as input and returns a DataSet object containing user information. If the user ID is not between the values 1 and 1000, a System.ArgumentException is thrown.

In MyWebApp, you write a try/catch block to capture any exceptions that are thrown by UserService. You invoke RetrieveUserInfo and pass 1001 as the user ID.

Which type of exception will be caught?

A.
System.ApplicationException

B.
System.ArgumentException

C.
System.Web.Service.Protocols.SoapException

D.
System.Web.Service.Protocols.SoapHeaderException



Leave a Reply 0

Your email address will not be published. Required fields are marked *