IGNOU BCA MCA Students - VIVA Question Answer for .NET
.NET with C# Selected Question Answer - PART VI
Ques12) What is the difference between authentication
and authorization?
Ans) Authentication verifies the identity of a
user and authorization is a process where you can check whether or not the
identity has access rights to the system. In other words, you can say that
authentication is a procedure of getting some credentials from the users and verify
the user's identity against those credentials. Authorization is a procedure of granting access of particular
resources to an authenticated user. You should note that authentication always
takes place before authorization.
Ques13) Which ASP.NET objects encapsulate the state of
the client and the browser?
Ans) The Session object
encapsulates the state of the client and browser.
Ques14) How can you register a custom server control
to a Web page?
Ans) You can register a custom server control
to a Web page using the @Register directive.
Ques15) What is ViewState?
Ans) The ViewState is a
feature used by ASP.NET Web page to store the value of a page and its controls
just before posting the page. Once the page is posted, the first task by the
page processing is to restore the ViewState to get
the values of the controls.
Ques16) Differentiate between
client-side and server-side validations in Web pages.
Ans) Client-side validations take place at the
client end with the help of JavaScript and VBScript before the Web page is sent
to the server. On the other hand, server-side
validations take place at the server end.
Ques17) What
are difference between GET and POST Methods?
Ans:
GET
Method ():
1) Data is appended to the URL.
2) Data is not secret.
3) It is a single call system
4) Maximum data that can be sent is 256.
5) Data transmission is faster
6) this is the default method for many browsers
POST Method ():
1) Data is not appended to the URL.
2) Data is Secret
3) it is a two call system.
4) There is no Limit on the amount of data. That is characters any amount of data can be sent.
5) Data transmission is comparatively slow.
6) No default and should be explicitly specified.
1) Data is appended to the URL.
2) Data is not secret.
3) It is a single call system
4) Maximum data that can be sent is 256.
5) Data transmission is faster
6) this is the default method for many browsers
POST Method ():
1) Data is not appended to the URL.
2) Data is Secret
3) it is a two call system.
4) There is no Limit on the amount of data. That is characters any amount of data can be sent.
5) Data transmission is comparatively slow.
6) No default and should be explicitly specified.
Ques18) What
are the different levels of State management in ASP.NET?
Ans:
State management is the process by which you maintain state and
page information over multiple requests for the same or different pages.
There are 2 types
State Management:
1. Client – Side State Management
This stores information on the client's computer by embedding the information into a Web page, a uniform resource locator (url), or a cookie. The techniques available to store the state information at the client end are listed down below:
a. View State – Asp.Net uses View State to track the values in the Controls. You can add custom values to the view state. It is used by the Asp.net page framework to automatically save the values of the page and of each control just prior to rendering to the page. When the page is posted, one of the first tasks performed by page processing is to restore view state.
b. Control State – If you create a custom control that requires view state to work properly, you should use control state to ensure other developers don’t break your control by disabling view state.
c. Hidden fields – Like view state, hidden fields store data in an HTML form without displaying it in the user's browser. The data is available only when the form is processed.
d. Cookies – Cookies store a value in the user's browser that the browser sends with every page request to the same server. Cookies are the best way to store state data that must be available for multiple Web pages on a web site.
e. Query Strings - Query strings store values in the URL that are visible to the user. Use query strings when you want a user to be able to e-mail or instant message state data with a URL.
2. Server – Side State Management
a. Application State - Application State information is available to all pages, regardless of which user requests a page.
b. Session State – Session State information is available to all pages opened by a user during a single visit.
Both application state and session state information is lost when the application restarts. To persist user data between application restarts, you can store it using profile properties.
1. Client – Side State Management
This stores information on the client's computer by embedding the information into a Web page, a uniform resource locator (url), or a cookie. The techniques available to store the state information at the client end are listed down below:
a. View State – Asp.Net uses View State to track the values in the Controls. You can add custom values to the view state. It is used by the Asp.net page framework to automatically save the values of the page and of each control just prior to rendering to the page. When the page is posted, one of the first tasks performed by page processing is to restore view state.
b. Control State – If you create a custom control that requires view state to work properly, you should use control state to ensure other developers don’t break your control by disabling view state.
c. Hidden fields – Like view state, hidden fields store data in an HTML form without displaying it in the user's browser. The data is available only when the form is processed.
d. Cookies – Cookies store a value in the user's browser that the browser sends with every page request to the same server. Cookies are the best way to store state data that must be available for multiple Web pages on a web site.
e. Query Strings - Query strings store values in the URL that are visible to the user. Use query strings when you want a user to be able to e-mail or instant message state data with a URL.
2. Server – Side State Management
a. Application State - Application State information is available to all pages, regardless of which user requests a page.
b. Session State – Session State information is available to all pages opened by a user during a single visit.
Both application state and session state information is lost when the application restarts. To persist user data between application restarts, you can store it using profile properties.
Ques19) How many
web.config files are there in 1 project?
Ans: There might be multiple web.config files for a single project
depending on the hierarchy of folders inside the root folder of the project, so
for each folder we can use one web.config file
No comments:
Post a Comment