Asp.Net Interview Questions and Answers
Question - 121 : - What is the transport protocol you use to call a Web service?
Answer - 121 : - SOAP (Simple Object Access Protocol) is the preferred protocol.
Question - 122 : - True or False: A Web service can only be written in .NET?
Answer - 122 : - False
Question - 123 : - What does WSDL stand for?
Answer - 123 : - Web Services Description Language.
Question - 124 : - Where on the Internet would you look for Web services?
Answer - 124 : - http://www.uddi.org
Question - 125 : - True or False: To test a Web service you must create a Windows application or Web application to consume this service?
Answer - 125 : - False, the web service comes with a test page and it provides HTTP-GET method to test.
Question - 126 : - What is ViewState?
Answer - 126 : - back to the server, and is not stored on the server or any other external source. ViewState is used the retain the state of server-side objects between postabacks.
Question - 127 : - What is the lifespan for items stored in ViewState?
Answer - 127 : - Item stored in ViewState exist for the life of the current page. This includes postbacks (to the same page).
Question - 128 : - What does the "EnableViewState" property do? Why would I want it on or off?
Answer - 128 : - It allows the page to save the users input on a form across postbacks. It saves the server-side values for a given control into ViewState, which is stored as a hidden value on the page before sending the page to the clients browser. When the page is posted back to the server the server control is recreated with the state stored in viewstate.
Question - 129 : - What are the different types of Session state management options available with ASP.NET?
Answer - 129 : - ASP.NET provides In-Process and Out-of-Process state management. In-Process stores the session in memory on the web server. This requires the a "sticky-server" (or no load-balancing) so that the user is always reconnected to the same web server. Out-of-Process Session state management stores data in an external data source. The external data source may be either a SQL Server or a State Server service. Out-of-Process state management requires that all objects stored in session are serializable.
Question - 130 : - What is the difference between login controls and Forms authentication?
Answer - 130 : - Forms authentication can be easily implemented using login controls without writing any code.
Login control performs functions like prompting for user credentials, validating them and issuing authentication just as the FormsAuthentication class.
However, all that’s needs to be dne is to drag and drop the use control from the tool box to have these checks performed implicitly.
The FormsAuthentication class is used in the background for the authentication ticket and ASP.NET membership is used to validate the user credentials.