1)What is the default mapping logic used by ASP.NET MVC ?
Ans)
The default mapping logic used by ASP.NET MVC is as follows :-
/[Controller]/[ActionName]/[Parameters]
For example,
controller = "Home", action = "Index", id = UrlParameter
----------------------------------------------------------------------
2)What is difference between Web site and Web application ?
Ans)
Both function and perform similarly, but still differ in following ways.
Web application:
a) We can't include c# and vb page in single web application.
b) We can set up dependencies between multiple projects.
c) Can not edit individual files after deployment without recompiling.
d) Right choice for enterprise environments where multiple developers work unitedly for creating,testing and deployment.
Web site:
a) Can mix vb and c# page in single website.
b) Can not establish dependencies.
c) Edit individual files after deployment.
d) Right choice when one developer will responsible for creating and managing entire website.
But let me clarify point number (d) for both ?
In Web application, different different groups work on various components independently like one group work on domain layer, other work on UI layer.
In web site development, decoupling is not possible.
-----------------------------------------------------------------------
3)Explain about Authentication and Authorization ?
Ans)
Authentication:
Authentication is the process of verifying the credentials such as username and password of the user and then allows that user to access the server.
This process can be done in many ways like :
Password based authentication
Device based authentication
Biometric authentication
For Example, if you use
Windows based Authentication and are browsing an ASP.NET page from server -- ASP.NET/IIS would automatically use NTLM to authenticate you as user1.
Forms based Authentication, then you would use an html based forms page to enter username/password -- which would then check a database and authenticate you against the username/password in the database.
Authorization:
Authorization is a process of verifying whether the user has got the permission to do the operation that he is requesting.
Ex: In my project we will first authenticate the user is valid or not after that we will check(Authorization) the user is able to access or not.
------------------------------------------------------------------------------------
4)What is the use of AutoPostBack ?
Ans)
AutoPostBack is a feature available that is available on few controls.
The main purpose of this feature is that, if there is any change done on the client side, then it should be handled on the server side.
Usage:
Example:
--------------------------------------
5)What is the difference between Server.Transfer and Response.Redirect ?
Ans)
Both are objects of ASP.Net and are used to transfer user from one page to another page.
Syntax:
Response.Redirect("Default.aspx");
Server.Transfer("Default.aspx");
Server.Transfer() can directly access the values, controls and properties of the previous page whereas you cannot do with Response.Redirect().