Sunday, January 31, 2010

WCF Fundamentals

1. Why WCF ?
Answer: The purpose of WCF is to provide a unified programming model for many of these technologies, enabling you to build applications that are as independent as possible from the underlying mechanism being used to connect services and applications together.
using WCF enables you to maintain backwards compatibility with many of the preceding technologies. For example, a WCF client application can easily communicate with a Web service that you created by using WSE
WCF enables you to build powerful service-oriented systems, based on connected services and applications. You can use WCF to create new services, as well as add new functionality and interoperate with the functionality available through many existing services created by using other technologies. WCF provides a consistent model for using a variety of technologies, enabling you to design and architect your solutions without being restricted by a specific connectivity mechanism.

2. Which account is used by IIS to execute WCF Service?
Answer: IIS executes Web services using the ASPNET account under Windows XP, or the NETWORK SERVICE account under Windows Vista. This account must be able to read the contents of the folder holding the files for the service, as well as the parent folder hierarchy.

3. How does an application know how to format data so that another application can read it correctly?
Answer: Both Client and Server applications have to agree on a layout. This layout is referred to as the XML schema for the data.

4. Why we use XML in WCF Services ?
Answer: To share data successfully between applications running on different computers, developers had to agree on a common format for that data that was independent of the architecture of the computer they were using. Therefore We use XML.

5. What is XML?
Ans: XML is text-based and human-readable, and lets you define a grammar for describing just about any type of data that you need to handle

WCF Basics

Above XML data actually means, An application that needs to send information about a Book to another application could format the data in this way, and the receiving application should be able to parse the data and make sense of it. However, there is more than one way to represent this information by using XML. You could also structure it like this:

6. How does an application know how to format data so that another application can read it correctly?
Ans: application sending the data, uses XML schema to convey information about how the data it is emitting is structured, and the application receiving the data can use this schema to help parse the data in xml file and make sense of it.

By adopting XML and schemas as a common data format, applications running on different computers can understand the data that they are using.

7.What is WSDL Document ?
Answer: A WSDL document is an XML document that conforms to a standard XML schema and that describes the messages the Web service can accept and the structure of the responses it will send back. A client application can use this information to determine how to communicate with the Web service.

8. What is the difference between Security and Privacy ?
Answer: Security is concerned with identifying users and services and then authorizing their access to resources.
There are number of standard mechanisms for implementing security, such as using username/password pairs, X509 certificates, and Kerberos tokens.

Privacy: When applications communicate on Internet. You don't want other users to be able to intercept and read the messages flowing between your applications and Web services. this means encrypting the messages that they exchange using Public and Private Keys.

1 comment: