Explore topic-wise InterviewSolutions in Current Affairs.

This section includes 7 InterviewSolutions, each offering curated multiple-choice questions to sharpen your Current Affairs knowledge and support exam preparation. Choose a topic below to get started.

1.

Explain The Different Types Of Assemblies?

Answer»

Assemblies are of TWO TYPES, private and shared assemblies. A private assembly is used by the clients of the same APPLICATION DIRECTORY structure as the assembly. A shared assembly is stored in the global assembly cache (GAC), which is a repository of assemblies maintained by the runtime. A Shared assembly can be REFERENCED by more than one application.

Assemblies are of two types, private and shared assemblies. A private assembly is used by the clients of the same application directory structure as the assembly. A shared assembly is stored in the global assembly cache (GAC), which is a repository of assemblies maintained by the runtime. A Shared assembly can be referenced by more than one application.

2.

Can One Dll File Contains The Compiled Code Of More Than One .net Language?

Answer»

No, a DLL file can CONTAIN the complied code of only one PROGRAMMING language.

No, a DLL file can contain the complied code of only one programming language.

3.

What Is The Maximum Number Of Classes That Can Be Contained In One Dll File?

Answer»

There is no LIMIT to the NUMBER of CLASSES that can be curtained In a DLL file.

There is no limit to the number of classes that can be curtained In a DLL file.

4.

Explain The Differences Between Managed And Unmanaged Code?

Answer»

 Managed code is the code that is executed chatty by the QR Instead of the operating system. Unmanaged code is the code that is executed directly by the operating system outside the OR ENVIRONMENT. In managed code, since the execution of the code Is governed by CLR, the runtime provides different SERVICES such as garbage collection, TYPE checking, exception handling, and SAFETY and support These sat help provide uniformly in platform and language-Independent behavior of managed code applications. In unmanaged code, the allocation of memory, type safety, and security is REQUIRED to be taken are of by the developer. If the unmanaged code is not Properly handles, may result In memory leak. Examples of unmanaged code are ActiveX components and Wm32 AM that execute beyond the scope of native CLR.

 Managed code is the code that is executed chatty by the QR Instead of the operating system. Unmanaged code is the code that is executed directly by the operating system outside the OR environment. In managed code, since the execution of the code Is governed by CLR, the runtime provides different services such as garbage collection, type checking, exception handling, and safety and support These sat help provide uniformly in platform and language-Independent behavior of managed code applications. In unmanaged code, the allocation of memory, type safety, and security is required to be taken are of by the developer. If the unmanaged code is not Properly handles, may result In memory leak. Examples of unmanaged code are ActiveX components and Wm32 AM that execute beyond the scope of native CLR.

5.

What Is Side-by-side Execution? Can Two Applications, One Using A Private Assembly And Other Using A Shared Assembly, Be Stated As Side-by-side Executables?

Answer»

Side-by-side EXECUTION Is the ability to run multiple versions of an application or component on the same computer. You can have multiple versions of the CLR and multiple versions of APPLICATIONS and components Mat use a version of the runtime on the same computer at the same time. As versioning is only applied to shared assemblies and not to PRIVATE assemblies, two applications, ONE using a private assembly and other using a shared assembly, cannot be stated as side-by-side EXECUTABLES.

Side-by-side execution Is the ability to run multiple versions of an application or component on the same computer. You can have multiple versions of the CLR and multiple versions of applications and components Mat use a version of the runtime on the same computer at the same time. As versioning is only applied to shared assemblies and not to private assemblies, two applications, one using a private assembly and other using a shared assembly, cannot be stated as side-by-side executables.

6.

Why Is String Called Immutable Data Type?

Answer»

A STING REPRESENTS text and stores a sequential collection of characters in the memory. A string object is said to be immutable (read only), because a value once ASSIGNED to a string object cannot be changed after the acting object has been created. When the value In the string object is modified, a new string object is created with a new value assigned to the string object therefore, keeping the old string In memory for GARBAGE collector to be disposed.

A sting represents text and stores a sequential collection of characters in the memory. A string object is said to be immutable (read only), because a value once assigned to a string object cannot be changed after the acting object has been created. When the value In the string object is modified, a new string object is created with a new value assigned to the string object therefore, keeping the old string In memory for garbage collector to be disposed.

7.

