.Net Proficiency Test For Johnnuman Technologies

Approved & Edited by ProProfs Editorial Team
The editorial team at ProProfs Quizzes consists of a select group of subject experts, trivia writers, and quiz masters who have authored over 10,000 quizzes taken by more than 100 million users. This team includes our in-house seasoned quiz moderators and subject matter experts. Our editorial experts, spread across the world, are rigorously trained using our comprehensive guidelines to ensure that you receive the highest quality quizzes.
Learn about Our Editorial Process
| By Jntech
J
Jntech
Community Contributor
Quizzes Created: 1 | Total Attempts: 120
Questions: 30 | Attempts: 120

SettingsSettingsSettings
Technology Quizzes & Trivia

Questions and Answers
  • 1. 

    The .NET Framework provides a runtime environment called ?

    • A.

      RMT

    • B.

      CLR

    • C.

      RCT

    • D.

      RC

    Correct Answer
    B. CLR
    Explanation
    The correct answer is CLR (Common Language Runtime). The .NET Framework includes CLR, which provides the runtime environment for executing managed code. It manages memory, handles exceptions, and provides various services for running applications written in different programming languages. CLR also includes a Just-In-Time (JIT) compiler that converts Intermediate Language (IL) code into machine code at runtime for efficient execution.

    Rate this question:

  • 2. 

    In ASP.NET in form page the object which contains the user name is ?

    • A.

      Page.User.Identity

    • B.

      Page.User.IsInRole

    • C.

      Page.User.Name

    • D.

      None of the Above

    Correct Answer
    A. Page.User.Identity
    Explanation
    The correct answer is Page.User.Identity. In ASP.NET, the object that contains the user name is accessed using the Page.User.Identity property. This property provides information about the current user, including their name, authentication type, and whether they are authenticated or not. The Page.User.Identity property is commonly used for user authentication and authorization purposes in ASP.NET applications.

    Rate this question:

  • 3. 

    In an ASPX page lifecycle, Which event is triggered first?

    • A.

      PageLoad

    • B.

      PageInit

    • C.

      PagePreInit

    • D.

      PageCreate

    Correct Answer
    B. PageInit
    Explanation
    In an ASPX page lifecycle, the PageInit event is triggered first. This event occurs before the page is initialized and allows for any initialization tasks to be performed. It is typically used to set initial values for controls or perform any necessary setup before the page is fully loaded.

    Rate this question:

  • 4. 

    What is the Use of Global.asax

    • A.

      Program Application & Session level events

    • B.

      Get notified when a global variable is changed

    • C.

      Set global layout of a web application

    • D.

      Configure settings which globally affect the server performance

    Correct Answer
    A. Program Application & Session level events
    Explanation
    The Global.asax file is used to handle program application and session level events in a web application. It allows developers to write code that runs during specific events such as application start, end, session start, session end, etc. This file is useful for managing the application's lifecycle and performing tasks like initializing global variables, setting up session variables, and managing application-wide events. It does not have any direct functionality related to getting notified when a global variable is changed, setting global layout, or configuring server performance.

    Rate this question:

  • 5. 

    How do you manage states? 

    • A.

      Viewstate

    • B.

      Session Object

    • C.

      Application Object

    • D.

      Out of process StateServer

    Correct Answer(s)
    A. Viewstate
    B. Session Object
    C. Application Object
    Explanation
    The correct answer includes multiple options for managing states in a web application. Viewstate is used to store the state of individual controls on a web page. Session Object is used to store user-specific data that can be accessed across multiple pages within a session. Application Object is used to store data that can be accessed by all users of the application. Out of process StateServer is a mechanism to store session data in a separate process, allowing for better scalability and fault tolerance.

    Rate this question:

  • 6. 

    Where is default session data is stored?

    • A.

      In Process

    • B.

      State Server

    • C.

      Session Object

    • D.

      None

    Correct Answer
    A. In Process
    Explanation
    The default session data is stored "In Process", which means that it is stored directly in the memory of the web server hosting the application. This allows for quick and efficient access to the session data. However, it also means that if the web server restarts or crashes, the session data will be lost.

    Rate this question:

  • 7. 

    What method is used to ensure that only one process accesses a variable at a time?

    • A.

      Block()

    • B.

      Snchrozine & Block

    • C.

      Lock() & Unlock()

    • D.

      AsncAccess()

    Correct Answer
    C. Lock() & Unlock()
    Explanation
    The method used to ensure that only one process accesses a variable at a time is by using the Lock() & Unlock() mechanism. This method allows a process to acquire a lock on the variable, preventing other processes from accessing it until the lock is released. This ensures that only one process has exclusive access to the variable at any given time, preventing any potential conflicts or inconsistencies that could arise from concurrent access.

    Rate this question:

  • 8. 

    The .NET framework provides automatic memory management using a technique called ?

    • A.

      Serialization

    • B.

      Garbage Collection

    • C.

      Assemblies

    • D.

      Overriding

    Correct Answer
    B. Garbage Collection
    Explanation
    The correct answer is Garbage Collection. The .NET framework uses garbage collection to automatically manage memory. Garbage collection is a technique where the framework automatically identifies and removes objects that are no longer being used, freeing up memory space. This helps prevent memory leaks and improves the overall performance and efficiency of the application.

    Rate this question:

  • 9. 

    What is the base class from which all Web forms inherit?

    • A.

      Master Page

    • B.

      Page Class

    • C.

      Session Class

    • D.

      Base Page Class

    Correct Answer
    B. Page Class
    Explanation
    The correct answer is Page Class. The Page class is the base class from which all Web forms inherit in ASP.NET. It provides the basic functionality and properties required for creating and managing web pages. This class includes methods and properties for handling events, managing state, and interacting with the user interface. By inheriting from the Page class, developers can build custom web forms and take advantage of the built-in features and functionality provided by ASP.NET.

    Rate this question:

  • 10. 

    Which of the following must be done in order to connect data from some data resource to Repeater control?

    • A.

      Set the DataSource property

    • B.

      Call the DataBind method

    • C.

      Configure database to allow repeater access

    • D.

      Ask DB admin to configure a special named pipe for it

    Correct Answer(s)
    A. Set the DataSource property
    B. Call the DataBind method
    Explanation
    To connect data from a data resource to a Repeater control, two steps must be done. First, the DataSource property of the Repeater control must be set to the desired data resource. This tells the Repeater control where to retrieve the data from. Second, the DataBind method must be called on the Repeater control. This method binds the data from the data resource to the Repeater control, allowing it to display the data. The other two options, configuring the database to allow repeater access and asking the DB admin to configure a special named pipe, are not necessary for connecting data to a Repeater control.

    Rate this question:

  • 11. 

    JQuery is?

    • A.

      A special .Net class to identify and query java based applications

    • B.

      A javascript to connect and fetch data from database server on client-side

    • C.

      A collection of scripts used to enhance End-User clientside experience.

    • D.

      A java runtime based query execution client.

    Correct Answer
    C. A collection of scripts used to enhance End-User clientside experience.
    Explanation
    jQuery is a collection of scripts used to enhance the end-user client-side experience. It is a fast, small, and feature-rich JavaScript library that simplifies HTML document traversal, event handling, and animation for web development. It allows developers to write less code while achieving more functionality, making it easier to create interactive and dynamic web pages.

    Rate this question:

  • 12. 

    The type of code found in Code-Behind class is ?

    • A.

      Server-side

    • B.

      Client-side

    • C.

      All of above

    • D.

      None of above

    Correct Answer
    A. Server-side
    Explanation
    The code found in the Code-Behind class is server-side code. Server-side code is executed on the server and is responsible for processing requests, interacting with databases, and generating dynamic content to be sent to the client. This code is not accessible or visible to the client and helps in handling server-side operations, such as data manipulation, business logic, and server communication.

    Rate this question:

  • 13. 

    The actual work process of ASP.NET is taken care by ?

    • A.

      Inetinfo.exe

    • B.

      Aspnet_isapi.dll

    • C.

      Aspnet_wp.exe

    • D.

      None of the Above

    Correct Answer
    C. Aspnet_wp.exe
    Explanation
    aspnet_wp.exe is the correct answer because it is responsible for handling the actual work process of ASP.NET. It is an executable file that runs as a worker process for ASP.NET applications. It manages the execution of ASP.NET requests, handles application domain recycling, and provides isolation between multiple ASP.NET applications. inetinfo.exe is the Internet Information Services (IIS) process responsible for handling incoming HTTP requests, while aspnet_isapi.dll is an ISAPI extension that helps IIS communicate with ASP.NET. Therefore, neither of these options is the correct answer.

    Rate this question:

  • 14. 

    How many classes can a single .NET DLL contain?

    • A.

      1

    • B.

      3

    • C.

      7

    • D.

      Unlimited

    Correct Answer
    D. Unlimited
    Explanation
    A single .NET DLL can contain an unlimited number of classes. This means that there is no restriction on the number of classes that can be included in a DLL file. This allows developers to organize their code into multiple classes within a single DLL, making it easier to manage and reuse code. Additionally, having multiple classes in a DLL allows for better encapsulation and separation of concerns in software development.

    Rate this question:

  • 15. 

    Which of the following can be used to add alternating color scheme in a Repeater control?

    • A.

      Datasource's validate row event

    • B.

      Use of ColorValidator Control

    • C.

      AlternatingItemTemplate

    • D.

      Use of CSS 3 Custom configuration tags

    Correct Answer
    C. AlternatingItemTemplate
    Explanation
    The AlternatingItemTemplate can be used to add an alternating color scheme in a Repeater control. This template allows for the customization of the appearance of alternating items in the Repeater control, such as setting different background colors for each item. By using the AlternatingItemTemplate, developers can easily achieve a visually appealing alternating color scheme in the Repeater control.

    Rate this question:

  • 16. 

    Suppose a .NET programmer wants to convert an object into a stream of bytes then the process is called ?

    • A.

      Threading

    • B.

      Serialization

    • C.

      RCW

    • D.

      AppDomain

    Correct Answer
    B. Serialization
    Explanation
    Serialization is the correct answer because it refers to the process of converting an object into a stream of bytes, which can be stored or transmitted and later reconstructed to create a new object with the same properties. This is commonly used in .NET programming to save and load objects, send data over networks, or store data in databases. Threading, RCW, and AppDomain are unrelated concepts and not relevant to the given question.

    Rate this question:

  • 17. 

    The namespace used to program around ActiveDirectory services is called ?

    • A.

      System.Active.Directory

    • B.

      System.Net

    • C.

      System.Microsoft.ActiveDirectory

    • D.

      System.DirectoryServices

    Correct Answer
    D. System.DirectoryServices
    Explanation
    The correct answer is System.DirectoryServices. This namespace is used to program around ActiveDirectory services. It provides classes and methods for interacting with Active Directory, such as querying, creating, modifying, and deleting directory objects.

    Rate this question:

  • 18. 

    Which of the following is TRUE about Windows Authentication in ASP.NET?

    • A.

      Automatically determines role membership

    • B.

      Role membership determined only by user programming

    • C.

      ASP.NET does not support Windows Authentication

    • D.

      None of the Above

    Correct Answer
    A. Automatically determines role membership
    Explanation
    Windows Authentication in ASP.NET automatically determines role membership. This means that the roles assigned to a user are determined by the authentication mechanism itself, without the need for additional programming by the user. This simplifies the process of managing user roles and allows for easy integration with Windows Active Directory or other authentication providers.

    Rate this question:

  • 19. 

    What tags one need to add within the asp:datagrid tags to bind columns manually?

    • A.

      Set AutoGenerateColumns Property to false on the datagrid tag

    • B.

      Set AutoGenerateColumns Property to true on the datagrid tag

    • C.

      It is not possible to do the operation

    • D.

      Set SetMaunalColumns Property to true on the datagrid tag

    Correct Answer
    A. Set AutoGenerateColumns Property to false on the datagrid tag
    Explanation
    To bind columns manually within the asp:datagrid tags, one needs to set the AutoGenerateColumns property to false on the datagrid tag. This will disable the automatic generation of columns and allow the user to manually define and bind the columns.

    Rate this question:

  • 20. 

    How do you explicitly kill a user session?

    • A.

      Session.Dump

    • B.

      Session.Abandon

    • C.

      Session.Exit

    • D.

      Session.Kill

    Correct Answer
    B. Session.Abandon
    Explanation
    Session.Abandon is the correct answer because it is the method used to explicitly kill a user session in many programming languages, including ASP.NET. When Session.Abandon is called, it terminates the session and removes all session data, effectively ending the user's session on the website or application. This is commonly used when a user logs out or when their session needs to be forcefully terminated for security or administrative reasons.

    Rate this question:

  • 21. 

    You create 4 forms FormA, FormB, FormC and FormD. You want to allow users to open FormA, FormB and FormC at the same time within FormD. Which properties do you need to set?

    • A.

      IsMdiChild on Forms A,B and C; and IsMdiParent on FormD.

    • B.

      MdiParent on Forms A,B and C; and IsMdiContainer on FormD.

    • C.

      IsMdiChild on Forms A,B and C; and IsMdiContainer on FormD.

    • D.

      MdiParent on Forms A,B and C; and IsMdiParent on FormD.

    Correct Answer
    B. MdiParent on Forms A,B and C; and IsMdiContainer on FormD.
  • 22. 

    You should constrain user input to data you know is safe by:

    • A.

      Setting max length on ASP.NET and HTML input controls

    • B.

      Using ASP.NET validation controls (RequiredFieldValidation, CompareValidator, RangeValidator, RegularExpressionValidator, CustomValidator) to constrain user input via ASP.NET input controls as much as possible.

    • C.

      Constraining user input to a white list (list of acceptable characters)

    • D.

      Constraining user input to a black list (list of all un acceptable characters)

    Correct Answer(s)
    A. Setting max length on ASP.NET and HTML input controls
    B. Using ASP.NET validation controls (RequiredFieldValidation, CompareValidator, RangeValidator, RegularExpressionValidator, CustomValidator) to constrain user input via ASP.NET input controls as much as possible.
    C. Constraining user input to a white list (list of acceptable characters)
    Explanation
    The correct answer suggests that there are multiple ways to constrain user input to ensure data safety. One way is by setting a maximum length on ASP.NET and HTML input controls, which limits the amount of data that can be entered. Another method is to use ASP.NET validation controls, such as RequiredFieldValidation, CompareValidator, RangeValidator, RegularExpressionValidator, and CustomValidator, to enforce specific constraints on user input. Additionally, constraining user input to a white list, which is a predefined list of acceptable characters, can help prevent the input of unwanted or malicious data.

    Rate this question:

  • 23. 

    Which security process allows a website to confirm you are who you say you are?

    • A.

      Authorization

    • B.

      Identity

    • C.

      Authentication

    • D.

      Validation

    Correct Answer
    C. Authentication
    Explanation
    Authentication is the security process that allows a website to confirm the identity of a user. It verifies that the user is who they claim to be by using various methods such as passwords, biometrics, or security tokens. This process ensures that only authorized individuals can access the website and its resources, protecting against unauthorized access and potential security breaches.

    Rate this question:

  • 24. 

    If the value of passwordFormat is set to _______, users cannot retrieve their original passwords

    • A.

      Encrypted

    • B.

      Clear

    • C.

      Cryptograph

    • D.

      Hashed

    Correct Answer
    D. Hashed
    Explanation
    If the value of passwordFormat is set to "Hashed", it means that the passwords are stored in a hashed format. Hashing is a one-way function that converts the password into a fixed-length string of characters, making it extremely difficult to retrieve the original password. Therefore, users cannot retrieve their original passwords as they are securely stored in a non-reversible format.

    Rate this question:

  • 25. 

    In a production environment, you should NOT leave debug = ?

    • A.

      True

    • B.

      False

    • C.

      Enable

    • D.

      Disable

    Correct Answer
    A. True
    Explanation
    In a production environment, it is not recommended to leave the debug mode enabled. Debug mode is typically used for troubleshooting and development purposes, as it provides more detailed information about errors and the internal workings of the system. However, leaving debug mode enabled in a production environment can pose security risks and impact performance. It may expose sensitive information to potential attackers and also slow down the system due to the additional logging and processing required. Therefore, it is best practice to disable debug mode in a production environment.

    Rate this question:

  • 26. 

    When customErrors mode is set to Off, which of the following happens when an error occurs:

    • A.

      All visitors see the custom error page

    • B.

      All visitors see the full error details

    • C.

      Local users get full error details, while remote users get custom errors

    • D.

      The program crashes

    Correct Answer
    B. All visitors see the full error details
    Explanation
    When the customErrors mode is set to Off, it means that all visitors, both local and remote users, will see the full error details when an error occurs. This means that instead of being redirected to a custom error page, users will see the complete error message, including the stack trace and other relevant information. This can be useful for debugging purposes, but it also means that sensitive information may be exposed to the users.

    Rate this question:

  • 27. 

    When an exception occurs, the remainder of the code in the ____ block is skipped

    • A.

      Try

    • B.

      Catch

    • C.

      Finally

    • D.

      Exception

    Correct Answer
    A. Try
    Explanation
    When an exception occurs, the remainder of the code in the try block is skipped. The try block is where the code that might throw an exception is placed. If an exception occurs within the try block, the program jumps to the catch block to handle the exception. Therefore, any code after the point where the exception is thrown will not be executed.

    Rate this question:

  • 28. 

    What are the different ways to overload a method?

    • A.

      Different parameter names

    • B.

      Different parameter data types

    • C.

      Different number of parameters

    • D.

      Different ordering of parameters

    • E.

      Changing the method name

    Correct Answer(s)
    B. Different parameter data types
    C. Different number of parameters
    D. Different ordering of parameters
    Explanation
    The different ways to overload a method include using different parameter data types, different number of parameters, and different ordering of parameters. This means that you can have multiple methods with the same name but with different parameters, allowing you to perform different operations based on the arguments passed to the method. This provides flexibility and allows for code reuse, as you can create multiple versions of a method that cater to different scenarios or data types.

    Rate this question:

  • 29. 

    How do you enforce garbage collection in .NET?

    • A.

      Garbage.Collect()

    • B.

      Collect()

    • C.

      This.Collect.Garbage()

    • D.

      System.GC.Collect()

    Correct Answer
    D. System.GC.Collect()
    Explanation
    In .NET, the method to enforce garbage collection is System.GC.Collect(). This method is used to explicitly request the .NET garbage collector to perform garbage collection. It is important to note that calling this method does not guarantee immediate garbage collection, as the garbage collector operates on its own schedule. However, it can be used to optimize memory usage by freeing up resources that are no longer needed.

    Rate this question:

  • 30. 

    How many machine.config files can be on a system?

    • A.

      1

    • B.

      2

    • C.

      5

    • D.

      One per directory/folder

    Correct Answer
    A. 1
    Explanation
    There can only be one machine.config file on a system. The machine.config file is a configuration file used by the .NET framework to define settings that are applied globally to all applications on the system. Having multiple machine.config files would cause conflicts and inconsistencies in the configuration settings. Therefore, only one machine.config file is allowed to ensure proper functioning of the .NET framework.

    Rate this question:

Related Topics

Back to Top Back to top
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.