Asp .Net Interview Question and Answer | Web Application | Session 09

81. Explain what relationship is between a Process, Application Domain, and Application? 
Ans: A process is an instance of a running application.
          An application is an executable on the hard drive or network. There can be numerous processes launched of the same application (5 copies of Word running), but 1 process can run just 1 application.
 
82. What’s typical about a Windows process in regards to memory allocation? 
Ans: 1. Each process is allocated its own block of available RAM space, no process can access another process’ code or data. If the process crashes, it dies alone without taking the entire OS or a bunch of other applications down.
              Response.redirect(“New Page”)
              Server.transfer(“New Page”)
        2. Response.redirect, first send the request for the new page to the browser then bowser sends the result to the webserver.
              Server.transfer directly communicate with the server to change the page.
        3. Response.redirect changes the url in browser addres bar.
 Server.transfer retains the original url in the browser address bar.
 
83. What is smart navigation?
Ans: Smart navigation is, cursor position is maintained when the page gets refreshed due to the server side validation and the page gets refreshed.
 
84. What is the difference between Literal and Lable Control? 
Ans: We use literals control if we want to typed text using HTML formating and without using property.We typed HTML code in .cs file when used literals.
Lable control when displayed already formated.Typed text can not be formated in .cs file.
 
85. What are the 2 Layouts supported by a Web form in ASP.NET? 
Ans: 1. Grid layout:  Pages using grid layout will not always display correctly in non-Microsoft browsers,and controls are placed exactly where they draw.It means they have absolute positions on the page. Use grid layout for Microsoft Windows–style applications, in which controls are not mixed with large amounts of text.
        2. Flow layout: Controls relative to other elements on the page.
Controls that appear after the new element move down if you add elements at run time.
Flow layout for document-style applications, in which text and controls are intermingled.
 
86. Can you specify authorization settings both in Web.config and in IIS? 
Ans: Yes,It wil be done. For this, the IIS setting is evaluated first and then the setting in Web.config is evaluated. Hence we can say,the most restrictive setting will be used.

87. How do you determine, what is the role of the current user?  
Ans: The User object provides an IsInRole method to determine the role of the current user, as shown in the following example:
if(User.IsInRole("Administrators"))
{
///////
}
 
88. How do you get a User Identity? 
Ans: Using the User object’s Identity property. The Identity property returns an object that includes the user name and role information, as shown in the following code:

private void Page_Load(object sender, System.EventArgs e)
{
     Label1.Text = User.Identity.IsAuthenticated.ToString();
     Label2.Text = User.Identity.Name;
     Label3.Text = User.Identity.AuthenticationType;
}
 
89. What is the default authentication method when you create a new Web application project?  
Ans: Windows authentication is the default authentication method when you create a new Web application project.
 
90. What is the advantage of using Windows authentication in a Web application?
Ans: The advantage of Windows authentication:
        1. Web application can use the exact same security that applies to your corporate network like user names, passwords, and permissions.
        2. To access the Web application users logged on to the network. It is importent that user does'nt logged on again.


Previous Next


:: Click the links below for similar type Questions and answers ::

0 comments:

Post a Comment

 
Design by Wordpress Theme | Bloggerized by Free Blogger Templates | coupon codes