Interview Question in .Net

Posted by Self-Innovator under Interview Questions on 8/28/2014 | Points: 10 | Views : 1890 | Status : [Member] | Replies : 2
Hello,
One of the interviewer asked me a question on WCF Services.
Question 1:How many services are getting created while creating the WCF Service?
Question 2:How to create a proxy for a WCF Service?
Question 3:What is Serialization in .Net?
Question 4:Where did session values are stored by default?Ans:-InProc
Question 5:Alternative for Asp.Net ListItem in html? Ans:-<ul>

can some one provide the ans for questions.

Join Hands Change lives
Thanks & Regards
Straight Edge Society



Responses

Posted by: Kirankumar0404 on: 10/8/2014 [Member] Starter | Points: 25

Up
0
Down
3. Serialization
Serialization is the process of converting the state of an object into a form that can be persisted or transported. The complement of serialization is deserialization, which converts a stream into an object. Together, these processes allow data to be easily stored and transferred.
The .NET Framework features two serializing technologies:
Binary serialization preserves type fidelity, which is useful for preserving the state of an object between different invocations of an application. For example, you can share an object between different applications by serializing it to the Clipboard. You can serialize an object to a stream, to a disk, to memory, over the network, and so forth. Remoting uses serialization to pass objects "by value" from one computer or application domain to another.

XML serialization serializes only public properties and fields and does not preserve type fidelity. This is useful when you want to provide or consume data without restricting the application that uses the data. Because XML is an open standard, it is an attractive choice for sharing data across the Web. SOAP is likewise an open standard, which makes it an attractive choice.

Kiran Kumar

Self-Innovator, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: kgovindarao523-21772 on: 10/10/2014 [Member] [MVP] Bronze | Points: 25

Up
0
Down
Hi,

Question 1:How many services are getting created while creating the WCF Service?
Ans:
Only One. While creating a service An Interface along with class will be generated, which is One Service.

Question 2:How to create a proxy for a WCF Service?
Ans:
By creating an Instanse to the service.
Suppose if your service is CalculatorService
CalculatorServiceSoapClient o=new CalculatorServiceSoapClient(); // This is a proxy creation.

Thank you,
Govind

Self-Innovator, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response