• +91 9971497814
  • info@interviewmaterial.com

Computer Interview Questions Answers

DotNet Interview Questions Answers

Question - 51 : - What is a Web Service?

Answer - 51 : - A web service is a software component that exposes itself through the open communication channels of the Internet. Applications running on remote machines, on potentially different platforms, can access these components in a language and platform-independent manner. A Web Service is a group of functions, packaged together for use in a common framework throughout a network. webFarm Vs webGardens A web farm is a multi-server scenario. So we may have a server in each state of US. If the load on one server is in excess then the other servers step in to bear the brunt. How they bear it is based on various models. 1. RoundRobin. (All servers share load equally) 2. NLB (economical) 3. HLB (expensive but can scale up to 8192 servers) 4. Hybrid (of 2 and 3). 5. CLB (Component load balancer). A web garden is a multi-processor setup. i.e., a single server (not like the multi server above). How to implement webfarms in .Net: Go to web.config and Here for mode = you have 4 options. a) Say mode=inproc (non web farm but fast when you have very few customers). b) Say mode=StateServer (for webfarm) c) Say mode=SqlServer (for webfarm) Whether to use option b or c depends on situation. StateServer is faster but SqlServer is more reliable and used for mission critical applications. How to use webgardens in .Net: Go to web.config and Change the false to true. You have one more attribute that is related to webgarden in the same tag called cpuMask.

Question - 52 : - What is ADO .NET and what is difference between ADO and ADO.NET?

Answer - 52 : - ADO.NET is stateless mechanism. I can treat the ADO.Net as a separate in-memory database where in I can use relationships between the tables and select insert and updates to the database. I can update the actual database as a batch.

Question - 53 : -   What is reflection?

Answer - 53 : -   All .NET compilers produce metadata about the types defined in the modules they produce. This metadata is packaged along with the module (modules in turn are packaged together in assemblies), and can be accessed by a mechanism called reflection. The System.Reflection namespace contains classes that can be used to interrogate the types for a module/assembly. Using reflection to access .NET metadata is very similar to using ITypeLib/ITypeInfo to access type library data in COM, and it is used for similar purposes - e.g. determining data type sizes for marshaling data across context/process/machine boundaries. Reflection can also be used to dynamically invoke methods (see System.Type.InvokeMember ) ,  or even create types dynamically at run-time (see System.Reflection.Emit.TypeBuilder).

Question - 54 : -   How can you prevent your class to be inherated further?

Answer - 54 : -    By setting Sealed - Key word  public sealed class Planet  {              //code goes here  } class Moon:Planet  {      //Not allowed as base class is sealed  }

Question - 55 : - How Boxing and unboxing occures in memory?

Answer - 55 : -   Boxing converts value type to reference type , thus allocating memory on Heap . Unboxing converts already boxed reference types to value types through explicit casting , thus  allocating memory on stack .

Question - 56 : - Why are there five tracing levels in System.Diagnostics.TraceSwitcher?

Answer - 56 : -   The tracing dumps can be quite verbose.  For applications that are constantly running you run the risk of overloading the machine and the hard drive.  Five levels range from None to Verbose, allowing you to fine-tune the tracing activities.

Question - 57 : - What is ADO .NET and what is difference between ADO and ADO.NET?

Answer - 57 : - ADO.NET is stateless mechanism. I can treat the ADO.Net as a separate in-memory database where in I can use relationships between the tables and select insert and updates to the database. I can update the actual database as a batch.

Question - 58 : - What are the authentication methods in .NET?

Answer - 58 : - There are 4 types of authentications. 1.WINDOWS AUTHENTICATION 2.FORMS AUTHENTICATION 3.PASSPORT AUTHENTICATION 4.NONE/CUSTOM AUTHENTICATION The authentication option for the ASP.NET application is specified by using the tag in the Web.config file, as shown below: other authentication options 1. WINDOWS AUTHENTICATION Schemes I. Integrated Windows authentication II. Basic and basic with SSL authentication III. Digest authentication IV. Client Certificate authentication 2. FORMS AUTHENTICATION You, as a Web application developer, are supposed to develop the Web page and authenticate the user by checking the provided user ID and password against some user database 3.PASSPORT AUTHENTICATION A centralized service provided by Microsoft, offers a single logon point for clients. Unauthenticated users are redirected to the Passport site 4 NONE/CUSTOM AUTHENTICATION: If we don’t want ASP.NET to perform any authentication, we can set the authentication mode to “none”. The reason behind this decision could be: We don’t want to authenticate our users, and our Web site is open for all to use. We want to provide our own custom authentication

Question - 59 : - What’s a Windows process?

Answer - 59 : - It’s an application that’s running and had been allocated memory.

Question - 60 : - Which are the abstract classes available under system.xml namespace?

Answer - 60 : -   The System.XML namespace provides XML related processing ability in .NET framework. XmlReader and XMLWriter are the two abstract classes at the core of .NET Framework XML classes: 1.  XmlReader provides a fast, forward-only, read-only cursor for processing an XML document stream. 2. XmlWriter provides an interface for producing XML document streams that conform to the W3C's XML standards. Both XmlReader and XmlWriter are abstract base classes, which define the functionality that all derived classes must support.

Computer Contributors

krishan
Rajeev Katiyar
Yes Baroda

Share your email for latest updates

Name:
Email:

Our partners