Briefly Describe The Roles Of Clr In .net Framework?

Answer»
  • CLR provides an environment to EXECUTE MET applications on target machines.
  • CLR-is also a common runtime environment for all MET code irrespective of their PROGRAMMING language, because the compilers of MET Framework convert every source code into a common language known as MSIL .
  • CLR also provides various services to execute processes, such as memory management service and security services..CLR performs various tasks to manage the EXECUTION process of MET applications.

The responsibilities of as are listed below:

  • Automatic memory management–CLR invokes venous built-in functions of MET Framework to allocate and de-allocate the memory of MET objects. THEREFORE, programmers need not write the code to explicitly allocate and de-allocate memory to programs.
  • Garbage Collection —Garbage collection Is the major ROLE of CUR, with prevents memory leaks during execution of programs. The Garbage collector of CLR automatically determines the best time to free the memory, which is reserved by an object for execution.
  • Code Access Security —Code Access Security (CAS) model is used in MET Framework to impose restrictions and security during execution of programs. CLR uses security objects to manage access to code during execution of MET applications. as allows an executing code to perform only those tasks for which it has permission.

The responsibilities of as are listed below:

8.

Mention The Core Components Of .net Framework?

Answer»

The two core COMPONENTS of .NET Framework are:

  1.  COMMON LANGUAGE RUNTIME
  2.  .NET Framework Class Library.[sociallocker]

The two core components of .NET Framework are:

9.

What Are The Benefits Of .net Framework?

Answer»

.NET Framework offers many benefits to application developers. Some of these benefits are as FOLLOWS:

  • Consistent programming model —.NET Framework provides a consistent object-oriented programming model across various languages. You on we this model to create programs for performing different tasks, such as connecting to and retrieving data from DATABASES and reading from and writing to files.
  • Language interoperability —Language interoperability is a feature that enables a piece of code written in one language to be used in another language. This facilities the reuse of code and therefore improves the efficiency of the development process.
  • AUTOMATIC management of resources —Wink developing .NET. APPLICATIONS, you may use various resources, such as files, memory, and database connecters. With MET Framework, you do not need to manually free these resources when they are no longer required.
  • Ease of deployment- .NET framework makes the deployment of applications easier. To install an application that is not based on NET Framework you need to copy It and its components on target computers. However, with MET Framework, you can quickly Install or deploy the applications such that Installation of new applications or components does not affect the existing applications.

.NET Framework offers many benefits to application developers. Some of these benefits are as follows:

10.

Mention The Execution Process For Managed Code?

Answer»

11.

What Is Microsoft Intermediate Language (msil)?

Answer»

The .NET Framework is SHIPPED with compilers of all .NET programming languages to develop programs. There are SEPARATE compilers for the Visual Basic, C#, and Visual C++ programming languages in .NET Framework. Each .NET compiler produces an intermediate CODE after compiling the source code. The intermediate code is common for all languages and is UNDERSTANDABLE only to .NET ENVIRONMENT. This intermediate code is known as MSIL.

The .NET Framework is shipped with compilers of all .NET programming languages to develop programs. There are separate compilers for the Visual Basic, C#, and Visual C++ programming languages in .NET Framework. Each .NET compiler produces an intermediate code after compiling the source code. The intermediate code is common for all languages and is understandable only to .NET environment. This intermediate code is known as MSIL.

12.

What Is Managed Extensibility Framework?

Answer»

Managed extensibility framework (MEF) is a NEW LIBRARY that is introduced as a part of .NET 4.0 and SILVERLIGHT 4. It helps in extending your application by providing greater reuse of applications and components. MEF provides a way for host application to CONSUME external extensions without any CONFIGURATION requirement.

Managed extensibility framework (MEF) is a new library that is introduced as a part of .NET 4.0 and Silverlight 4. It helps in extending your application by providing greater reuse of applications and components. MEF provides a way for host application to consume external extensions without any configuration requirement.

13.

Which Method Do You Use To Enforce Garbage Collection In .net?

Answer»

The System.GC.Collect() METHOD.

The System.GC.Collect() method.

14.

What Is The Difference Between Int And Int32?

Answer»

There is no DIFFERENCE between INT and int32. System.Int32 is a .NET CLASS and int is an alias NAME for System.Int32.

There is no difference between int and int32. System.Int32 is a .NET Class and int is an alias name for System.Int32.

