.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
Kaviya Balasubramanian
Sgraph Infotech
Imran Ghani


Find questions, FAQ's and their answers related to .NET, C#, Vb.Net, Sql Server and many more.


Post New Question Subscribe to Interview Questions
 
Quick Links For Interview Questions Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  OOPs  JQuery  JavaScript/VBScript
BiztalkPatten/PracticesIISWCFWPFWWF
NetworkingAptitudeOthers  All    
 

.NET Framework Interview Questions and Answers

What are Contracts in WCF?

Author: Alankar          Posted Date: April 02, 2015    Category: .NET Framework     Points: 40

A Contract is basically an agreement between the two parties i.e. Service and Client. In WCF, Contracts can be categorized as behavioral or structural.
1. Behavioral Contracts define that whatoperationsclientcanperform on a service.
o ServiceContract attribute is used to mark a type as Service contract that contains operations.
o OperationContract attributes is used to mark the operations that will be exposed.
o Fault Contract defines what errors are raised by the service being exposed.
2. Structural Contracts
o DataContract attribute define types that will be moved between the parties.
o MessageContract attribute define the structure of SOAP message.

What is meant by WS Addressing Standard in WCF ?

Author: Alankar          Posted Date: April 02, 2015    Category: .NET Framework     Points: 40

The address for an endpoint is a unique URL that identifies the
location of the service. The address should follow the Web Service Addressing (WS-Addressing) standard, and they are :-

(1) Scheme - This is typically "http" followed by a colon.

(2) Machine - Identifies the machine name, which can be a public URL such as "www.google.com" or a local identifier such as "localhost".

(3) Port - The optional port number, preceded by a colon.

(4) Path - The path used to locate the service files. Typically, this is just the service name, but the path can consist of more than one level when a service resides in a directory structure.


What is Code Document Object Model (CodeDom) ?

Author: Subhransu Sekhar Jena          Posted Date: October 30, 2014    Category: .NET Framework     Points: 40

Code Document Object Model are code generators which are used to minimize repetitive coding tasks, and to minimize the number of human-generated source code lines.

How to prevent my .NET DLL to be decompiled ?

Author: Subhransu Sekhar Jena          Posted Date: October 30, 2014    Category: .NET Framework     Points: 40

We can prevent .NET DLL to be decompiled up to an extent by Obfuscate Source code, asymmetric encryption and encrypted w32 wrapper application.

By design .NET embeds rich Meta data inside the executable code using MSIL. Any one can easily decompile your DLL back using tools like ILDASM (owned by Microsoft) or Reflector for .NET which is a third party. Secondly there are many third party tools which make this decompiling process a click away. So any one can easily look in to your assemblies and reverse engineer them back in to actual source code and understand some real good logic which can make it easy to crack your application. The process by which you can stop this reverse engineering is using "obfuscation". It's a technique which will foil the decompilers. There are many third parties (XenoCode, Demeanor for .NET) which provide .NET obfuscation solution. Microsoft includes one that is Dotfuscator Community Edition with Visual Studio.NET.

What is CODE Access security?

Author: Subhransu Sekhar Jena          Posted Date: October 30, 2014    Category: .NET Framework     Points: 40

CODE Access security is a security model that lets us grant or deny execution permissions to an assembly according to its "properties," called evidence, such as its strong name or publisher

What's difference between System exceptions and Application exceptions?

Author: Subhransu Sekhar Jena          Posted Date: October 30, 2014    Category: .NET Framework     Points: 40

System exceptions are common exceptions thrown by the CLR of .Net Framework. Application exceptions can be user defined exceptions thrown by the application.

What are Value types and Reference types?

Author: Subhransu Sekhar Jena          Posted Date: October 30, 2014    Category: .NET Framework     Points: 40

Value types directly contain their data which are either allocated on the stack or allocated in-line in a structure. Reference types store a reference to the value's memory address, and are allocated on the heap. Reference types can be self-describing types, pointer types, or interface types. Variables that are value types each have their own copy of the data, and therefore operations on one variable do not affect other variables. Variables that are reference types can refer to the same object; therefore, operations on one variable can affect the same object referred to by another variable. All types derive from the System.Object base type.

Value types are stored in stack part of the memory. Reference type are stored in managed heap. Let have a look at the example for better understanding.

Int iCount = 0; \\ Value Type

int NewiCount = iCount; \\ Reference Type

What is Delay signing ?

Author: Subhransu Sekhar Jena          Posted Date: October 30, 2014    Category: .NET Framework     Points: 40

To create a strong named assembly and want this assembly to be used by someone else, we partially build this assembly by provide a Public Key. We write this Public Key in the AssemblyInfo.vb OR .cs file. We also add an attribute by the named <Assembly:AssemblyDelaySignAttribute(true)> to the assembly info file. This makes it sure that when we build the assembly, It would be containing the information only about the public key before we deliver it to our client. This is a partial strong named assembly that we have created, and hence it is called Delayed Assembly.

What is Reflection?

Author: Subhransu Sekhar Jena          Posted Date: October 30, 2014    Category: .NET Framework     Points: 40

Reflection is used to dynamically load a class , create object and invoke methods at run time. It can also be used read its own meta data to find assemblies, modules and type information at run time.

What is concept of strong names ?

Author: Subhransu Sekhar Jena          Posted Date: October 30, 2014    Category: .NET Framework     Points: 40

While using shared assemblies, in order to avoid name collisions strong names are used. Strong Names are based on private key cryptography , ie private assemblies are simply given the same name as their main file name.
« Previous12345678910….105106Next »



Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend