Net-informations.com
SiteMap  | About    

Frequently Asked Interview Questions

Please click on the questions to see the answers

You can create various type of object in ASP

  1. Response Object
  2. Application Object
  3. Request Object
  4. Session Object
  5. Server Object
  6. Error Object
  7. FileSystem Object
  8. File Object
  9. ADO Object
  10. Drive Object

  1. @ Assembly
  2. @ Control
  3. @ Implements
  4. @ Import
  5. @ Master
  6. @ MasterType
  7. @ OutputCache
  8. @ Page
  9. @ PreviousPageType
  10. @ Reference
  11. @ Register

Response.output.write() is used to display the formatted text.

Yes. By using ASP or scripts, you can create your own applications for remotely administering your IIS server. You can use Active Directory Service Interfaces (ADSI), WMI, or COM interfaces to configure IIS programmatically.

Yes. You can run asp.net application without web.config file. If you are not configure any settings in web.config file then it will take machine.config file for default configurtaons. However, it will not allow user to debug, even if you are running it in debug mode.

The Systems.Diagnostics namespace includes Trace and Debug classes.

The System.Data namespaces contain classes for accessing and managing data from diverse sources.

You can use Visual Studio remote debugger. Install the remote debugging components on the remote computer and launch the Remote Debugging Monitor (msvsmon.exe) when you start debugging.

Private assemblies are stored in project's bin folder to use in that particular project, whereas public or shared assemblies are stored in GAC(global assembly cache) so that it is available to every project.

The ASP.NET session identifier is a randomly generated number encoded into a 24-character string consisting of lowercase characters from a to z and numbers from 0 to 5.

Access the Session via the threads HttpContext:

  1. InProc mode - which stores session state in memory on the Web server. This is the default.

  2. StateServer mode - which stores session state in a separate process called the ASP.NET state service

  3. SQLServer mode - stores session state in a SQL Server database.

  4. Custom mode - which enables you to specify a custom storage provider.

  5. Off mode - which disables session state.

ViewState exists till your current page exists. This includes postbacks. Viewstate become nothing once it redirects or transfer to another page.

No. Viewstate itself does not expire. ViewState is kept as part of the PostBack process. Since it's posted back in a form, it can be reconstituted any time. It is important to note that, ViewState is stored in the Session so if your Session expires, the ViewState will be lost.

Session object.

Viewstate is stored on page it self in encoded form. You can use hidden variable to store data that will be used only on that page and View State Data is stored in Base64 String encoded format.

ViewState is loaded into memory between init and load. In Page Init, only Partially gets loaded. In Page load,viewstate complete. So whole loading is available in Page load only.

CacheItemRemoved event is the only event provided by Cache object.

onRemoveCallback is used to notify the application when items are removed from the cache.

Response.Cache.SetNoStore();

Page-level caching refers to the cache an entire page and the Fragment caching refers to the portion of a webpage such as caching User Controls

You can use a Javascript in code behind to open a page in a new window.

The default Expires value for a cookie is not a static time, but it creates a Session cookie. Setting the Expires property to MinValue makes this a session Cookie, which is its default value. This will stay active until the user closes their browser/clears their cookies. You can override this as required.

You don't have to change anything in your ASP.NET application to enable cookieless sessions, except the following configuration setting in web.config file

The default Expires value for a cookie is not a static time, but it creates a Session cookie. Setting the Expires property to MinValue makes this a session Cookie, which is its default value. This will stay active until the user closes their browser/clears their cookies. You can override this as required.

You don't have to change anything in your ASP.NET application to enable cookieless sessions, except the following configuration setting in web.config file.

Set its Expires property equal to DateTime.maxValue, that means cookies never Expires.

Cookie.Discard Property when set true will instruct the client application not to save the Cookie on the user's hard disk when a session ends.

  1. PreInit
  2. Init
  3. InitComplete
  4. PreLoad
  5. Load
  6. Control events
  7. LoadComplete
  8. PreRender
  9. PreRenderComplete
  10. SaveStateComplete
  11. Render
  12. Unload

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

The Respose.Redirect method is used to post a page to another page.

Page theme applies to a particular web pages of the project. It is stored inside a subfolder of the App_Themes folder while Global theme applies to all the web applications on the web server. It is stored inside the Themes folder on a Web server.

Page attributes are specified using the @Page directive.

  1. Page_PreInit
  2. Page_Init
  3. Page_InitComplete
  4. Page_PreLoad

Role-based security allows you to partition your web site according to the "role" of the user.

Session.Abandon()

Session.Remove() - It will kill session for the specific user.

Session.Clear() - To remove all keys with the session as well as you can also use it to remove specific keys from the session.

Yes. You have to include below mvc assembly references in the web forms application to create hybrid application.

The Response.RedirectPermanent() method performs a permanent redirection from a requested URL to a specified URL.

You can use RedirectPermanent if the resource has been moved permanently and will no longer be accessible in its previous location. Most browsers will cache this response and perform the redirect automatically without requesting the original resource again.

The advantages of Passport authentication are that the user doesn't have to remember separate user names and passwords for various Web sites and that the user can maintain his or her profile information in a single location. There is no real-time, server-to-server communication between participating Web sites and the central .NET Passport servers.









net-informations.com (C) 2018    Founded by raps mk
All Rights Reserved. All other trademarks are property of their respective owners.