WCF Interview Questions Part_3

Previous Questions

7) What is a service contract, operation contract and Data Contract?
Ans)
ServiceContract :
ñ Describes which operation client can perform on the services
ñ Indicates that an interface or a class defines a service contract in a application
operation contract:
ñ Indicates that a method defines an operation that is part of a service contract
Data Contract :
Defines which data type are processed to and from the services, It provides built in contract for implicit type
----------------------------------------------------
8)In WCF, "wsHttpBinding" uses plain unencrypted texts when transmitting messages and is backward compatible with traditional ASP.NET web services (ASMX Web Services) ?
Ans)
Select from following answers:

True
False
Not Aware

False

"wsHttpBinding" is secure (messages are encrypted while being transmitted), and transaction-aware. However, because this is a WS-* standard, some existing applications (for example: a QA tool) may not be able to consume this service. Hence, it is not completely backward compatible.
------------------------------------------
9) Why in WCF, the "httpGetEnabled" attribute is essential ?
Ans)

The attribute "httpGetEnabled" is essential because we want other applications to be able to locate the metadata of this service that we are hosting.


Without the metadata, client applications can't generate the proxy and thus won't be able to use the service.

Previous Questions
Previous Questions

7) What is a service contract, operation contract and Data Contract?
Ans)
ServiceContract :
ñ Describes which operation client can perform on the services
ñ Indicates that an interface or a class defines a service contract in a application
operation contract:
ñ Indicates that a method defines an operation that is part of a service contract
Data Contract :
Defines which data type are processed to and from the services, It provides built in contract for implicit type
----------------------------------------------------
8)In WCF, "wsHttpBinding" uses plain unencrypted texts when transmitting messages and is backward compatible with traditional ASP.NET web services (ASMX Web Services) ?
Ans)
Select from following answers:

True
False
Not Aware

False

"wsHttpBinding" is secure (messages are encrypted while being transmitted), and transaction-aware. However, because this is a WS-* standard, some existing applications (for example: a QA tool) may not be able to consume this service. Hence, it is not completely backward compatible.
------------------------------------------
9) Why in WCF, the "httpGetEnabled" attribute is essential ?
Ans)

The attribute "httpGetEnabled" is essential because we want other applications to be able to locate the metadata of this service that we are hosting.


Without the metadata, client applications can't generate the proxy and thus won't be able to use the service.

Previous Questions