Wednesday, March 14, 2012

.NET/ASP.NET Interview Question -What role does Session object play?

HTTP is a stateless protocol; it can't hold the client information on page. In other words after every request and response the server does not remember the state, data and who the user was. If user inserts some information, and move to the next page, that data will be lost and user would not able to retrieve the information.So, Session provides that facility to store information on server memory. Below is the diagram to understand in better manner. In the above example, when the user request the IIS server for the Page1.aspx then the request is broadcasted to the user/client browser and the connection is broken, Now when the same user request the IIS server for the Page2.aspx then again the request is broadcasted to the user/client browser but this time again the same user is treated as a new user as the connection was broken by IIS server after displaying the Page1.aspx page. Note:- So every single time a new request is made the same user is treated as a new one, so in order to maintain this we need Sessions.

.NET/ASP.NET Interview Question - Various types of Validators?

A validator is a computer program used to check the validity or syntactical correctness of a fragment of code or text. IN ASP.NET there are six different types of Validators. 1.Required Field Validator. 2.Regular Expression Validator. 3.Compare Validator. 4.Range Validator. 5.CustomValidator. 6.Validation Summary RequiredFieldValidator:-Ensure that the control has a value to assign in it or user does not skip an entry. For Example:- Regular ExpressionValidator:-Ensure that the value of the control matches the expression of validator that is specified. This type of validation enables you to check for sequence of character, such as e-mail address, telephone number, postal code and so on. For Example:- // for internet E-Mail. CompareValidator:-Ensure that the value of one control should be equal to value of another control.which is commonly used in password,less than,greater than or equal to. For Example:- RangeValidator:-Ensures that the value of the control is in specified lower and upper boundaries or specified range. You can check ranges within pairs of numbers, alphabetic characters. For Example:- > CustomValidator:-This control is used to perform user defined validations. ValidationSummary:-This validator is used to displays a detailed summary on the validation errors that currently exist.

Could not find a part of the path ... bin\roslyn\csc.exe

I am trying to run an ASP.NET MVC (model-view-controller) project retrieved from TFS (Team Foundation Server) source control. I have added a...