15.

What Are Tuples?

Answer»

Tuple is a fixed-size collection that can have elements of EITHER same or different data TYPES. Similar to arrays, a USER must have to specify the size of a tuple at the time of declaration. Tuples are allowed to hold up from 1 to 8 elements and if there are more than 8 elements, then the 8th element can be defined as another tuple. Tuples can be SPECIFIED as parameter or return type of a method.

Tuple is a fixed-size collection that can have elements of either same or different data types. Similar to arrays, a user must have to specify the size of a tuple at the time of declaration. Tuples are allowed to hold up from 1 to 8 elements and if there are more than 8 elements, then the 8th element can be defined as another tuple. Tuples can be specified as parameter or return type of a method.

16.

Mention The Namespace That Is Used To Include .net Data Provider For Sql Server In .net Code?

Answer»

The System.Data.SqlClient NAMESPACE.

The System.Data.SqlClient namespace.

17.

Which Architecture Does Datasets Follow?

Answer»

DATASETS FOLLOW the DISCONNECTED DATA ARCHITECTURE.

Datasets follow the disconnected data architecture.

18.

Which Property Is Used To Check Whether A Datareader Is Closed Or Opened?

Answer»

The IsClosed property is used to check whether a DATAREADER is closed or OPENED. This property returns a TRUE value if a Data Reader is closed, otherwise a false value is RETURNED.

 

The IsClosed property is used to check whether a DataReader is closed or opened. This property returns a true value if a Data Reader is closed, otherwise a false value is returned.

 

19.

Name The Method That Needs To Be Invoked On The Dataadapter Control To Fill The Generated Dataset With Data?

Answer»

The FILL() METHOD is USED to fill the DATASET with DATA.

 

The Fill() method is used to fill the dataset with data.

 

20.

Which Adapter Should You Use, If You Want To Get The Data From An Access Database?

Answer»

OleDbDataAdapter is USED to GET the DATA from an ACCESS DATABASE.

OleDbDataAdapter is used to get the data from an Access database.

21.

What Are Different Types Of Authentication Techniques That Are Used In Connection Strings To Connect .net Applications With Microsoft Sql Server?

Answer»

22.

What Is Autopostback?

Answer»

If you want a CONTROL to postback AUTOMATICALLY when an event is raised, you need to SET the AutoPostBack property of the control to TRUE.

If you want a control to postback automatically when an event is raised, you need to set the AutoPostBack property of the control to True.

23.

In Which Event Are The Controls Fully Loaded?

Answer»

PAGE load EVENT GUARANTEES that all CONTROLS are fully loaded. Controls are also accessed in Page_Init EVENTS but you will see that view state is not fully loaded during this event

Page load event guarantees that all controls are fully loaded. Controls are also accessed in Page_Init events but you will see that view state is not fully loaded during this event

24.

How Can We Identify That The Page Is Post Back?

Answer»

PAGE object has an "IsPostBack" PROPERTY, which can be checked to KNOW that is the page POSTED back.

 

Page object has an "IsPostBack" property, which can be checked to know that is the page posted back.

 

25.

Which Is The Parent Class Of The Web Server Control?

Answer»

The System.WEB.Ul.Control CLASS is the PARENT class for all Web SERVER CONTROLS.

The System.Web.Ul.Control class is the parent class for all Web server controls.

26.

What Are The Advantages Of The Code-behind Feature?

Answer»
  • MAKES code EASY to understand and debug by separating application logic from HTML tags.
  • PROVIDES the isolation of effort between graphic designers and software engineers.
  • Removes the problems of browser INCOMPATIBILITY by providing code files to EXIST on the Web server and supporting Web pages to be compiled on demand.

27.

Define A Multilingual Website?

Answer»

A multilingual Website serves CONTENT in a number of languages. It contains MULTIPLE copies for its content and other resources, such as DATE and TIME, in different languages.

A multilingual Website serves content in a number of languages. It contains multiple copies for its content and other resources, such as date and time, in different languages.

28.

What Is Iis? Why Is It Used?

Answer»

Internet Information Services (IIS) is created by Microsoft to provide Internet-based services to ASP.NET WEB applications. It makes your computer to work as a Web server and provides the functionality to develop and deploy Web applications on the server. IIS handles the request and response CYCLE on the Web server. It also offers the services of SMTP and FrontPage server extensions. The SMTP is USED to SEND EMAILS and use FrontPage server extensions to get the dynamic features of IIS, such as form handler.

Internet Information Services (IIS) is created by Microsoft to provide Internet-based services to ASP.NET Web applications. It makes your computer to work as a Web server and provides the functionality to develop and deploy Web applications on the server. IIS handles the request and response cycle on the Web server. It also offers the services of SMTP and FrontPage server extensions. The SMTP is used to send emails and use FrontPage server extensions to get the dynamic features of IIS, such as form handler.

29.

How Can You Register A Custom Server Control To A Web Page?

Answer»

You can REGISTER a custom SERVER control to a Web PAGE using the @Register DIRECTIVE.

 

You can register a custom server control to a Web page using the @Register directive.

 

30.

Differentiate Globalization And Localization?

Answer»

The globalization is a technique to identify the specific part of a WEB application that is different for different languages and make separate that PORTION from the CORE of the Web application. The LOCALIZATION is a procedure of configuring a Web application to be supported for a specific language or locale.

The globalization is a technique to identify the specific part of a Web application that is different for different languages and make separate that portion from the core of the Web application. The localization is a procedure of configuring a Web application to be supported for a specific language or locale.

31.

Which Method Is Used To Force All The Validation Controls To Run?

Answer»

The Page.Validate() METHOD is USED to FORCE all the validation controls to run and to PERFORM validation.

 

The Page.Validate() method is used to force all the validation controls to run and to perform validation.

 

32.

What Does The Orientation Property Do In A Menu Control?

Answer»

Orientation property of the MENU control SETS the horizontal or VERTICAL display of a menu on a Web PAGE. By default, the orientation is vertical.

 

Orientation property of the Menu control sets the horizontal or vertical display of a menu on a Web page. By default, the orientation is vertical.

 

33.

Differentiate Between Client-side And Server-side Validations In Web Pages?

Answer»

Client-side validations take PLACE at the client END with the HELP of JavaScript and VBScript before the Web page is sent to the server. On the other HAND, server-side validations take place at the server end.

Client-side validations take place at the client end with the help of JavaScript and VBScript before the Web page is sent to the server. On the other hand, server-side validations take place at the server end.

34.

Where Do You Add An Event Handler?

Answer»

It's the Attributesproperty, the ADD FUNCTION INSIDE that PROPERTY. e.g.btnSubmit.Attributes.Add("onMouseOver","someClientCode();")

It's the Attributesproperty, the Add function inside that property. e.g.btnSubmit.Attributes.Add("onMouseOver","someClientCode();")

35.

What Do You Mean By Authentication And Authorization?

Answer»

Authentication is the process of VALIDATING a user on the CREDENTIALS(username and password) and authorization PERFORMS after authentication. After Authentication a user will be verified for performing the various TASKS, It access is limited it is known as authorization.

Authentication is the process of validating a user on the credentials(username and password) and authorization performs after authentication. After Authentication a user will be verified for performing the various tasks, It access is limited it is known as authorization.

36.

Differences Between Dll And Exe?

Answer»

.EXE

  1. These are OUTBOUND FILE.
  2. Only one .exe file EXISTS per application.
  3. .Exe cannot be shared with other applications.

.DLL

  1. These are inbound file .
  2. Many .dll files may exists in one application.
  3.  .dll can be shared with other applications. 

.exe

.dll

37.

What Is Shadowing?

Answer»

Shadowing is either through scope or through inheritance. Shadowing through inheritance is hiding a METHOD of a base class and PROVIDING a new IMPLEMENTATION for the same. This is the default when a derived class writes an implementation of a method of base class which is not declared as overridden in the base class. This also serves the PURPOSE of protecting an implementation of a new method against subsequent addition of a method with the same name in the base class.’shadows’ keyword is RECOMMENDED although not necessary since it is the default.

Shadowing is either through scope or through inheritance. Shadowing through inheritance is hiding a method of a base class and providing a new implementation for the same. This is the default when a derived class writes an implementation of a method of base class which is not declared as overridden in the base class. This also serves the purpose of protecting an implementation of a new method against subsequent addition of a method with the same name in the base class.’shadows’ keyword is recommended although not necessary since it is the default.

38.

Difference Between Class And Interface In .net?

Answer»
  • CLASS is logical representation of object. It is collection of data and related sub PROCEDURES with DEFINITION.
  • INTERFACE is also a class containing methods which is not having any definitions.
  • Class does not support multiple inheritance. But interface can support.

39.

Can Any Object Be Stored In A Viewstate In .net?

Answer»

An OBJECT that either is SERIALIZABLE or has a TypeConverter defined for it can be persisted in VIEWSTATE.

 

An object that either is serializable or has a TypeConverter defined for it can be persisted in ViewState.

 

40.

What Is The Use Of Errorprovider Control In .net?

Answer»

The ErrorProvider CONTROL is used to indicate invalid data on a data entry form. Using this control, you can ATTACH error messages that display NEXT to the control when the data is invalid, as seen in the following image. A red circle with an exclamation point blinks, and when the user MOUSES over the icon, the error message is DISPLAYED as a tooltip.

The ErrorProvider control is used to indicate invalid data on a data entry form. Using this control, you can attach error messages that display next to the control when the data is invalid, as seen in the following image. A red circle with an exclamation point blinks, and when the user mouses over the icon, the error message is displayed as a tooltip.

41.

What Is Difference Between Namespace And Assembly?

Answer»

ASSEMBLY is physical grouping of LOGICAL units, Namespace, LOGICALLY groups classes.
Namespace can SPAN multiple assembly.

Assembly is physical grouping of logical units, Namespace, logically groups classes.
Namespace can span multiple assembly.

42.

What Is An Il?

Answer»

Intermediate Language is also KNOWN as MSIL (MICROSOFT Intermediate Language) or CIL (Common Intermediate Language). All .NET source code is COMPILED to IL. IL is then CONVERTED to machine code at the point where the software is installed, or at run-time by a Just-In-Time (JIT) compiler.

Intermediate Language is also known as MSIL (Microsoft Intermediate Language) or CIL (Common Intermediate Language). All .NET source code is compiled to IL. IL is then converted to machine code at the point where the software is installed, or at run-time by a Just-In-Time (JIT) compiler.

43.

How Do I Send An Email Message From My Asp.net Page?

Answer»

You can use the System.Web.Mail.MailMessage and the System.Web.Mail.SmtpMail class to send email in your ASPX pages. Below is a simple example of using this class to send mail in C# and VB.NET. In order to send mail through our mail server, you would want to make sure to set the static SmtpServer property of the SmtpMail class to mail-fwd.

C# &LT;%@ Import Namespace="System" %> <%@ Import Namespace="System.Web" %> <%@ Import Namespace="System.Web.Mail" %> <HTML> <HEAD> <title>Mail Test</title> </HEAD> <script language="C#" runat="server"> private void Page_Load(Object sender, EventArgs e) { TRY { MailMessage mailObj = new MailMessage(); mailObj.From = "sales@joeswidgets.com"; mailObj.To = "ringleader@forexample-domain.com"; mailObj.Subject = "Your Widget Order"; mailObj.Body = "Your order was processed."; mailObj.BodyFormat = MailFormat.Text; SmtpMail.SmtpServer = "mail-fwd"; SmtpMail.Send(mailObj); Response.Write("Mail sent successfully"); } CATCH (EXCEPTION x) { Response.Write("Your message was not sent: " + x.Message); } } </script> <body> <FORM id="mail_test" method="post" runat="server"> </form> </body> </HTML>

You can use the System.Web.Mail.MailMessage and the System.Web.Mail.SmtpMail class to send email in your ASPX pages. Below is a simple example of using this class to send mail in C# and VB.NET. In order to send mail through our mail server, you would want to make sure to set the static SmtpServer property of the SmtpMail class to mail-fwd.

44.

Where Are The Iis Log Files Stored?

Answer»

C:\WINDOWS\system32\Logfiles\W3SVC1
OR
c:\winnt\system32\LogFiles\W3SVC1

C:\WINDOWS\system32\Logfiles\W3SVC1
OR
c:\winnt\system32\LogFiles\W3SVC1

45.

In Which Process Does Iis Runs (was Asking About The Exe File)

Answer»

