Home
ASP.Net
Interview FAQs

For most programmers, having a garbage collector (and using garbage collected objects) means that you never have to worry about deallocating memory, or reference counting objects, even if you use sophisticated data structures. It does require some changes in coding style, however, if you typically deallocate system resources (file handles, locks, and so forth) in the same block of code that releases the memory for an object. With a garbage collected object you should provide a method that releases the system resources deterministically (that is, under your program control) and let the garbage collector release the memory when it compacts the working set.
All languages that target the runtime allow you to allocate class objects from the garbage-collected heap. This brings benefits in terms of fast allocation, and avoids the need for programmers to work out when they should explicitly free each object.

The CLR also provides what are called ValueTypes—these are like classes, except that ValueType objects are allocated on the runtime stack (rather than the heap), and therefore reclaimed automatically when your code exits the procedure in which they are defined. This is how "structs" in C# operate.

Managed Extensions to C++ lets you choose where class objects are allocated. If declared as managed Classes, with the __gc keyword, then they are allocated from the garbage-collected heap. If they dont include the __gc keyword, they behave like regular C++ objects, allocated from the C++ heap, and freed explicitly with the "free" method.

Attach the aspnet_wp.exe process to the DbgClr debugger.
You can get this Exception, when the following preconditions are true:

1. You are not using a web farm.
2. It appears when using built-in databound controls such as GridView, DetailsView or FormView which utilize “DataKeyNames”.
3. It appears if you have a large page which loads slowly for any reason.

If following preconditions are true and you click a postbacking control/link and the page has not loaded completely in client browser, you might get the "Validation of ViewState MAC failed" exception.

When this happens, if you just try setting the page property "EnableViewStateMac" to false, it does not solve the problem, it just changes the error message in same navigation behavior.

Stacks are limited in the size in which they can grow - only a finite memory can be consumed by a single stack (1MB is the default under Win32). Heaps can grow until all memory available to an application is exhausted.
It is the ability to monitor an application so that information about the applications progress, performance and status can be captured and reported.
The process of examining the source code generally through a peer, to verify it against best practices.
Logging is the process of persisting information about the status of an application.
Displaying 1 of 4Next
1 2 3 4
Need Help? Contact Us.

Log in

*
*

Forgot password?

*

New User

*
*
*
*