Wednesday, October 29, 2014

Part VII

Explain the use of DataAdapter.

-DataAdapter provides the bridge to connect command objects to a dataset object.
-It populates the table in the dataset from the data store and also pushes the changes in the dataset back into the data store.
Methods of DataAdapter:
Fill - Populates the dataset object with data from the data source
FillSchema - Extracts the schema for a table from the data source
Update - It is use to update the data source with the changes made to the content of the dataset

What is impersonation in ASP.NET?

Impersonation is a technique to access application resources using the identity of some other user.
By default, Impersonation is off
<identity impersonate="true" userName="domain name\username" password="password"/>

Can you explain the basic use of DataView?

DataView is used for sorting and searching data within datatable.
It has got following methods:
Find - returns the index of the row
FindRow - Returns a collection of DataRow
AddNew - Add a new row to the DataView object
Delete - Deletes the specific row from DataView object

What is Authorization in ASP.NET?

Usually after a user is authenticated by means of a login, the process of authorization is followed where the decision is made whether a user should be granted access to a specific resource.
There are 2 ways to authorize access to a given resource:
URL authorization:
URL authorization is performed by the UrlAuthorizationModule
It maps users and roles to URLs in ASP.NET applications.
File authorization:
File authorization is performed by the FileAuthorizationModule.
It checks the access control list of the .aspx or .asmx handler file to determine whether a user should have access to the file.

What is connection pooling and how to enable and disable connection pooling?

Connection pool is created when we open connection first time. When a new connection is created with same connection string as the first one, it reuses the same and existing connection object from the pool without creating a new one.
If the connection string is different then a new connection pooling will be created, thus won't use the existing connection object.
By default, we have connection pooling enabled in .Net. To disable connection pooling, set Pooling = false in the connection string.

Why is an object pool required?

To enhance performance and reduce the load of creating new objects, instead re using existing objects stored in memory pool. Object Pool is a container of objects that are for use and have already been created. Whenever an object creation request occurs, the pool manager serves the request by allocating an object from the pool. This minimizes the memory consumption and system's resources by recycling and re-using objects. When the task of an object is done, it is sent to the pool rather than being destroyed. This reduces the work for garbage collector and fewer memory allocations occur.

Can you explain the importance of Finalize method in .NET?

Clean up activities are entrusted to .NET Garbage collector in .NET. But unmanaged resources such as File, COM object etc. are beyond the scope of Garbage collector. For these type of objects, we have Finalize method where clean up code for unmanaged resources can be put.

Advantages and disadvantages of using cookies

Advantages:
Cookies are stored in client thus no burden as far as space is concern
Cookies are light weight and involves no complexities while using
Disadvantages:
Most browsers have put a check on the size of a cookie.
Cookies can be disabled on the client thus limiting the use of cookies
Cookies are tampered prone and thus associate security concern

What is AppSetting Section in “Web.Config” file? 
Latest answer: AppSetting section is used to set the user defined values. For e.g.: The ConnectionString which is used through out the project for database connection.........
Read answer
Difference between Server.Transfer and response.Redirect.
Latest answer: Following are the major differences between them: Server.Transfer - The browser is directly redirected to another page. There is no round trip...........
Read answer
Difference between authentication and authorization.
Latest answer: Authentication is the process of verifying the identity of a user. Authorization is process of checking whether the user has access rights to the system..............
Read answer
What is impersonation in ASP.NET?
Latest answer: By default, ASP.NET executes in the security context of a restricted user account on the local machine. However, at times it becomes necessary to access network resources which require additional permissions.............
Read answer
What is event bubbling in .NET?
Latest answer: The passing of the control from the child to the parent is called as bubbling. Controls like DataGrid, Datalist, Repeater, etc can have child controls..........
Read answer
Describe how the ASP.NET authentication process works.
Latest answer: ASP.NET runs inside the process of IIS due to which there are two authentication layers which exist in the system.............
Read answer
Explain the ways of authentication techniques in ASP.NET
Latest answer: Selection of an authentication provider is done through the entries in the web.config file for an application.The modes of authentication are:.........
Read answer
Windows authentication.
Latest answer: If windows authentication mode is selected for an ASP.NET application, then authentication also needs to be configured within IIS since it is provided by IIS............
Read answer
Passport authentication
Latest answer: Passport authentication provides authentication using Microsoft’s passport service.
If passport authentication is configured and users login using passport then the authentication duties are off-loaded to the passport servers.............
Read answer
Forms authentication
Latest answer: Using form authentication, ones own custom logic can be used for authentication. ASP.NET checks for the presence of a special session cookie when a user requests a page for the application. ............
Read answer
Explain how authorization works in ASP.NET
Latest answer: ASP.NET impersonation is controlled by entries in the applications web.config file. Though the default setting is no impersonation, it can be explicitly set using: ...........
Read answer
Difference between Datagrid, Datalist and repeater.
Latest answer: Datagrid: The HTML code generated has an HTML TABLE element created for the particular DataRow and is a tabular representation with Columns and Rows. Datagrid has a in-built support for Sort, Filter and paging the Data...........
Read answer
What are the events in GLOBAL.ASAX file?
Latest answer: Global.asax file contains the following events: Application_Init - Fired when an application initializes or is first called. It is invoked for all HttpApplication object instances.............
Read answer
What are different IIS isolation levels supported in ASP.NET?
Latest answer: IIS has three level of isolation:- LOW (IIS process): In this main IIS process and ASP.NET application run in same process due to which if one crashes, the other is also affected............
Read answer
Difference between Gridlayout and FlowLayout.
Latest answer: GridLayout provides absolute positioning for controls placed on the page. FlowLayout positions items down the page like traditional HTML.........
Read answer
What is Authentication in ASP.NET?
Latest answer: Authentication is the process of verifying user’s details and find if the user is a valid user to the system or not.......
Read answer
What is Authorization in ASP.NET?
Latest answer: Authorization is a process that takes place based on the authentication of the user.......
Read answer 
Explain the concept of Automatic Memory Management in ASP.NET.
Latest answer: The .NET framework has introduced a concept called Garbage collector. This mechanism keeps track of the allocated memory references and releases the memory when it is not in reference..........
Read answer
What is Finalizer in .NET?
Latest answer: Finalizer in .NET are the methods that help in cleanup the code that is executed just before the object is garbage collected..............
Read answer
Explain the types of cookies in ASP.NET.
Latest answer: There are two types of cookies in ASP.NET -Single valued cookies................
Read answer
What are the ways to retain variables between requests?
Latest answer: Following are the ways to retain variables between requests:Context.Handler -This object can be used to retrieve public members of the web form from a subsequent web page...........
Read answer
Describe the Cookies collection in ASP.NET.
Latest answer: Cookies are text files that store information about the user. A user is differentiated from the other by the web server with the help of the cookies. It can also determine where the user had been before with them.............
Read answer
What is the Common Language Specification (CLS)?
Latest answer: The CLS contains constructs and constraints which provides a guideline for library and compiler writers.Any language that supports CLS can then use the libraries due to whic the languages can integrate with each other................
Read answer

No comments:

Post a Comment