No path is too difficult. No destination is too far !
Dot Net Questions
Microsoft .Net Interview Questions
What is the use of Global.asax File in ASP.NET Application ?
The Global.asax file is an optional file and can be stored in root directory. This File is in accesible for web-sites. This Global.asax file contained in HttpApplicationClass. In Global.asax file we can declare global variables like for example the variables used in master pages because same variables can be used for different pages right.It provides more security than others. The Global.asax file is used to handle application-level and session-level events. We donot worry about configuring Global.asax because it is itself configured. Accessing the Global.asax file can not be possible. while one request is in processing it is impossible to send another request, we can not get response for other request and even we can not start a new session.
while adding this Global.asax file to our application bydefault it contains five methods,
Those methods are:
1.Application_Start.
2.Application_End.
3.Session_Start.
4.Session_End.
5.Application_Error.
What is yeild keyword in .net ?
When ever user want to return a value from an iterator block and again contine from in the iterator block we use yeild keyword it is used to return the value from a iterator block, it is not supported in vb.net
How can we Filter rows in a Datatable ?
A filter condition can be specified on a datatable to filter row based on the condition specfied
datatable = datatable.select(“Condition”);
Can we have same method with same name and signature in a using partial class ?
Partial class is the concept of diving a class file in to different files or a single file to enhance the productivity .
We cannot have the same method with same name and signature in partial class it give a compile time exception
what is the difference between garbage collection and Dispose Method
if you want to delete resources(objects) those are not using you should not worry about that garbage collecter implicitly call finalize() method and remove all such object but if you want to delete object forcefully(The larger object you want to delete after completeing task) than you can explicitly call dispose() method.
What is the use of DataPager control?
DataPager control is the new control introduced in the ASP.NET 4.0. This control is used to do pagination in the Data controls like ListView Server control.
The typical syntax of DataPager control is
<asp:DataPager ID=”DataPager1″ runat=”server” PagedControlID=”ListView1″ PageSize=”5″ QueryStringField=”pageid”>
<Fields>
<asp:NumericPagerField ButtonCount=”5″ />
</Fields>
</asp:DataPager>Where PagedControlID is the id of the Listview, PageSize is the number of records to be displayed in the page, QueryStringField is the querystring for the current page number.
The fields properties can be used to show how many pagination button you would like to have when asp.net creates the paging for your ListView control.
Name of some of the types of evidence in Dot Net in context of CAS
1) Site
2) Strong Name
3) Zone
4) URL etc. are few of the evidences in dot net CAS used while creating code groups
What is the class for getting the information that is on Clipboard of your system in windows app ?
System.Windows.Clipboard is the class used to get what is on clipboard like text , image etc.
What are the Security policy levels in Dot Net ?
1) Enterprise
2) Machine
3) User and
4) Application Domaineach of these are independent from each other and Each level has its own code groups and permission sets.
What is Security policy ?
The configurable set of rules that the CLR follows when determining the permissions to grant to code.
Main Difference between User groups and code groups.
User groups control the authorization only based on distributed Access Control Lists linked to each resource whereas code groups are using centralized permission sets.
What is the Namespace of ForAuthentication class?
System.Web.Security
Simple file extension for a dot net handler ?
.ASHX
Syntax example to add strong name to an assembly “C:\\somelibrary.dll” i.e. to generate a strong name key value pair file.
sn -k “C:\\somelibrary.dll”
Name the utility used for adding a strong name to an assembly.
sn.exe
What is GAC ?
its global assembly cache use to keep the public assemblies centralized to be used by any application on that machine (server)
Name the utility used to add an assembly into the GAC.
gacutil.exe
Under which namespace does the Process class comes ?
System.Diagnostics namespace
Which namespace provides the classes to interact with system processes.
System.Diagnostics
How to Avoid the tempering of your page’s viewstate ?
using EnableViewStateMac=”true” in the page directive in the HTML
What is Multi-Targeting in .net?
In the previous version of Visual Studio, each Visual Studio release supports to a specific version of the .NET Framework. For example, VS 2002 only worked with .NET 1.0, VS 2003 only worked with .NET 1.1, and VS 2005 only worked with .NET 2.0.
Now with the major change in VS2008 is to support “Multi-Targeting ”
Visual Studio 2008 is used to create projects that target .NET Framework version 2.0, 3.0, or 3.5. is what we call as “Multi-Targeting”.