Últimas Postagens de .Net Interview Questions (@dotnetiq2) no Telegram

Postagens do Canal .Net Interview Questions

.Net Interview Questions
.Net Interview Questions
2,826 Inscritos
18 Fotos
43 Vídeos
Última Atualização 09.03.2025 17:51

Canais Semelhantes

کدهک
2,016 Inscritos

O conteúdo mais recente compartilhado por .Net Interview Questions no Telegram

.Net Interview Questions

17 Dec, 13:19

5,564

WS-Policy is generally used for
1. Describing protocols for accessing operations
2. Security
3. Reliable messaging
4. Transactions
5. Message encoding (Message Transmission Optimization Mechanism [MTOM])
6. Other protocols
You can specify the above settings in WSDL directly without a policy section, but the disadvantage is that, once published, the WSDL contract is final. If the clients has to communicate with a WCF service that has changed the settings in the WSDL, the clients need to rebuild the proxy and configuration or atleast the changes to the WSDL contract must support backward compatibility.

The advantage of using WS-Policy is that it can change over time, and the clients can discover the changed policy to communicate via metadata exchange. But keep in mind that, you can only change the policy safely if clients are positioned to handle dynamic changes
.Net Interview Questions

17 Dec, 13:19

5,219

🚩2⃣6⃣9⃣ What is the use of WS-Policy?
.Net Interview Questions

17 Dec, 13:16

5,246

There are several advantages of using MessageContract attribute in WCF. MessageContract attribute can be used for
1. Adding custom headers to the message.
2. Controling message wrapping.
3. Controling signing and encryption of messages.
.Net Interview Questions

17 Dec, 13:16

4,720

🚩2⃣6⃣8⃣ Explain the significane of MessageContract attribute? OR Why and when do you use MessageContract attribute?
.Net Interview Questions

17 Dec, 13:15

4,535

The best way to serialize Polymorphic Types in WCF is to use KnownType attribute on the parent type as shown in the example below. CorporateCustomer and PremiumCustomer classes inherit from Customer class,and hence we can associate CorporateCustomer and PremiumCustomer types as known types in 3 different ways depending on the project requirement.

1. Associate known types to the base types themselves.
2. Associate known types to particular operations.
3. Associate known types to the service contract as a whole.
.Net Interview Questions

17 Dec, 13:14

4,267

🚩2⃣6⃣7⃣ What is the best way to serialize Polymorphic Types in WCF?
.Net Interview Questions

07 Mar, 10:57

6,979

The preferred way for serializing complex types in WCF is to use data contracts. Using Data Contracts provides us with the following advantages.
1. Using DataMember attribute, you can control which members of the class to serialize.
2. You can also control the order in which members are serialized using Order parameter of the DataMember attribute..
3. You can also provide explicit Name to the serialized members using Name parameter of the DataMember attribute.
4. You can also specify if a member is required or optional using IsRequired parameter of the DataMember attribute.
Consider the example below which uses Name, IsRequired and Order parameters of the DataMember attribute to serialize CustomerId property. By the way DataMember attribute can be used with either fields or properties. If you donot specify the order in which members are serialized, then by default alphabetical ordering is done by the DataContractSerializer.
.Net Interview Questions

07 Mar, 10:57

5,962

🚩2️⃣6️⃣6️⃣ What is the preferred way for serializing complex types in WCF?
.Net Interview Questions

07 Mar, 10:56

5,875

When we decorate a class with Serializable attribute, all the fields of the class are serialized regardless of the accessibility. We donot have control on what to serialize and what not to serialize. We also will not have any control over naming conventions or data types.
.Net Interview Questions

07 Mar, 10:56

5,426

🚩2️⃣6️⃣5️⃣ What is the disadvantage of using Serializable attribute to serialize a complex type that is sent and received between clients and services in WCF?