17) Explain the concept of Globalization and Localization?
Globalization is used to create a multilingual application by defining culture specific features like text, date etc. Localization is used to accommodate the cultural differences in an application.
- Satellite Assemblies are the special kinds of assemblies that exist as DLL and contain culture specific resources in a binary format. They stores compiled localized application resources. This can be created using the AL utility and can be deployed even after deployment of the application.
- Satellite Assemblies encapsulates the resources into binary format and thus makes resources lighter and consume lesser space on the disk.
- Connection String of the database.
- Error Page setting.
- Culture specific setting.
- Session States.
- WCF Binding and endpoint details.
- Error Handling
There will be a roundtrip of the page between client and a server in request-response model, so this mechanism is called Post Back.
21) How do we identify that the Page is PostBack ?
In server side code we have a property called "IsPostBack” which is used to identify whether page is posted back or not. We can set the “AutoPostBack” at the control level where page is posted back when the state of control is changed.
22) How the ASP.NET events are processed?
ASP.Net events are processed in the following sequence -
- Control events
23) What is AppSetting Section in “Web.Config” file?
Web.config file defines configuration for a web project. Using “AppSetting” section we can define user defined values. Rather than hard coding the values in an application, developers prefer to keep the key,value pair in appsettings. Below is the sample for adding key value pair–
<add key = “yourkey” value=”yourvalue”/>
24) Explain form authentication using login control?
Login controls encapsulate all the features offered by Forms authentication. Login controls internally use Forms Authentication class to implement security, by prompting for user credentials validating them.
25) Explain Web and Machine configs?
“Web.config” files apply settings to each web application, while “Machine.config” file apply settings to all ASP.NET applications. Basically “Machine.Config” at the machine level and “Web.Config” is at the application level.
26) Explain Session state management options in ASP.NET?
ASP.NET provides In-Process and Out-of-Process state management. In-Process will store the session in memory on the web server. Out-of-Process will store data in an external data source such as SQL Server or a State Server service. Out-of-Process requires that all objects stored in session are serializable.
27) How to turn off cookies for a page?
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.
28) What is the difference between Server.Transfer and Response.Redirect ?
Response.Redirect sends message to the browser saying it to move to some different page, but Server.Transfer does not send any message to the browser but rather redirects the user directly from the server itself. So in ServerTransfer there is no round trip while Response.Redirect has a round trip and will puts more load on server.
29) What is the difference between Authentication and Authorization?
- Authentication is the process in which we are checking the identity of the user to allow the user into the application. So Login is the process of authentication for the application. Now social media authentication is also allowed in many websites to identify the user.
- Authorization sounds same as authentication but it is different. Authorization handles the permission stuff for the user at web page level. Better example will be if the user is authenticated in the website does not mean that user has full permission on all the pages so that can be controlled by authorization.
30) What are the various ways of authentication techniques in ASP.NET?
There are basically three types of authentication modes in ASP.NET –
- Windows Authentication – windows authentication uses our system credentials for the authentication purpose.
- Forms Authentication – This is a form based authentication. Login Control in ASP.NET supports this kind of authentication.
- Passport Authentication - Passport authentication lets you to use Microsoft’s passport service to authenticate users of your application.
31) Explain how to retrieve property settings from .config file ?
By creating an instance of AppSettingsReader class, GetValue method is used by passing the name of the property and the type expected and assign the result to the appropriate variable.