ASP.Net Interview Question

Question-What are the main advantages of Passport authentication.

Answer-following advantage we can get by using passport authentication
• The main advantage is user doesn’t have to remember separate names and passwords for various Web pages
• Easy to maintain user profile information in a single location.

Question- In can you describe very short definition of View State?

Answer: In ASP.Net View state is used to maintain or retain values on post back because of http protocol does not identifies user from where comes so view state is work here. It helps in gather data in a page. Another work of View state is its maintain internally as a hidden field in encrypted data.

Question- can you tell me that difference between login controls and Forms authentication?
Answer: login controls can be easily implemented use in Forms authentication without writing any code. In login control validation and credential uses easily performs functions like prompting for user credentials, validating them and issuing authentication just as the FormsAuthentication class.
Question- What is main work of caching in
Answer- In Caching is the technique for storing data and frequently used items in memory so that we can accessed data more quickly and frequently.In web page open take long time to open so we use caching technique for open web page fast By caching feature website page can open fast.By caching data store in memory for a short duration time and when any request comes for that data then its response data from memory fastly.
Question- what is the duration attribute of @OutputCache in page directive?.

Answer- @Output Cache Duration attribute determines how long the page is cached in environment if we set page duration attribute is 30 second then the web page cached for 30 seconds the server save duration in memory and page can be response for 30 seconds if any request comes during that time then page can be retain cached response and if cached duration expired then the next request generates a new response data cached in another 30 seconds again.

Question - Tell me about what is Fragment Caching in ASP.NET?

Answer: in .net fragment caching means store individual user controls within a Web Form. Each individual user control can have independent cache durations in fragment caching and we can implementations easily.

Question- Can you tell me what is partial classes in .net?

Answer: the mail work of Partial classes is that this class allow us to divide the class definition into multiple files (physically).and another way we got Logically, all the partial classes are treated as a single file by the compiler this is the partial class.

Question - Can you explain how to pass a Querystring from an .asp page to aspx page.

Answer: first we open aspx extension file and go source and write following code: this is the example of querry string in
and another way to implement querry string in is write code in server side: <%Response.Redirect "webformName.aspx?id=querrydata"%>

Question-can you tell me how passport authentication works in

Answer-yes, in authentication check on machine that current passport authentication cookies if it is available then does not direct to the passport sign page other wise send to passport authentication page.

Question- Please explain the steps to be involved to use Passport authentication.

Answer-I can explain….
1. First we have to install passport SDK
2. Use the PassportAuthentication_OnAuthenticate event.
3. In web config set passport authentication mode
4. Third step is set authorization to deny unauthenticated users.
5. Last step is implement a sign-out procedure to remove Passport cookies from the user’s machine.
view more interview question in here