header1.html

Saturday, 19 October 2013

Online Quiz on State Management in ASP.NET



While working in WEB Envrionment with HTTP Protocol it becomes challenging to manage state of web applications as HTTP is stateless protocol. But,State management techniques in ASP.NET are used to maintain user state throughout the application. State management becomes essential while learning WEB Application development,let's have look on how many techniques are there to achieve this,
Main techniques are,
a.Client Side
b.Server Side
c.SQL Server State Management

Client Side State Management Techniques:

  1. ViewState
  2. Hidden fields
  3. Query strings
  4. Cookies
  5. Control state</>

Server Side State Management Techniques:

  1. Application State
  2. Session State
  3. Profile Properties
  4. Database support

In this post I am not going to explain above techniquies in detail rather than I am writing Quiz for above topic to test your knowledge about that.Now you might be thinking that how we will test programming knowledge with Quiz,I know we can test our programming knowledge while actual development/work but we should be aware of the topic what we are going to implement,what is syntax?Is there any impact of your implementation on existing application?what will be performance impact?

So,let's take this simple quiz... ☻☻☻

State management in ASP.NET
1.Which of the following is best approach to maintain state of control on client side across rount-trip of page?
Hidden control
ViewState
Session variable
State property


2. A __________ is a small amount of data that is stored either in a text file on the client file system or in-memory in the client browser session.
View State
Control state
Cookie
Session


3.a.Use when you are transferring small amounts of information from one page to another and security is not an issue.
b.You can use this approach only if you are requesting the same page, or another page via a link.
Which of following is recommended techniques?

Query String
ViewState
Session state
Control state


4.Use __________ when you need to store small amounts of information for a page that will post back to itself or to another page, and when security is not an issue.
Query String
Control state
ViewState
Hidden Fields


5.ASP.NET provides application state via the _______________ class as a method of storing global application-specific information that is visible to the entire application.
HttpApplicationState
HttpSessionState
ApplicationState
SessionState


6.ASP.NET provides a session state, which is available as the ____________ class, as a method of storing session-specific information that is visible only within the session.
HttpApplicationState
HttpSessionState
ApplicationState
SessionState


7.Use ___________ state management technique,when you are storing infrequently changed, global information that is used by many users, and security is not an issue and do not store large quantities of information in application state.
Session State
ViewState
Application State
Profile properties


8.Use_____ state management technique,when you are storing user-specific information that needs to be persisted after the user session is expired and needs to be retrieved again on subsequent visits to your application.
Application State
Profile properties
ViewState
Session State


9.Use_____ state management technique,when you are storing large amounts of information, managing transactions, or the information must survive application and session restarts. Also Data mining is a concern, and security is an issue.
Application state
Session state
Database support
None of these


10.Which of the following is not Server side state management technique?
Control State
Application State
Session State
Profile properties

Wednesday, 2 October 2013

WCF MCQs


WCF is framework used to implement SOAs.After some sample quizzes on WCF like
WCF SET-I
WCF SET-II
WCF SET-III
Here I am with some MCQs on WCF again for uncovered topics like Binding,Contracts.


1._________defines the parameters and return type of an operation.
A.Message contract
B.Data contract
C.Fault contract
D.Operation contract
Click for answer 

D.Operation contract.
2._________an endpoint exposed by the application and that corresponds to a service contract implemented by the application.
A.infrastructure endpoint
B.application endpoint
C.binding
D.None of above
Click for answer 

B.application endpoint
3.It is a procedure defined in a service's code that implements the functionality for an operation.
A.operation contract
B.hosting
C.service operation
D.None of these.
Click for answer 

C.service operation
4.___________ is service that runs within a process application that the developer created.
A.hosted service
B.self-hosted service
C.self service
D.Data service
Click for answer 

B.self-hosted service
5.A secure and interoperable binding that is designed for use with duplex service contracts that allows both services and clients to send and receive messages.
A.WSHttpBinding
B.WS2007HttpBinding
C.WSHttpContextBinding
D.WSDualHttpBinding
Click for answer 

D.WSDualHttpBinding
6.Represents an interoperable binding that supports distributed transactions and secure, reliable sessions.
A.NetTcpBinding
B.WSDualHttpBinding
C.WSHttpBinding
D.NetNamedPipeBinding
Click for answer 

C.WSHttpBinding
7.Represents a queued binding that is suitable for cross-machine communication.
A.NetMsmqBinding
B.WSHttpBinding
C.NetNamedPipeBinding
D.HttpPipeBinding
Click for answer 

A.NetMsmqBinding
8.Represents a binding that a Windows Communication Foundation (WCF) service can use to configure and expose endpoints that are able to communicate with ASMX-based Web services and clients.
A.BasicHttpBinding
B.WSHttpBinding
C.NetMsmqBinding
D.NetNamedPipeBinding
Click for answer 

A.BasicHttpBinding