inetinfo.exe is the Microsoft IIS SERVER running, handling ASP.NET requests among other THINGS. When an ASP.NET request is received (usually a file with .aspx extension), the ISAPI FILTER aspnet_isapi.dll TAKES care of it by passing the request to the actual WORKER process aspnet_wp.exe.

inetinfo.exe is the Microsoft IIS server running, handling ASP.NET requests among other things. When an ASP.NET request is received (usually a file with .aspx extension), the ISAPI filter aspnet_isapi.dll takes care of it by passing the request to the actual worker process aspnet_wp.exe.

46.

Difference Between Singleton And Singlecall.

Answer»

Singleton types never have more than one instance at any one time. If an instance exists, all CLIENT requests are serviced by that instance.

Single Call types always have one instance per client REQUEST. The next method invocation will be serviced by a different server instance, EVEN if the previous instance has not YET been recycled by the SYSTEM.

Singleton types never have more than one instance at any one time. If an instance exists, all client requests are serviced by that instance.

Single Call types always have one instance per client request. The next method invocation will be serviced by a different server instance, even if the previous instance has not yet been recycled by the system.

47.

Cao And Sao.

Answer»

CLIENT Activated objects are those REMOTE objects whose LIFETIME is directly Controlled by the client. This is in direct contrast to SAO. Where the server, not the client has complete control over the lifetime of the objects.
Client activated objects are instantiated on the server as soon as the client request the object to be created. Unlike as SAO a CAO doesn’t delay the object creation until the FIRST METHOD is called on the object. (In SAO the object is instantiated when the client calls the method on the object)

Client Activated objects are those remote objects whose Lifetime is directly Controlled by the client. This is in direct contrast to SAO. Where the server, not the client has complete control over the lifetime of the objects.
Client activated objects are instantiated on the server as soon as the client request the object to be created. Unlike as SAO a CAO doesn’t delay the object creation until the first method is called on the object. (In SAO the object is instantiated when the client calls the method on the object)

48.

What Is Remoting?

Answer»

The process of communication between DIFFERENT operating system PROCESSES, regardless of whether they are on the same computer. The .NET remoting system is an architecture designed to simplify communication between OBJECTS living in different application domains, whether on the same computer or not, and between different CONTEXTS, whether in the same application domain or not.

The process of communication between different operating system processes, regardless of whether they are on the same computer. The .NET remoting system is an architecture designed to simplify communication between objects living in different application domains, whether on the same computer or not, and between different contexts, whether in the same application domain or not.

49.

How You Will Protect / Secure A Web Service?

Answer»

For the most part, things that you do to secure a Web site can be used to secure a Web Service. If you need to ENCRYPT the data exchange, you USE Secure Sockets Layer (SSL) or a VIRTUAL Private Network to keep the bits secure. For AUTHENTICATION, use HTTP Basic or Digest authentication with Microsoft® Windows® integration to figure out who the caller is. these items cannot:
Parse a SOAP request for valid VALUES
Authenticate access at the Web Method level (they can authenticate at the Web Service level)
Stop reading a request as soon as it is recognized as invalid.

For the most part, things that you do to secure a Web site can be used to secure a Web Service. If you need to encrypt the data exchange, you use Secure Sockets Layer (SSL) or a Virtual Private Network to keep the bits secure. For authentication, use HTTP Basic or Digest authentication with Microsoft® Windows® integration to figure out who the caller is. these items cannot:
Parse a SOAP request for valid values
Authenticate access at the Web Method level (they can authenticate at the Web Service level)
Stop reading a request as soon as it is recognized as invalid.

50.

What Is A Proxy In Web Service? How Do I Use A Proxy Server When Invoking A Web Service?

Answer»

If you are USING the SOAP Toolkit, you need to set some connector properties to use a proxy server:

Dim soap As SoapClient Set soap=New SoapClient soap.ConnectorProperty("ProxyServer") = ?proxyservername? soap.ConnectorProperty("ProxyPort") = ?8080? soap.ConnectorProperty("UseProxy") = True

While with .NET , you just need to create a System.Net.WebProxy object and use it to set the Proxy PROPERTY Dim

webs As localhost.MyService() webs.Proxy=New System.Net.WebProxy(?HTTP://proxyserver:8080?)

If you are using the SOAP Toolkit, you need to set some connector properties to use a proxy server:

While with .NET , you just need to create a System.Net.WebProxy object and use it to set the Proxy property Dim

Previous Next