Dot Net

  Home  Microsoft .Net Technologies  Dot Net


“Learn Dot Net with hundreds of Dot Net Interview Questions and Answers”



116 Dot Net Questions And Answers

61⟩ Using COM Component in .Net?

As most of you know that .Net does not encourage the development of COM components and provides a different solution to making reusable components through Assemblies. But, there are a lot of COM components present which our .Net application might need to use. Fortunately, .Net provides an extremely simple approach to achieve this. This is achieved by using ‘Wrapper Classes’ and ‘Proxy Components’. .Net wraps the COM component into .Net assembly technically called ‘Runtime Callable Wrapper’ or RCW. Then u can call and use your COM component just as a .Net (or C#, if u are using C#) Assembly.

 178 views

62⟩ What is an assembly in .NET?

An assembly is the primary building block of a .NET Framework application. It is a collection of functionality that is built, versioned, and deployed as a single implementation unit (as one or more files). All managed types and resources are marked either as accessible only within their implementation unit, or as accessible by code outside that unit. .NET Assembly contains all the metadata about the modules, types, and other elements it contains in the form of a manifest. The CLR loves assemblies because differing programming languages are just perfect for creating certain kinds of applications. For example, COBOL stands for Common Business-Oriented Language because it’s tailor-made for creating business apps. However, it’s not much good for creating drafting programs. Regardless of what language you used to create your modules, they can all work together within one Portable Executable Assembly. There’s a hierarchy to the structure of .NET code. That hierarchy is Assembly - > Module -> Type -> Method." Assemblies can be static or dynamic. Static assemblies can include .NET Framework types (interfaces and classes), as well as resources for the assembly (bitmaps, JPEG files, resource files, and so on). Static assemblies are stored on disk in portable executable (PE) files.

 182 views

63⟩ What is a Web Service in .NET?

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.

 179 views

64⟩ Explain webFarm Vs webGardens in .NET?

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.

 183 views

65⟩ What is the difference between a namespace and assembly name in .NET?

A namespace is a logical naming scheme for types in which a simple type name, such as MyType, is preceded with a dot-separated hierarchical name. Such a naming scheme is completely under control of the developer. For example, types MyCompany.FileAccess.A and MyCompany.FileAccess.B might be logically expected to have functionally related to file access. The .NET Framework uses a hierarchical naming scheme for grouping types into logical categories of related functionality, such as the ASP.NET application framework, or remoting functionality. Design tools can make use of namespaces to make it easier for developers to browse and reference types in their code. The concept of a namespace is not related to that of an assembly. A single assembly may contain types whose hierarchical names have different namespace roots, and a logical namespace root may span multiple assemblies. In the .NET Framework, a namespace is a logical design-time naming convenience, whereas an assembly establishes the name scope for types at run time.

 171 views

68⟩ Explain what relationship is between a Process, Application Domain, and Application?

Each process is allocated its own block of available RAM space, no process can access another process’ code or data. If the process crashes, it dies alone without taking the entire OS or a bunch of other applications down.

A process is an instance of a running application. An application is an executable on the hard drive or network. There can be numerous processes launched of the same application (5 copies of Word running), but 1 process can run just 1 application.

 211 views

70⟩ What are the consideration in deciding to use .NET Remoting or ASP.NET Web Services?

Remoting is a more efficient communication exchange when you can control both ends of the application involved in the communication process. Web Services provide an open-protocol-based exchange of information. Web Services are best when you need to communicate with an external organization or another (non-.NET) technology.

 203 views

71⟩ What’s a proxy of the server object in .NET Remoting?

It’s a fake copy of the server object that resides on the client side and behaves as if it was the server. It handles the communication between real server object and the client object. This process is also known as marshaling.

 192 views

72⟩ What are remotable objects in .NET Remoting?

Remotable objects are the objects that can be marshaled across the application domains. You can marshal by value, where a deep copy of the object is created and then passed to the receiver. You can also marshal by reference, where just a reference to an existing object is passed.

 175 views

73⟩ What are channels in .NET Remoting?

Channels represent the objects that transfer the other serialized objects from one application domain to another and from one computer to another, as well as one process to another on the same box. A channel must exist before an object can be transferred.

 179 views

75⟩ What is a formatter in .NET?

A formatter is an object that is responsible for encoding and serializing data into messages on one end, and deserializing and decoding messages into data on the other end.

 186 views