Monday, October 31, 2011

Example on Sitemap Control in ASP.Net

In a web application project, one of the very important feature given to user is sitemap control where user can redirect back and front using this control. He can know in which category he is currently in. for example you can check below image, it is from Amazon site where you will lots of pages and lots of categories. This pointed control will be very useful to the user to know in which category he is looking for.



One other way to show all main pages to user is giving all page links in one page as shown below figure.





Creating a Sitemap in Asp.Net >>> 

Friday, October 7, 2011

HR/Manager Interview Questions

Review these typical interview questions and think about how you would
answer them. Read the questions listed; you will also find some strategy
suggestions with it.

*1. Tell me about yourself?*

Ans : The most often asked question in interviews. You need to have a short
statement prepared in your mind. Be careful that it does not sound
rehearsed. Limit it to work-related items unless instructed otherwise. Talk
about things you have done and jobs you have held that relate to the
position you are interviewing for. Start with the item farthest back and
work up to the present.

*2. Why did you leave your last job?*

Ans: Stay positive regardless of the circumstances. Never refer to a
majorproblem with management and never speak ill of supervisors, co-workers
or the organization. If you do, you will be the one looking bad. Keep
smiling and talk about leaving for a positive reason such as an opportunity,
a chance to do something special or other forward-looking reasons.

*3. What experience do you have in this field?*

Ans: Speak about specifics that relate to the position you are applying for.
If you do not have specific experience, get as close as you can.

*4. Do you consider yourself successful?*

Ans:You should always answer yes and briefly explain why. A good explanation
is that you have set goals, and you have met some and are on track to
achieve the others.

*5. What do co-workers say about you?*

Ans: Be prepared with a quote or two from co-workers. Either a specific
statement or a paraphrase will work. Jill Clark, a co-worker at Smith
Company, always said I was the hardest workers she had ever known. It is as
powerful as Jill having said it at the interview herself.

*6. What do you know about this organization?*

This question is one reason to do some research on the organization before
the interview. Find out where they have been and where they are going. What
are the current issues and who are the major players?

*7.. What have you done to improve your knowledge in the last year?*

Try to include improvement activities that relate to the job. A wide variety
of activities can be mentioned as positive self-improvement. Have some good
ones handy to mention.

*8. Are you applying for other jobs?*

Be honest but do not spend a lot of time in this area. Keep the focuson this
job and what you can do for this organization. Anything else is a
distraction.

*9. Why do you want to work for this organization?*

This may take some thought and certainly, should be based on the research
you have done on the organization. Sincerity is extremely important here and
will easily be sensed. Relate it to your long-term career goals.

*10. Do you know anyone who works for us?*

Be aware of the policy on relatives working for the organization. This can
affect your answer even though they asked about friends not relatives. Be
careful to mention a friend only if they are well thought of.

*11. What is your Expected Salary?*

A loaded question. A nasty little game that you will probably lose if you
answer first. So, do not answer it. Instead, say something like, That's a
tough question. Can you tell me the range for this position? In most cases,
the interviewer, taken off guard, will tell you. If not, say that it can
depend on the details of the job. Then give a wide range.

*12. Are you a team player?*

You are, of course, a team player. Be sure to have examples ready. Specifics
that show you often perform for the good of the team rather than for
yourself are good evidence of your team attitude. Do not brag, just say it
in a matter-of-fact tone. This is a key point.

*13. How long would you expect to work for us if hired?*

Specifics here are not good. Something like this should work: I'd like it to
be a long time. Or As long as we both feel I'm doing a good job.

*14. Have you ever had to fire anyone?*

How did you feel about that? This is serious. Do not make light of it or in
any way seem like you like to fire people. At the same time, you will do it
when it is the right thing to do. When it comes to the organization versus
the individual who has created a harmful situation, you will protect the
organization. Remember firing is not the same as layoff or reduction in
force.

*15. What is your philosophy towards work?*

The interviewer is not looking for a long or flowery dissertation here. Do
you have strong feelings that the job gets done? Yes. That's the type of
answer that works best here. Short and positive, showing a benefit to the
organization.

*16. If you had enough money to retire right now, would you?*

Answer yes if you would. But since you need to work, this is the type of
work you prefer. Do not say yes if you do not mean it.

*17. Have you ever been asked to leave a position?*

If you have not, say no. If you have, be honest, brief and avoid saying
negative things about the people or organization involved.

*18. Explain how you would be an asset to this organization ?*

You should be anxious for this question. It gives you a chance to highlight
your best points as they relate to the position being discussed. Give a
little advance thought to this relationship.

*19. Why should we hire you?*

Point out how your assets meet what the organization needs. Do not mention
any other candidates to make a comparison.

*20. Tell me about a suggestion you have made ?*

Have a good one ready. Be sure and use a suggestion that was accepted and
was then considered successful. One related to the type of work applied for
is a real plus.

*21. What irritates you about co-workers?*

This is a trap question. Think real hard but fail to come up with anything
that irritates you. A short statement that you seem to get along with folks
is great.

*22. What is your greatest strength?*

Numerous answers are good, just stay positive. A few good examples: Your
ability to prioritize, Your problem-solving skills, Your ability to work
under pressure, Your ability to focus on projects, Your professional
expertise, Your leadership skills, Your positive attitude

*23. Tell me about your dream job ?*

Stay away from a specific job. You cannot win. If you say the job you are
contending for is it, you strain credibility. If you say another job is it,
you plant the suspicion that you will be dissatisfied with this position if
hired. The best is to stay genetic and say something like: A job where I
love the work, like the people, can contribute andcan't wait to get to work.

*24. Why do you think you would do well at this job?*

Give several reasons and include skills, experience and interest.

*25. What are you looking for in a job?*

See answer # 23

*26. What kind of person would you refuse to work with?*

Do not be trivial. It would take disloyalty to the organization, violence or
lawbreaking to get you to object. Minor objections will label you as a
whiner.

*27. What is more important to you: the money or the work?*

Money is always important, but the work is the most important. There is no
better answer.

*28. What would your previous supervisor say your strongest point is?*

There are numerous good possibilities:Loyalty, Energy, Positive attitude,
Leadership, Team player, Expertise,Initiative, Patience, Hard work,
Creativity, Problem solver

*29. Tell me about a problem you had with a supervisor?*

Biggest trap of all. This is a test to see if you will speak ill of your
boss. If you fall for it and tell about a problem with a former boss, you
may well below the interview right there. Stay positive and develop a poor
memory about any trouble with a supervisor.

*30. What has disappointed you about a job?*

Don't get trivial or negative. Safe areas are few but can include: Not
enough of a challenge. You were laid off in a reduction Company did not win
a contract, which would have given you more responsibility.

*31. Tell me about your ability to work under pressure.*

You may say that you thrive under certain types of pressure. Give an example
that relates to the type of position applied for.

*32. Do your skills match this job or another job more closely?*

Probably this one. Do not give fuel to the suspicion that you may want
another job more than this one.

*33. What motivates you to do your best on the job?*

This is a personal trait that only you can say, but good examples are:
Challenge, Achievement, Recognition

*34. Are you willing to work overtime? Nights? Weekends?*

This is up to you. Be totally honest.

*35. How would you know you were successful on this job?*

Several ways are good measures: You set high standards for yourself and meet
them. Your outcomes are a success. Your boss tell you that you are
successful

*36. Would you be willing to relocate if required?*

You should be clear on this with your family prior to the interview if you
think there is a chance it may come up. Do not say yes just to get the job
if the real answer is no. This can create a lot of problems later on in your
career. Be honest at this point and save yourself future grief.

*37. Are you willing to put the interests of the organization ahead of your
own?*

This is a straight loyalty and dedication question. Do not worry about the
deep ethical and philosophical implications. Just say yes.

*38. Describe your management style ?*

Try to avoid labels. Some of the more common labels, like progressive,
salesman or consensus, can have several meanings or descriptions depending
on which management expert you listen to. The situational style is safe,
because it says you will manage according to the situation, instead of one
size fits all.

*39. What have you learned from mistakes on the job?*

Here you have to come up with something or you strain credibility. Make it
small, well intentioned mistake with a positive lesson learned. An example
would be working too far ahead of colleagues on a project and thus throwing
coordination off.

*40. Do you have any blind spots?*

Trick question. If you know about blind spots, they are no longer blind
spots. Do not reveal any personal areas of concern here. Let them do their
own discovery on your bad points. Do not hand it to them.

*41. If you were hiring a person for this job, what would you look for?*

Be careful to mention traits that are needed and that you have.

*42. Do you think you are overqualified for this position?*

Regardless of your qualifications, state that you are very well qualified
for the position.

*43. How do you propose to compensate for your lack of experience?*

First, if you have experience that the interviewer does not know about,
bring that up: Then, point out (if true) that you are a hard working quick
learner.

*44. What qualities do you look for in a boss?*

Be generic and positive. Safe qualities are knowledgeable, a sense of humor,
fair, loyal to subordinates and holder of high standards. All bosses think
they have these traits.

*45. Tell me about a time when you helped resolve a dispute ?*

between others. Pick a specific incident. Concentrate on your problem
solving technique and not the dispute you settled.

*46. What position do you prefer on a team working on a project?*

Be honest. If you are comfortable in different roles, point that out.

*47. Describe your work ethic ?*

Emphasize benefits to the organization. Things like, determination to get
the job done and work hard but enjoy your work are good.

*48. What has been your biggest professional disappointment?*

Be sure that you refer to something that was beyond your control. Show
acceptance and no negative feelings.

*49. Tell me about the most fun you have had on the job.*

Talk about having fun by accomplishing something for the organization.

*50. Do you have any questions for me?*

Always have some questions prepared. Questions prepared where you will be an
asset to the organization are good. How soon will I be able to be
productive? and What type of projects will I be able to assist on? are
examples.

And Finally Best of Luck Hope you will be succussful in the interview you
are going to face in coming days.

"Never take some one for granted,Hold every person Close to your Heart
because you might wake up one day and realise that you have lost a diamond
while you were too busy collecting stones." Remember this always in life.***
*

Load Runner & QTP Interview Questions

1. What is load testing? - Load testing is to test that if the application
works fine with the loads that result from large number of simultaneous
users, transactions and to determine weather it can handle peak usage
periods.
2. What is Performance testing? - Timing for both read and update
transactions should be gathered to determine whether system functions are
being performed in an acceptable timeframe. This should be done standalone
and then in a multi user environment to determine the effect of multiple
transactions on the timing of a single transaction.
3. Did u use LoadRunner? What version? - Yes. Version 7.2.
4. Explain the Load testing process? -
Step 1: Planning the test. Here, we develop a clearly defined test plan to
ensure the test scenarios we develop will accomplish load-testing
objectives. Step 2: Creating Vusers. Here, we create Vuser scripts that
contain tasks performed by each Vuser, tasks performed by Vusers as a whole,
and tasks measured as transactions. Step 3: Creating the scenario. A
scenario describes the events that occur during a testing session. It
includes a list of machines, scripts, and Vusers that run during the
scenario. We create scenarios using LoadRunner Controller. We can create
manual scenarios as well as goal-oriented scenarios. In manual scenarios, we
define the number of Vusers, the load generator machines, and percentage of
Vusers to be assigned to each script. For web tests, we may create a
goal-oriented scenario where we define the goal that our test has to
achieve. LoadRunner automatically builds a scenario for us. Step 4: Running
the scenario.
We emulate load on the server by instructing multiple Vusers to perform
tasks simultaneously. Before the testing, we set the scenario configuration
and scheduling. We can run the entire scenario, Vuser groups, or individual
Vusers. Step 5: Monitoring the scenario.
We monitor scenario execution using the LoadRunner online runtime,
transaction, system resource, Web resource, Web server resource, Web
application server resource, database server resource, network delay,
streaming media resource, firewall server resource, ERP server resource, and
Java performance monitors. Step 6: Analyzing test results. During scenario
execution, LoadRunner records the performance of the application under
different loads. We use LoadRunner’s graphs and reports to analyze the
application’s performance.
5. When do you do load and performance Testing? - We perform load testing
once we are done with interface (GUI) testing. Modern system architectures
are large and complex. Whereas single user testing primarily on
functionality and user interface of a system component, application testing
focuses on performance and reliability of an entire system. For example, a
typical application-testing scenario might depict 1000 users logging in
simultaneously to a system. This gives rise to issues such as what is the
response time of the system, does it crash, will it go with different
software applications and platforms, can it hold so many hundreds and
thousands of users, etc. This is when we set do load and performance
testing.
6. What are the components of LoadRunner? - The components of LoadRunner are
The Virtual User Generator, Controller, and the Agent process, LoadRunner
Analysis and Monitoring, LoadRunner Books Online.
7. What Component of LoadRunner would you use to record a Script? - The
Virtual User Generator (VuGen) component is used to record a script. It
enables you to develop Vuser scripts for a variety of application types and
communication protocols.
8. What Component of LoadRunner would you use to play Back the script in
multi user mode? - The Controller component is used to playback the script
in multi-user mode. This is done during a scenario run where a vuser script
is executed by a number of vusers in a group.
9. What is a rendezvous point? - You insert rendezvous points into Vuser
scripts to emulate heavy user load on the server. Rendezvous points instruct
Vusers to wait during test execution for multiple Vusers to arrive at a
certain point, in order that they may simultaneously perform a task. For
example, to emulate peak load on the bank server, you can insert a
rendezvous point instructing 100 Vusers to deposit cash into their accounts
at the same time.
10. What is a scenario? - A scenario defines the events that occur during
each testing session. For example, a scenario defines and controls the
number of users to emulate, the actions to be performed, and the machines on
which the virtual users run their emulations.
11. Explain the recording mode for web Vuser script? - We use VuGen to
develop a Vuser script by recording a user performing typical business
processes on a client application. VuGen creates the script by recording the
activity between the client and the server. For example, in web based
applications, VuGen monitors the client end of the database and traces all
the requests sent to, and received from, the database server. We use VuGen
to: Monitor the communication between the application and the server;
Generate the required function calls; and Insert the generated function
calls into a Vuser script.
12. Why do you create parameters? - Parameters are like script variables.
They are used to vary input to the server and to emulate real users.
Different sets of data are sent to the server each time the script is run.
Better simulate the usage model for more accurate testing from the
Controller; one script can emulate many different users on the system.
13. What is correlation? Explain the difference between automatic
correlation and manual correlation? - Correlation is used to obtain data
which are unique for each run of the script and which are generated by
nested queries. Correlation provides the value to avoid errors arising out
of duplicate values and also optimizing the code (to avoid nested queries).
Automatic correlation is where we set some rules for correlation. It can be
application server specific. Here values are replaced by data which are
created by these rules. In manual correlation, the value we want to
correlate is scanned and create correlation is used to correlate.
14. How do you find out where correlation is required? Give few examples
from your projects? - Two ways: First we can scan for correlations, and see
the list of values which can be correlated. From this we can pick a value to
be correlated. Secondly, we can record two scripts and compare them. We can
look up the difference file to see for the values which needed to be
correlated. In my project, there was a unique id developed for each
customer, it was nothing but Insurance Number, it was generated
automatically and it was sequential and this value was unique. I had to
correlate this value, in order to avoid errors while running my script. I
did using scan for correlation.
15. Where do you set automatic correlation options? - Automatic correlation
from web point of view can be set in recording options and correlation tab.
Here we can enable correlation for the entire script and choose either issue
online messages or offline actions, where we can define rules for that
correlation. Automatic correlation for database can be done using show
output window and scan for correlation and picking the correlate query tab
and choose which query value we want to correlate. If we know the specific
value to be correlated, we just do create correlation for the value and
specify how the value to be created.
16. What is a function to capture dynamic values in the web Vuser script? -
Web_reg_save_param function saves dynamic data information to a parameter.
17. When do you disable log in Virtual User Generator, When do you choose
standard and extended logs? - Once we debug our script and verify that it is
functional, we can enable logging for errors only. When we add a script to a
scenario, logging is automatically disabled. Standard Log Option: When you
select
Standard log, it creates a standard log of functions and messages sent
during script execution to use for debugging. Disable this option for large
load testing scenarios. When you copy a script to a scenario, logging is
automatically disabled Extended Log Option: Select
extended log to create an extended log, including warnings and other
messages. Disable this option for large load testing scenarios. When you
copy a script to a scenario, logging is automatically disabled. We can
specify which additional information should be added to the extended log
using the Extended log options.
18. How do you debug a LoadRunner script? - VuGen contains two options to
help debug Vuser scripts-the Run Step by Step command and breakpoints. The
Debug settings in the Options dialog box allow us to determine the extent of
the trace to be performed during scenario execution. The debug information
is written to the Output window. We can manually set the message class
within your script using the lr_set_debug_message function. This is useful
if we want to receive debug information about a small section of the script
only.
19. How do you write user defined functions in LR? Give me few functions you
wrote in your previous project? - Before we create the User Defined
functions we need to create the external
library (DLL) with the function. We add this library to VuGen bin directory.
Once the library is added then we assign user defined function as a
parameter. The function should have the following format: __declspec
(dllexport) char* (char*, char*)Examples of user defined
functions are as follows:GetVersion, GetCurrentTime, GetPltform are some of
the user defined functions used in my earlier project.
20. What are the changes you can make in run-time settings? - The Run Time
Settings that we make are: a) Pacing - It has iteration count. b) Log -
Under this we have Disable Logging Standard Log and c) Extended Think Time -
In think time we have two options like Ignore think time and Replay think
time. d) General - Under general tab we can set the vusers as process or as
multithreading and whether each step as a transaction.
21. Where do you set Iteration for Vuser testing? - We set Iterations in the
Run Time Settings of the VuGen. The navigation for this is Run time
settings, Pacing tab, set number of iterations.
22. How do you perform functional testing under load? - Functionality under
load can be tested by running several Vusers concurrently. By increasing the
amount of Vusers, we can determine how much load the server can sustain.
23. What is Ramp up? How do you set this? - This option is used to gradually
increase the amount of Vusers/load on the server. An initial value is set
and a value to wait between intervals can be
specified. To set Ramp Up, go to ‘Scenario Scheduling Options’
24. What is the advantage of running the Vuser as thread? - VuGen provides
the facility to use multithreading. This enables more Vusers to be run per
generator. If the Vuser is run as a process, the same driver program is
loaded into memory for each Vuser, thus taking up a large amount of memory.
This limits the number of Vusers that can be run on a single
generator. If the Vuser is run as a thread, only one instance of the driver
program is loaded into memory for the given number of
Vusers (say 100). Each thread shares the memory of the parent driver
program, thus enabling more Vusers to be run per generator.
25. If you want to stop the execution of your script on error, how do you do
that? - The lr_abort function aborts the execution of a Vuser script. It
instructs the Vuser to stop executing the Actions section, execute the
vuser_end section and end the execution. This function is useful when you
need to manually abort a script execution as a result of a specific error
condition. When you end a script using this function, the Vuser is assigned
the status "Stopped". For this to take effect, we have to first uncheck the
“Continue on error” option in Run-Time Settings.
26. What is the relation between Response Time and Throughput? - The
Throughput graph shows the amount of data in bytes that the Vusers received
from the server in a second. When we compare this with the transaction
response time, we will notice that as throughput decreased, the response
time also decreased. Similarly, the peak throughput and highest response
time would occur approximately at the same time.
27. Explain the Configuration of your systems? - The configuration of our
systems refers to that of the client machines on which we run the Vusers.
The configuration of any client machine includes its hardware settings,
memory, operating system, software applications, development tools, etc.
This system component configuration should match with the overall system
configuration that would include the network infrastructure, the web server,
the database server, and any other components that go with this larger
system so as to achieve the load testing objectives.
28. How do you identify the performance bottlenecks? - Performance
Bottlenecks can be detected by using monitors. These monitors might be
application server monitors, web server monitors, database server monitors
and network monitors. They help in finding out the troubled area in our
scenario which causes increased response time. The measurements made are
usually performance response time, throughput, hits/sec, network delay
graphs, etc.
29. If web server, database and Network are all fine where could be the
problem? - The problem could be in the system itself or in the application
server or in the code written for the application.
30. How did you find web server related issues? - Using Web resource
monitors we can find the performance of web servers. Using these monitors we
can analyze throughput on the web server, number of hits per second that
occurred during scenario, the number of http responses per second, the
number of downloaded pages per second.
31. How did you find database related issues? - By running “Database”
monitor and help of “Data Resource Graph” we can find database related
issues. E.g. You can specify the resource you want to measure on before
running the controller and than you can see database related issues
32. Explain all the web recording options?
33. What is the difference between Overlay graph and Correlate graph? -
Overlay Graph: It overlay the content of two graphs that shares a common
x-axis. Left Y-axis on the merged graph show’s the current graph’s value &
Right Y-axis show the value of Y-axis of the graph that was merged.
Correlate Graph: Plot the Y-axis of two graphs against each other. The
active graph’s Y-axis becomes X-axis of merged graph. Y-axis of the graph
that was merged becomes merged graph’s Y-axis.
34. How did you plan the Load? What are the Criteria? - Load test is planned
to decide the number of users, what kind of machines we are going to use and
from where they are run. It is based on 2 important documents, Task
Distribution Diagram and Transaction profile. Task Distribution Diagram
gives us the information on number of users for a particular transaction and
the time of the load. The peak usage and off-usage are decided from this
Diagram. Transaction profile gives us the information about the transactions
name and their priority levels with regard to the scenario we are deciding.
35. What does vuser_init action contain? - Vuser_init action contains
procedures to login to a server.
36. What does vuser_end action contain? - Vuser_end section contains log off
procedures.
37. What is think time? How do you change the threshold? - Think time is the
time that a real user waits between actions. Example: When a user receives
data from a server, the user may wait several seconds to review the data
before responding. This delay is known as the think time. Changing the
Threshold: Threshold level is the level below which the recorded think time
will be ignored. The default value is five (5) seconds. We can change the
think time threshold in the Recording options of the Vugen.
38. What is the difference between standard log and extended log? - The
standard log sends a subset of functions and messages sent during script
execution to a log. The subset depends on the Vuser type Extended log sends
a detailed script execution messages to the output log. This is mainly used
during debugging when we want information about: Parameter substitution.
Data returned by the server. Advanced trace.
39. Explain the following functions: - lr_debug_message - The
lr_debug_message function sends a debug message to the output log when the
specified message class is set. lr_output_message - The lr_output_message
function sends notifications to the Controller Output window and the Vuser
log file. lr_error_message - The lr_error_message function sends an error
message to the LoadRunner Output window. lrd_stmt - The lrd_stmt function
associates a character string (usually a SQL statement) with a cursor. This
function sets a SQL statement to be processed. lrd_fetch - The lrd_fetch
function fetches the next row from the result set.
40. Throughput - If the throughput scales upward as time progresses and the
number of Vusers increase, this indicates that the bandwidth is sufficient.
If the graph were to remain relatively flat as the number of Vusers
increased, it would
be reasonable to conclude that the bandwidth is constraining the volume of
data delivered.
41. Types of Goals in Goal-Oriented Scenario - Load Runner provides you with
five different types of goals in a goal oriented scenario:
o The number of concurrent Vusers
o The number of hits per second
o The number of transactions per second
o The number of pages per minute
o The transaction response time that you want your scenario
42. Analysis Scenario (Bottlenecks): In Running Vuser graph correlated with
the response time graph you can see that as the number of Vusers increases,
the average response time of the check itinerary transaction very gradually
increases. In other words, the average response time steadily increases as
the load
increases. At 56 Vusers, there is a sudden, sharp increase in the average
response
time. We say that the test broke the server. That is the mean time before
failure (MTBF). The response time clearly began to degrade when there were
more than 56 Vusers running simultaneously.
43. What is correlation? Explain the difference between automatic
correlation and manual correlation? - Correlation is used to obtain data
which are unique for each run of the script and which are generated by
nested queries. Correlation provides the value to avoid errors arising out
of duplicate values and also optimizing the code (to avoid nested queries).
Automatic correlation is where we set some rules for correlation. It can be
application server specific. Here values are replaced by data which are
created by these rules. In manual correlation, the value we want to
correlate is scanned and create correlation is used to correlate.
44. Where do you set automatic correlation options? - Automatic correlation
from web point of view, can be set in recording options and correlation tab.
Here we can enable correlation for the entire script and choose either issue
online messages or offline actions, where we can define rules for that
correlation. Automatic correlation for database, can be done using show
output window and scan for correlation and picking the correlate query tab
and choose which query value we want to correlate. If we know the specific
value to be correlated, we just do create correlation for the value and
specify how the value to be created.
45. What is a function to capture dynamic values in the web vuser script? -
Web_reg_save_param function saves dynamic data information to a parameter.

QTP interview questions


1. What are the Features & Benefits of Quick Test Pro (QTP 8.0)? - Operates
stand-alone, or integrated into Mercury Business Process Testing and Mercury
Quality Center. Introduces next-generation zero-configuration Keyword Driven
testing technology in Quick Test Professional 8.0 allowing for fast test
creation, easier maintenance, and more powerful data-driving capability.
Identifies objects with Unique Smart Object Recognition, even if they change
from build to build, enabling reliable unattended script execution.
Collapses test documentation and test creation to a single step with
Auto-documentation technology. Enables thorough validation of applications
through a full complement of checkpoints.
2. How to handle the exceptions using recovery scenario manager in QTP? -
There are 4 trigger events during which a recovery scenario should be
activated. A pop up window appears in an opened application during the test
run: A property of an object changes its state or value, A step in the test
does not run successfully, An open application fails during the test run,
These triggers are considered as exceptions.You can instruct QTP to recover
unexpected events or errors that occurred in your testing environment during
test run. Recovery scenario manager provides a wizard that guides you
through the defining recovery scenario. Recovery scenario has three steps:
1. Triggered Events 2. Recovery steps 3. Post Recovery Test-Run
3. What is the use of Text output value in QTP? - Output values enable to
view the values that the application talks during run time. When
parameterized, the values change for each iteration. Thus by creating output
values, we can capture the values that the application takes for each run
and output them to the data table.
4. How to use the Object spy in QTP 8.0 version? - There are two ways to Spy
the objects in QTP: 1) Thru file toolbar, In the File Toolbar click on the
last toolbar button (an icon showing a person with hat). 2) True Object
repository Dialog, In Object repository dialog click on the button object
spy. In the Object spy Dialog click on the button showing hand symbol. The
pointer now changes in to a hand symbol and we have to point out the object
to spy the state of the object if at all the object is not visible. or
window is minimized then, hold the Ctrl button and activate the required
window to and release the Ctrl button.
5. How Does Run time data (Parameterization) is handled in QTP? - You can
then enter test data into the Data Table, an integrated spreadsheet with the
full functionality of Excel, to manipulate data sets and create multiple
test iterations, without programming, to expand test case coverage. Data can
be typed in or imported from databases, spreadsheets, or text files.
6. What is keyword view and Expert view in QTP? - Quick Test’s Keyword
Driven approach, test automation experts have full access to the underlying
test and object properties, via an integrated scripting and debugging
environment that is round-trip synchronized with the Keyword View. Advanced
testers can view and edit their tests in the Expert View, which reveals the
underlying industry-standard VBScript that Quick Test Professional
automatically generates. Any changes made in the Expert View are
automatically synchronized with the Keyword View.
7. Explain about the Test Fusion Report of QTP? - Once a tester has run a
test, a Test Fusion report displays all aspects of the test run: a
high-level results overview, an expandable Tree View of the test specifying
exactly where application failures occurred, the test data used, application
screen shots for every step that highlight any discrepancies, and detailed
explanations of each checkpoint pass and failure. By combining Test Fusion
reports with Quick Test Professional, you can share reports across an entire
QA and development team.
8. Which environments does QTP support? - Quick Test Professional supports
functional testing of all enterprise environments, including Windows,
Web,..NET, Java/J2EE, SAP, Siebel, Oracle, PeopleSoft, Visual Basic,
ActiveX, mainframe terminal emulators, and Web services.
9. What is QTP? - Quick Test is a graphical interface record-playback
automation tool. It is able to work with any web, java or windows client
application. Quick Test enables you to test standard web objects and ActiveX
controls. In addition to these environments, Quick Test Professional also
enables you to test Java applets and applications and multimedia objects on
Applications as well as standard Windows applications, Visual Basic 6
applications and.NET framework applications
10. Explain QTP Testing process? - Quick Test testing process consists of 6
main phases:
11. Create your test plan - Prior to automating there should be a detailed
description of the test including the exact steps to follow, data to be
input, and all items to be verified by the test. The verification
information should include both data validations and existence or state
verifications of objects in the application.
12. Recording a session on your application - As you navigate through your
application, Quick Test graphically displays each step you perform in the
form of a collapsible icon-based test tree. A step is any user action that
causes or makes a change in your site, such as clicking a link or image, or
entering data in a form.
13. Enhancing your test - Inserting checkpoints into your test lets you
search for a specific value of a page, object or text string, which helps
you identify whether or not your application is functioning correctly. NOTE:
Checkpoints can be added to a test as you record it or after the fact via
the Active Screen. It is much easier and faster to add the checkpoints
during the recording process. Broadening the scope of your test by replacing
fixed values with parameters lets you check how your application performs
the same operations with multiple sets of data. Adding logic and conditional
statements to your test enables you to add sophisticated checks to your
test.
14. Debugging your test - If changes were made to the script, you need to
debug it to check that it operates smoothly and without interruption.
15. Running your test on a new version of your application - You run a test
to check the behavior of your application. While running, Quick Test
connects to your application and performs each step in your test.
16. Analyzing the test results - You examine the test results to pinpoint
defects in your application.
17. Reporting defects - As you encounter failures in the application when
analyzing test results, you will create defect reports in Defect Reporting
Tool.
18. Explain the QTP Tool interface. - It contains the following key
elements: Title bar, displaying the name of the currently open test, Menu
bar, displaying menus of Quick Test commands, File toolbar, containing
buttons to assist you in managing tests, Test toolbar, containing buttons
used while creating and maintaining tests, Debug toolbar, containing buttons
used while debugging tests. Note: The Debug toolbar is not displayed when
you open Quick Test for the first time. You can display the Debug toolbar by
choosing View — Toolbars — Debug. Action toolbar, containing buttons and a
list of actions, enabling you to view the details of an individual action or
the entire test flow. Note: The Action toolbar is not displayed when you
open Quick Test for the first time. You can display the Action toolbar by
choosing View — Toolbars — Action. If you insert a reusable or external
action in a test, the Action toolbar is displayed automatically. Test pane,
containing two tabs to view your test-the Tree View and the Expert View
,Test Details pane, containing the Active Screen. Data Table, containing two
tabs, Global and Action, to assist you in parameterizing your test. Debug
Viewer pane, containing three tabs to assist you in debugging your
test-Watch Expressions, Variables, and Command. (The Debug Viewer pane can
be opened only when a test run pauses at a breakpoint.) Status bar,
displaying the status of the test
19. How does QTP recognize Objects in AUT? - Quick Test stores the
definitions for application objects in a file called the Object Repository.
As you record your test, Quick Test will add an entry for each item you
interact with. Each Object Repository entry will be identified by a logical
name (determined automatically by Quick Test), and will contain a set of
properties (type, name, etc) that uniquely identify each object. Each line
in the Quick Test script will contain a reference to the object that you
interacted with, a call to the appropriate method (set, click, check) and
any parameters for that method (such as the value for a call to the set
method). The references to objects in the script will all be identified by
the logical name, rather than any physical, descriptive properties.
20. What are the types of Object Repositories in QTP? - Quick Test has two
types of object repositories for storing object information: shared object
repositories and action object repositories. You can choose which type of
object repository you want to use as the default type for new tests, and you
can change the default as necessary for each new test. The object repository
per-action mode is the default setting. In this mode, Quick Test
automatically creates an object repository file for each action in your test
so that you can create and run tests without creating, choosing, or
modifying object repository files. However, if you do modify values in an
action object repository, your changes do not have any effect on other
actions. Therefore, if the same test object exists in more than one action
and you modify an object’s property values in one action, you may need to
make the same change in every action (and any test) containing the object.
21. Explain the check points in QTP? - A checkpoint verifies that expected
information is displayed in an Application while the test is running. You
can add eight types of checkpoints to your test for standard web objects
using QTP. A page checkpoint checks the characteristics of an Application. A
text checkpoint checks that a text string is displayed in the appropriate
place on an Application. An object checkpoint (Standard) checks the values
of an object on an Application. An image checkpoint checks the values of an
image on an Application. A table checkpoint checks information within a
table on a Application. An Accessibilityy checkpoint checks the web page for
Section 508 compliance. An XML checkpoint checks the contents of individual
XML data files or XML documents that are part of your Web application. A
database checkpoint checks the contents of databases accessed by your web
site
22. In how many ways we can add check points to an application using QTP? -
We can add checkpoints while recording the application or we can add after
recording is completed using Active screen (Note : To perform the second one
The Active screen must be enabled while recording).
23. How does QTP identify objects in the application? - QTP identifies the
object in the application by Logical Name and Class.
24. What is Parameterizing Tests? - When you test your application, you may
want to check how it performs the same operations with multiple sets of
data. For example, suppose you want to check how your application responds
to ten separate sets of data. You could record ten separate tests, each with
its own set of data. Alternatively, you can create a parameterized test that
runs ten times: each time the test runs, it uses a different set of data.
25. What is test object model in QTP? - The test object model is a large set
of object types or classes that Quick Test uses to represent the objects in
your application. Each test object class has a list of properties that can
uniquely identify objects of that class and a set of relevant methods that
Quick Test can record for it. A test object is an object that Quick Test
creates in the test or component to represent the actual object in your
application. Quick Test stores information about the object that will help
it identify and check the object during the run session.
26. What is Object Spy in QTP? - Using the Object Spy, you can view the
properties of any object in an open application. You use the Object Spy
pointer to point to an object. The Object Spy displays the selected object’s
hierarchy tree and its properties and values in the Properties tab of the
Object Spy dialog box.
27. What is the Diff between Image check-point and Bit map Check point? -
Image checkpoints enable you to check the properties of a Web image. You can
check an area of a Web page or application as a bitmap. While creating a
test or component, you specify the area you want to check by selecting an
object. You can check an entire object or any area within an object. Quick
Test captures the specified object as a bitmap, and inserts a checkpoint in
the test or component. You can also choose to save only the selected area of
the object with your test or component in order to save disk Space. For
example, suppose you have a Web site that can display a map of a city the
user specifies. The map has control keys for zooming. You can record the new
map that is displayed after one click on the control key that zooms in the
map. Using the bitmap checkpoint, you can check that the map zooms in
correctly. You can create bitmap checkpoints for all supported testing
environments (as long as the appropriate add-ins are loaded). Note: The
results of bitmap checkpoints may be affected by factors such as operating
system, screen resolution, and color settings.
28. How many ways we can parameterize data in QTP? - There are four types of
parameters: Test, action or component parameters enable you to use values
passed from your test or component, or values from other actions in your
test. Data Table parameters enable you to create a data-driven test (or
action) that runs several times using the data you supply. In each
repetition, or iteration, Quick Test uses a different value from the Data
Table. Environment variable parameters enable you to use variable values
from other sources during the run session. These may be values you supply,
or values that Quick Test generates for you based on conditions and options
you choose. Random number parameters enable you to insert random numbers as
values in your test or component. For example, to check how your application
handles small and large ticket orders, you can have Quick Test generate a
random number and insert it in a number of tickets edit field.
29. How do u do batch testing in WR & is it possible to do in QTP, if so
explain? - Batch Testing in WR is nothing but running the whole test set by
selecting Run Test set from the Execution Grid. The same is possible with
QTP also. If our test cases are automated then by selecting Run Test set all
the test scripts can be executed. In this process the Scripts get executed
one by one by keeping all the remaining scripts in Waiting mode.
30. If I give some thousand tests to execute in 2 days what do u do? - Adhoc
testing is done. It Covers the least basic functionalities to verify that
the system is working fine.
31. What does it mean when a check point is in red color? what do u do? - A
red color indicates failure. Here we analyze the cause for failure whether
it is a Script Issue or Environment Issue or a Application issue.
32. What is Object Spy in QTP? - Using the Object Spy, you can view the
properties of any object in an open application. You use the Object Spy
pointer to point to an object. The Object Spy displays the selected object’s
hierarchy tree and its properties and values in the Properties tab of the
Object Spy dialog box.
33. What is the file extension of the code file & object repository

ASP.Net Interview Questions

Describe the role of inetinfo.exe, aspnet_isapi. dll and aspnet_wp.exe in the page loading process ?

Ans : inetinfo.exe is the Microsoft IIS server running, handling ASP.NET requests among other things. When an ASP.NET request is received (usually a file with .aspx extension), the ISAPI filter aspnet_isapi. dll takes care of it by passing the request to the actual worker process aspnet_wp.exe.

2. What’s the difference between Response.Write( ) and Response.Output. Write()?
Ans : Response.Output. Write() allows you to write formatted output.

3. What methods are fired during the page load?
Ans : Init() - when the page is instantiated
Load() - when the page is loaded into server memory
PreRender() - the brief moment before the page is displayed to the user as HTML
Unload() - when page finishes loading.

4. When during the page processing cycle is ViewState available?
Ans : After the Init() and before the Page_Load(), or OnLoad() for a control.

5. What namespace does the Web page belong in the .NET Framework class hierarchy?
Ans : System.Web.UI. Page

6. Where do you store the information about the user’s locale?
Ans : System.Web.UI. Page.Culture

7. What’s the difference between Codebehind=" MyCode.aspx. cs" and Src="MyCode. aspx.cs"?
Ans : CodeBehind is relevant to Visual Studio.NET only.

8. What’s a bubbled event?
Ans : When you have a complex control, like DataGrid, writing an event processing routine for each object (cell, button, row, etc.) is quite tedious. The controls can bubble up their event handlers, allowing the main DataGrid event handler to take care of its constituents.
9. Suppose you want a certain ASP.NET function executed on MouseOver for a certain button. Where do you add an event handler?
Ans : Add an OnMouseOver attribute to the button. Example: btnSubmit.Attribute s.Add("onmouseov er","someClientC odeHere() ;");

10. What data types do the RangeValidator control support?
Ans : Integer, String, and Date.

11. Explain the differences between Server-side and Client-side code?
Ans : Server-side code executes on the server. Client-side code executes in the client's browser.

12. What type of code (server or client) is found in a Code-Behind class?
Ans : The answer is server-side code since code-behind is executed on the server. However, during the code-behind' s execution on the server, it can render client-side code such as JavaScript to be processed in the clients browser. But just to be clear, code-behind executes on the server, thus making it server-side code.

13. Should user input data validation occur server-side or client-side? Why?
Ans : All user input data validation should occur on the server at a minimum. Additionally, client-side validation can be performed where deemed appropriate and feasable to provide a richer, more responsive experience for the user.

14. What is the difference between Server.Transfer and Response.Redirect? Why would I choose one over the other?
Ans : Server.Transfer transfers page processing from one page directly to the next page without making a round-trip back to the client's browser. This provides a faster response with a little less overhead on the server. Server.Transfer does not update the clients url history list or current url. Response.Redirect is used to redirect the user's browser to another page or site. This perform as a trip back to the client where the client's browser is redirected to the new page. The user's browser history list is updated to reflect the new address.




15. Can you explain the difference between an ADO.NET Dataset and an ADO Recordset?
Valid answers are:
· A DataSet can represent an entire relational database in memory, complete with tables, relations, and views.
· A DataSet is designed to work without any continuing connection to the original data source.
· Data in a DataSet is bulk-loaded, rather than being loaded on demand.
· There's no concept of cursor types in a DataSet.
· DataSets have no current record pointer You can use For Each loops to move through the data.
· You can store many edits in a DataSet, and write them to the original data source in a single operation.
· Though the DataSet is universal, other objects in ADO.NET come in different versions for different data sources.

16. What is the Global.asax used for?
Ans : The Global.asax (including the Global.asax. cs file) is used to implement application and session level events.

17. What are the Application_ Start and Session_Start subroutines used for?
Ans : This is where you can set the specific variables for the Application and Session objects.

18. Can you explain what inheritance is and an example of when you might use it?
Ans : When you want to inherit (use the functionality of) another class. Example: With a base class named Employee, a Manager class could be derived from the Employee base class.

19. Whats an assembly?
Ans : Assemblies are the building blocks of the .NET framework.

20. Describe the difference between inline and code behind.
Ans : Inline code written along side the html in a page. Code-behind is code written in a separate file and referenced by the .aspx page.

21. Explain what a diffgram is, and a good use for one?
Ans : The DiffGram is one of the two XML formats that you can use to render DataSet object contents to XML. A good use is reading database data to an XML file to be sent to a Web Service.


22. Whats MSIL, and why should my developers need an appreciation of it if at all?
Ans : MSIL is the Microsoft Intermediate Language. All .NET compatible languages will get converted to MSIL. MSIL also allows the .NET Framework to JIT compile the assembly on the installed computer.


23. Which method do you invoke on the DataAdapter control to load your generated dataset with data?
Ans : The Fill() method.

24. Can you edit data in the Repeater control?
Ans : No, it just reads the information from its data source.

25. Which template must you provide, in order to display data in a Repeater control?
Ans : ItemTemplate.

26. How can you provide an alternating color scheme in a Repeater control?
Ans : Use the AlternatingItemTemp late.

27. What property must you set, and what method must you call in your code, in order to bind the data from a data source to the Repeater control?
Ans : You must set the DataSource property and call the DataBind method.

28. What base class do all Web Forms inherit from?
Ans : The Page class.

29. Name two properties common in every validation control?
Ans : ControlToValidate property and Text property.

30. Which property on a Combo Box do you set with a column name, prior to setting the DataSource, to display data in the combo box?
Ans : DataTextField property.

31. Which control would you use if you needed to make sure the values in two different controls matched?
Ans : CompareValidator control.


32. How many classes can a single .NET DLL contain?
Ans : It can contain many classes.

33. What is ViewState?
Ans : ViewState allows the state of objects (serializable) to be stored in a hidden field on the page. ViewState is transported to the client and back to the server, and is not stored on the server or any other external source. ViewState is used to retain the state of server-side objects between post backs.

34. What is the lifespan for items stored in ViewState?
Ans : Item stored in ViewState exist for the life of the current page. This includes postbacks (to the same page).

35. What does the "EnableViewState" property do? Why would I want it on or off?
Ans : 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.

36. What are the different types of Session state management options available with ASP.NET?
Ans : 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.

37. What is CLS (Common Language Specificaiton) ?
Ans : It provides the set of specificaiton which has to be adhered by any new language writer / Compiler writer for .NET Framework. This ensures Interoperability. For example: Within a ASP.NET application written in C#.NET language, we can refer to any DLL written in any other language supported by .NET Framework. As of now .NET Supports around 32 languages.

38. What is CTS (Common Type System)?
Ans : It defines about how Objects should be declard, defined and used within .NET. CLS is the subset of CTS.
39. What is Boxing and UnBoxing?
Ans : Boxing is implicit conversion of ValueTypes to Reference Types (Object). UnBoxing is explicit conversion of Reference Types (Object) to its equivalent ValueTypes. It requires type-casting.

40. What is the difference between Value Types and Reference Types?
Ans : Value Types uses Stack to store the data where as the later uses the Heap to store the data.

41. What are the different types of assemblies available and their purpose?
Ans : Private, Public/shared and Satellite Assemblies.

Private Assemblies : Assembly used within an application is known as private assemblies.

Public/shared Assemblies : Assembly which can be shared across applicaiton is known as shared assemblies. Strong Name has to be created to create a shared assembly. This can be done using SN.EXE. The same has to be registered using GACUtil.exe (Global Assembly Cache).

Satellite Assemblies : These assemblies contain resource files pertaining to a locale (Culture+Language) . These assemblies are used in deploying an Gloabl applicaiton for different languages.

42. What is view state and use of it? The current property settings of an ASP.NET page and those of any ASP.NET server controls contained within the page. ASP.NET can detect when a form is requested for the first time versus when the form is posted (sent to the server), which allows you to program accordingly.

43. What are user controls and custom controls?
Custom controls: A control authored by a user or a third-party software vendor that does not belong to the .NET Framework class library. This is a generic term that includes user controls. A custom server control is used in Web Forms (ASP.NET pages). A custom client control is used in Windows Forms applications.
User Controls: In ASP.NET: A user-authored server control that enables an ASP.NET page to be re-used as a server control. An ASP.NET user control is authored declaratively and persisted as a text file with an .ascx extension. The ASP.NET page framework compiles a user control on the fly to a class that derives from the System.Web.UI. UserControl class.

44. What are the validation controls? A set of server controls included with ASP.NET that test user input in HTML and Web server controls for programmer-defined requirements. Validation controls perform input checking in server code. If the user is working with a browser that supports DHTML, the validation controls can also perform validation using client script.

45. What's the difference between Response.Write( ) andResponse. Output.Write( )? The latter one allows you to write formattedoutput.

46. What methods are fired during the page load? Init()
When the page is instantiated, Load() - when the page is loaded into server memory,PreRender () - the brief moment before the page is displayed to the user as HTML, Unload() - when page finishes loading.

47. Where does the Web page belong in the .NET Framework class hierarchy?
System.Web.UI. Page

48. Where do you store the information about the user's locale?
System.Web.UI. Page.Culture

49. What's the difference between Codebehind=" MyCode.aspx. cs" and Src="MyCode. aspx.cs"? CodeBehind is relevant to Visual Studio.NET only.

50. What's a bubbled event? When you have a complex control, likeDataGrid, writing an event processing routine for each object (cell, button,row, etc.) is quite tedious. The controls can bubble up their eventhandlers, allowing the main DataGrid event handler to take care of its constituents. Suppose you want a certain ASP.NET function executed on MouseOver over a certain button.

51. Where do you add an event handler? It's the Attributesproperty, the Add function inside that property. e.g. btnSubmit.Attribute s.Add("onMouseOv er","someClientC ode();")

52. What data type does the RangeValidator control support?
Integer,String and Date.


53. What are the different types of caching?
Caching is a technique widely used in computing to increase performance by keeping frequently accessed or expensive data in memory. In context of web application, caching is used to retain the pages or data across HTTP requests and reuse them without the expense of recreating them. ASP.NET has 3 kinds of caching strategies Output Caching, Fragment Caching, Data Caching.
Output Caching: Caches the dynamic output generated by a request. Some times it is useful to cache the output of a website even for a minute, which will result in a better performance. For caching the whole page the page should have OutputCache directive.<%@ OutputCache Duration="60" VaryByParam= "state" %>
Fragment Caching: Caches the portion of the page generated by the request. Some times it is not practical to cache the entire page, in such cases we can cache a portion of page<%@ OutputCache Duration="120" VaryByParam= "CategoryID; SelectedID" %>
Data Caching: Caches the objects programmatically. For data caching asp.net provides a cache object for eg: cache["States" ] = dsStates;

54. What do you mean by authentication and authorization? Authentication is the process of validating a user on the credentials (username and password) and authorization performs after authentication. After Authentication a user will be verified for performing the various tasks, Its access is limited it is known as authorization.
55. What are different types of directives in .NET?
@Page: Defines page-specific attributes used by the ASP.NET page parser and compiler. Can be included only in .aspx files <%@ Page AspCompat="TRUE" language="C# " %>
@Control:Defines control-specific attributes used by the ASP.NET page parser and compiler. Can be included only in .ascx files. <%@ Control Language="VB" EnableViewState= "false" %>

@Import: Explicitly imports a namespace into a page or user control. The Import directive cannot have more than one namespace attribute. To import multiple namespaces, use multiple @Import directives. <% @ Import Namespace="System. web" %>
@Implements: Indicates that the current page or user control implements the specified .NET framework interface.<%@ Implements Interface="System. Web.UI.IPostBack EventHandler" %>
@Register: Associates aliases with namespaces and class names for concise notation in custom server control syntax.<%@ Register Tagprefix="Acme" Tagname="AdRotator" Src="AdRotator. ascx" %>
@Assembly: Links an assembly to the current page during compilation, making all the assembly's classes and interfaces available for use on the page. <%@ Assembly Name="MyAssembly" %> <%@Assembly Src="MySource. vb" %>
@OutputCache: Declaratively controls the output caching policies of an ASP.NET page or a user control contained in a page<%@ OutputCache Duration="#ofsecond s" Location="Any | Client | Downstream | Server | None" Shared="True | False" VaryByControl= "controlname" VaryByCustom= "browser | customstring" VaryByHeader= "headers" VaryByParam= "parametername" %>
@Reference: Declaratively indicates that another user control or page source file should be dynamically compiled and linked against the page in which this directive is declared.
56. How do I debug an ASP.NET application that wasn't written with Visual Studio.NET and that doesn't use code-behind?
Start the DbgClr debugger that comes with the .NET Framework SDK, open the file containing the code you want to debug, and set your breakpoints. Start the ASP.NETapplication. Go back to DbgClr, choose Debug Processes from the Tools menu, and select aspnet_wp.exe from the list of processes. (If aspnet_wp.exe doesn't appear in the list,check the "Show system processes" box.) Click the Attach button to attach to aspnet_wp.exe and begin debugging.
Be sure to enable debugging in the ASPX file before debugging it with DbgClr. You can enable tell ASP.NET to build debug executables by placing a
<%@ Page Debug="true" %> statement at the top of an ASPX file or a statement in a Web.config file.

57. Can a user browsing my Web site read my Web.config or Global.asax files? No. The section of Machine.config, which holds the master configuration settings forASP.NET, contains entries that map ASAX files, CONFIG files, and selected other file types to an HTTP handler named HttpForbiddenHandle r, which fails attempts to retrieve the associated file. You can modify it by editing Machine.config or including an section in a local Web.config file.

58. What's the difference between Page.RegisterClient ScriptBlock and Page.RegisterStartu pScript?
RegisterClientScrip tBlock is for returning blocks of client-side script containing functions. RegisterStartupScri pt is for returning blocks of client-script not packaged in functions-in other words, code that's to execute when the page is loaded. The latter positions script blocks near the end of the document so elements on the page that the script interacts are loaded before the script runs.<%@ Reference Control="MyControl. ascx" %>
59. Is it necessary to lock application state before accessing it?
Only if you're performing a multistep update and want the update to be treated as an atomic operation. Here's an example:
Application. Lock ();
Application[ "ItemsSold" ] = (int) Application[ "ItemsSold" ] + 1;
Application[ "ItemsLeft" ] = (int) Application[ "ItemsLeft" ] - 1;
Application. UnLock ();

By locking application state before updating it and unlocking it afterwards, you ensure that another request being processed on another thread doesn't read application state at exactly the wrong time and see an inconsistent view of it. If I update session state, should I lock it, too? Are concurrent accesses by multiple requests executing on multiple threads a concern with session state? Concurrent accesses aren't an issue with session state, for two reasons. One, it's unlikely that two requests from the same user will overlap. Two, if they do overlap, ASP.NET locks down session state during request processing so that two threads can't touch it at once. Session state is locked down when the HttpApplication instance that's processing the request fires an AcquireRequestState event and unlocked when it fires a ReleaseRequestState event.
Do ASP.NET forms authentication cookies provide any protection against replay attacks? Do they, for example, include the client's IP address or anything else that would distinguish the real client from an attacker?
No. If an authentication cookie is stolen, it can be used by an attacker. It's up to you to prevent this from happening by using an encrypted communications channel (HTTPS). Authentication cookies issued as session cookies, do, however,include a time-out valid that limits their lifetime. So a stolen session cookie can only be used in replay attacks as long as the ticket inside the cookie is valid. The default time-out interval is 30 minutes.You can change that by modifying the timeout attribute accompanying the element in Machine.config or a local Web.config file. Persistent authentication cookies do not time-out and therefore are a more serious security threat if stolen.
60. How do I send e-mail from an ASP.NET application?

MailMessage message = new MailMessage ();
message.From = ;
message.To = ;
message.Subject = "Scheduled Power Outage";
message.Body = "Our servers will be down tonight.";
SmtpMail.SmtpServer = "localhost";
SmtpMail.Send (message);
MailMessage and SmtpMail are classes defined in the .NET Framework Class Library's System.Web.Mail namespace. Due to a security change made to ASP.NET just before it shipped, you need to set SmtpMail's SmtpServer property to "localhost" even though "localhost" is the default. In addition, you must use the IIS configuration applet to enable localhost (127.0.0.1) to relay messages through the local SMTP service.
61. What are VSDISCO files? VSDISCO files are DISCO files that support dynamic discovery of Web services. If you place the following VSDISCO file in a directory on your Web server, for example, it returns references to all ASMX and DISCO files in the host directory and any subdirectories not noted in elements:









62. How does dynamic discovery work?
ASP.NET maps the file name extension VSDISCO to an HTTP handler that scans the host directory and subdirectories for ASMX and DISCO files and returns a dynamically generated DISCO document. A client who requests a VSDISCO file gets back what appears to be a static DISCO document.
Note that VSDISCO files are disabled in the release version of ASP.NET. You can reenable them by uncommenting the line in the section of Machine.config that maps *.vsdisco to System.Web.Services .Discovery. DiscoveryRequest Handler and granting the ASPNET user account permission to read the IIS metabase. However, Microsoft is actively discouraging the use of VSDISCO files because they could represent a threat to Web server security.

63. Is it possible to prevent a browser from caching an ASPX page? Just call SetNoStore on the HttpCachePolicy object exposed through the Response object's Cache property, as demonstrated here:

<%@ Page Language="C# " %>


<% Response.Cache. SetNoStore (); Response.Write (DateTime.Now. ToLongTimeString ()); %>


SetNoStore works by returning a Cache-Control: private, no-store header in the HTTP response. In this example, it prevents caching of a Web page that shows the current time.
64. What does AspCompat="true" mean and when should I use it?
AspCompat is an aid in migrating ASP pages to ASPX pages. It defaults to false but should be set to true in any ASPX file that creates apartment-threaded COM objects--that is, COM objects registered ThreadingModel= Apartment. That includes all COM objects written with Visual Basic 6.0. AspCompat should also be set to true (regardless of threading model) if the page creates COM objects that access intrinsic ASP objects such as Request and Response. The following directive sets AspCompat to true:
<%@ Page AspCompat="true" %>
Setting AspCompat to true does two things. First, it makes intrinsic ASP objects available to the COM components by placing unmanaged wrappers around the equivalent ASP.NETobjects. Second, it improves the performance of calls that the page places to apartment- threaded COM objects by ensuring that the page (actually, the thread that processes the request for the page) and the COM objects it creates share an apartment. AspCompat="true" forces ASP.NET request threads into single-threaded apartments (STAs). If those threads create COM objects marked ThreadingModel= Apartment, then the objects are created in the same STAs as the threads that created them. Without AspCompat="true, " request threads run in a multithreaded apartment (MTA) and each call to an STA-based COM object incurs a performance hit when it's marshaled across apartment boundaries.
Do not set AspCompat to true if your page uses no COM objects or if it uses COM objects that don't access ASP intrinsic objects and that are registered ThreadingModel= Free or ThreadingModel= Both.
65. Explain the differences between Server-side and Client-side code?
Server side scripting means that all the script will be executed by the server and interpreted as needed. ASP doesn't have some of the functionality like sockets, uploading, etc. For these you have to make a custom components usually in VB or VC++. Client side scripting means that the script will be executed immediately in the browser such as form field validation, clock, email validation, etc. Client side scripting is usually done in VBScript or JavaScript. Download time, browser compatibility, and visible code - since JavaScript and VBScript code is included in the HTML page, then anyone can see the code by viewing the page source. Also a possible security hazards for the client computer.
66. What type of code (server or client) is found in a Code-Behind class?
C#
67. Should validation (did the user enter a real date) occur server-side or client-side? Why?
Client-side validation because there is no need to request a server side date when you could obtain a date from the client machine.
68. What are ASP.NET Web Forms? How is this technology different than what is available though ASP?
Web Forms are the heart and soul of ASP.NET. Web Forms are the User Interface (UI) elements that give your Web applications their look and feel. Web Forms are similar to Windows Forms in that they provide properties, methods, and events for the controls that are placed onto them. However, these UI elements render themselves in the appropriate markup language required by the request, e.g. HTML. If you use Microsoft Visual Studio .NET, you will also get the familiar drag-and-drop interface used to create your UI for your Web application.
69. What is the difference between Server.Transfer and Response.Redirect? Why would I choose one over the other?
In earlier versions of IIS, if we wanted to send a user to a new Web page, the only option we had was Response.Redirect. While this method does accomplish our goal, it has several important drawbacks. The biggest problem is that this method causes each page to be treated as a separate transaction. Besides making it difficult to maintain your transactional integrity, Response.Redirect introduces some additional headaches. First, it prevents good encapsulation of code. Second, you lose access to all of the properties in the Request object. Sure, there are workarounds, but they're difficult. Finally, Response.Redirect necessitates a round trip to the client, which, on high-volume sites, causes scalability problems.
As you might suspect, Server.Transfer fixes all of these problems. It does this by performing the transfer on the server without requiring a roundtrip to the client.
70. How can you provide an alternating color scheme in a Repeater control? AlternatingItemTemp late Like the ItemTemplate element, but rendered for every other row (alternating items) in the Repeater control. You can specify a different appearance for the AlternatingItemTemp late element by setting its style properties.
71. Which template must you provide, in order to display data in a Repeater control?
ItemTemplate
72. What event handlers can I include in Global.asax?
Application_ Start,Applicatio n_End, Application_ AcquireRequestSt ate, Application_ AuthenticateRequ est, Application_ AuthorizeRequest , Application_ BeginRequest, Application_ Disposed, Application_ EndRequest, Application_ Error, Application_ PostRequestHandl erExecute, Application_ PreRequestHandle rExecute,
Application_ PreSendRequestCo ntent, Application_ PreSendRequestHe aders, Application_ ReleaseRequestSt ate, Application_ ResolveRequestCa che, Application_ UpdateRequestCac he, Session_Start, Session_End
You can optionally include "On" in any of method names. For example, you can name a BeginRequest event handler.Application _BeginRequest or Application_ OnBeginRequest. You can also include event handlers in Global.asax for events fired by custom HTTP modules.Note that not all of the event handlers make sense for Web Services (they're designed forASP.NET applications in general, whereas .NET XML Web Services are specialized instances of an ASP.NET app). For example, the Application_ AuthenticateRequ est and Application_ AuthorizeRequest events are designed to be used with ASP.NET Forms authentication.
73. What is different b/w webconfig.xml & Machineconfig. xml
Web.config & machine.config both are configuration files.Web.config contains settings specific to an application where as machine.config contains settings to a computer. The Configuration system first searches settings in machine.config file & then looks in application configuration files.Web.config, can appear in multiple directories on an ASP.NET Web application server. Each Web.config file applies configuration settings to its own directory and all child directories below it. There is only Machine.config file on a web server.
If I'm developing an application that must accomodate multiple security levels though secure login and my ASP.NET web appplication is spanned across three web-servers (using round-robbin load balancing) what would be the best approach to maintain login-in state for the users?
Use the state server or store the state in the database. This can be easily done through simple setting change in the web.config.

You can specify mode as “stateserver” or “sqlserver”.
Where would you use an iHTTPModule, and what are the limitations of any approach you might take in implementing one
"One of ASP.NET's most useful features is the extensibility of the HTTP pipeline, the path that data takes between client and server. You can use them to extend your ASP.NETapplications by adding pre- and post-processing to each HTTP request coming into your application. For example, if you wanted custom authentication facilities for your application, the best technique would be to intercept the request when it comes in and process the request in a custom HTTP module.
74. How do you turn off cookies for one page in your site?
Since no Page Level directive is present, I am afraid that cant be done.
75. How do you create a permanent cookie?
Permanent cookies are available until a specified expiration date, and are stored on the hard disk.So Set the 'Expires' property any value greater than DataTime.MinValue with respect to the current datetime. If u want the cookie which never expires set its Expires property equal to DateTime.maxValue.
76. Which method do you use to redirect the user to another page without performing a round trip to the client?
Server.Transfer and Server.Execute
77. What property do you have to set to tell the grid which page to go to when using the Pager object?
CurrentPageIndex
78. Should validation (did the user enter a real date) occur server-side or client-side? Why?
It should occur both at client-side and Server side.By using expression validator control with the specified expression ie.. the regular expression provides the facility of only validatating the date specified is in the correct format or not. But for checking the date where it is the real data or not should be done at the server side, by getting the system date ranges and checking the date whether it is in between that range or not.
79. What does the "EnableViewState" property do? Why would I want it on or off?
Enable ViewState turns on the automatic state management feature that enables server controls to re-populate their values on a round trip without requiring you to write any code. This feature is not free however, since the state of a control is passed to and from the server in a hidden form field. You should be aware of when ViewState is helping you and when it is not. For example, if you are binding a control to data on every round trip, then you do not need the control to maintain it's view state, since you will wipe out any re-populated data in any case. ViewState is enabled for all server controls by default. To disable it, set the EnableViewState property of the control to false.
80. What is the difference between Server.Transfer and Response.Redirect? Why would I choose one over the other? Server.Transfer( ) : client is shown as it is on the requesting page only, but the all the content is of the requested page. Data can be persist accros the pages using Context.Item collection, which is one of the best way to transfer data from one page to another keeping the page state alive.
Response.Dedirect( ) :client know the physical location (page name and query string as well). Context.Items loses the persisitance when nevigate to destination page. In earlier versions of IIS, if we wanted to send a user to a new Web page, the only option we had was Response.Redirect. While this method does accomplish our goal, it has several important drawbacks. The biggest problem is that this method causes each page to be treated as a separate transaction. Besides making it difficult to maintain your transactional integrity, Response.Redirect introduces some additional headaches. First, it prevents good encapsulation of code. Second, you lose access to all of the properties in the Request object. Sure, there are workarounds, but they're difficult. Finally, Response.Redirect necessitates a round trip to the client, which, on high-volume sites, causes scalability problems. As you might suspect, Server.Transfer fixes all of these problems. It does this by performing the transfer on the server without requiring a roundtrip to the client.

81. Can you give an example of when it would be appropriate to use a web service as opposed to a non-serviced .NET component?

Communicating through a Firewall When building a distributed application with 100s/1000s of users spread over multiple locations, there is always the problem of communicating between client and server because of firewalls and proxy servers. Exposing your middle tier components as Web Services and invoking the directly from a Windows UI is a very valid option.
Application Integration When integrating applications written in various languages and running on disparate systems. Or even applications running on the same platform that have been written by separate vendors.
Business-to- Business Integration This is an enabler for B2B intergtation which allows one to expose vital business processes to authorized supplier and customers. An example would be exposing electronic ordering and invoicing, allowing customers to send you purchase orders and suppliers to send you invoices electronically.
Software Reuse This takes place at multiple levels. Code Reuse at the Source code level or binary componet-based resuse. The limiting factor here is that you can reuse the code but not the data behind it. Webservice overcome this limitation. A scenario could be when you are building an app that aggregates the functionality of serveral other Applicatons. Each of these functions could be performed by individual apps, but there is value in perhaps combining the the multiple apps to present a unifiend view in a Portal or Intranet.
When not to use Web Services: Single machine Applicatons When the apps are running on the same machine and need to communicate with each other use a native API. You also have the options of using component technologies such as COM or .NET Componets as there is very little overhead.
Homogeneous Applications on a LAN If you have Win32 or Winforms apps that want to communicate to their server counterpart. It is much more efficient to use DCOM in the case of Win32 apps and .NET Remoting in the case of .NET Apps

82. Can you give an example of what might be best suited to place in the Application_ Start and Session_Start subroutines?
The Application_ Start event is guaranteed to occur only once throughout the lifetime of the application. It's a good place to initialize global variables. For example, you might want to retrieve a list of products from a database table and place the list in application state or the Cache object. SessionStateModule exposes both Session_Start and Session_End events.
83. What are the advantages and disadvantages of viewstate?
The primary advantages of the ViewState feature in ASP.NET are:
1. Simplicity. There is no need to write possibly complex code to store form data between page submissions.
2. Flexibility. It is possible to enable, configure, and disable ViewState on a control-by-control basis, choosing to persist the values of some fields but not others.
There are, however a few disadvantages that are worth pointing out:
1. Does not track across pages. ViewState information does not automatically transfer from page to page. With the session
approach, values can be stored in the session and accessed from other pages. This is not possible with ViewState, so storing
data into the session must be done explicitly.
2. ViewState is not suitable for transferring data for back-end systems. That is, data still has to be transferred to the back
end using some form of data object.
84. Describe session handling in a webfarm, how does it work and what are the limits? ASP.NET Session supports storing of session data in 3 ways, i] in In-Process ( in the same memory that ASP.NET uses) , ii] out-of-process using Windows NT Service )in separate memory from ASP.NET ) or iii] in SQL Server (persistent storage). Both the Windows Service and SQL Server solution support a webfarm scenario where all the web-servers can be configured to share common session state store.

1. Windows Service : We can start this service by Start | Control Panel | Administrative Tools | Services | . In that we service names ASP.NET State Service. We can start or stop service by manually or configure to start automatically. Then we have to configure our web.config file







Here ASP.Net Session is directed to use Windows Service for state management on local server (address : 127.0.0.1 is TCP/IP loop-back address). The default port is 42424. we can configure to any port but for that we have to manually edit the registry.
Follow these simple steps
- In a webfarm make sure you have the same config file in all your web servers.
- Also make sure your objects are serializable.
- For session state to be maintained across different web servers in the webfarm, the application path of the web-site in the IIS Metabase should be identical in all the web-servers in the webfarm.
85. Which template must you provide, in order to display data in a Repeater control?
You have to use the ItemTemplate to Display data. Syntax is as follows,
< ItemTemplate >
< div class =”rItem” >
< img src=”images/<%# Container.DataItem(“ ImageURL”) %>” hspace=”10” />
< b > <% # Container.DataItem(“ Title”)%>
< /div >
< ItemTemplate >
How can you provide an alternating color scheme in a Repeater control?
Using the AlternatintItemTemp late
86. What property must you set, and what method must you call in your code, in order to bind the data from some data source to the Repeater control? Set the DataMember property to the name of the table to bind to. (If this property is not set, by default the first table in the dataset is used.) DataBind method, use this method to bind data from a source to a server control. This method is commonly used after retrieving a data set through a database query.
87. What method do you use to explicitly kill a user s session?
You can dump (Kill) the session yourself by calling the method Session.Abandon.
ASP.NET automatically deletes a user's Session object, dumping its contents, after it has been idle for a configurable timeout interval. This interval, in minutes, is set in the section of the web.config file. The default is 20 minutes.
88. How do you turn off cookies for one page in your site?
Use Cookie.Discard property, Gets or sets the discard flag set by the server. When true, this property instructs the client application not to save the Cookie on the user's hard disk when a session ends.
89. Which two properties are on every validation control?
We have two common properties for every validation controls
1. Control to Validate,
2. Error Message.
90. What tags do you need to add within the asp:datagrid tags to bind columns manually?
< asp:DataGrid id="dgCart" AutoGenerateColumns ="False" CellPadding= "4" Width="448px" runat="server" >
< Columns >
< asp:ButtonColumn HeaderText=" SELECT" Text="SELECT" CommandName= "select" >< /asp:ButtonColumn >
< asp:BoundColumn DataField="ProductI d" HeaderText=" Product ID" > < /asp:BoundColumn >
< asp:BoundColumn DataField="ProductN ame" HeaderText=" Product Name" >< /asp:BoundColumn >
< asp:BoundColumn DataField="UnitPric e" HeaderText=" UnitPrice" >
< /Columns >
< /asp:DataGrid >
91. How do you create a permanent cookie?
Permanent cookies are the ones that are most useful. Permanent cookies are available until a specified expiration date, and are stored on the hard disk. The location of cookies differs with each browser, but this doesn’t matter, as this is all handled by your browser and the server. If you want to create a permanent cookie called Name with a value of Nigel, which expires in one month, you’d use the following code Response.Cookies ("Name") = "Nigel" Response.Cookies ("Name"). Expires = DateAdd ("m", 1, Now ())
92. What tag do you use to add a hyperlink column to the DataGrid?
< asp:HyperLinkColumn >
93. Which method do you use to redirect the user to another page without performing a round trip to the client?
Server.transfer
94. What is the transport protocol you use to call a Web service SOAP ?
HTTP Protocol
95. Explain role based security ?
Role Based Security lets you identify groups of users to allow or deny based on their role in the organization. In Windows NT and Windows XP, roles map to names used to identify user groups. Windows defines several built-in groups, including Administrators, Users, and Guests.To allow or deny access to certain groups of users, add the element to the authorization list in your Web application' s Web.config file.e.g.
< authorization >
< allow roles="Domain Name\Administrators " / > < !-- Allow Administrators in domain. -- >
< deny users="*" / > < !-- Deny anyone else. -- >
< /authorization >
96. How do you register JavaScript for webcontrols ?
You can register javascript for controls using Attribtues.Add( scriptname, scripttext) method.
97. When do you set "" ?
Identity is a webconfig declaration under System.web, which helps to control the application Identity of the web applicaton. Which can be at any level(Machine, Site,application ,subdirectory, or page), attribute impersonate with "true" as value specifies that client impersonation is used.
98. What are different templates available in Repeater,DataList and Datagrid ? Templates enable one to apply complicated formatting to each of the items displayed by a control.Repeater control supports five types of templates.HeaderTem plate controls how the header of the repeater control is formatted.ItemTempl ate controls the formatting of each item displayed.Alternati ngItemTemplate controls how alternate items are formatted and the SeparatorTemplate displays a separator between each item displyed.FooterTemp late is used for controlling how the footer of the repeater control is formatted.The DataList and Datagrid supports two templates in addition to the above five.SelectedItem Template controls how a selected item is formatted and EditItemTemplate controls how an item selected for editing is formatted.
99. What is ViewState ? and how it is managed ?
ASP.NET ViewState is a new kind of state service that developers can use to track UI state on a per-user basis. Internally it uses an an old Web programming trick-roundtripping state in a hidden form field and bakes it right into the page-processing framework.It needs less code to write and maintain state in your Web-based forms.
100. What is web.config file ? Web.config file is the configuration file for the Asp.net web application. There is one web.config file for one asp.net application which configures the particular application. Web.config file is written in XML with specific tags having specific meanings.It includes databa which includes connections, Session States,Error Handling,Security etc. For example :
< configuration >
< appSettings >
< add key="ConnectionStri ng" value="server= localhost; uid=sa;pwd= ;database= MyDB" / >
< /appSettings >
< /configuration >

101. What is advantage of viewstate and what are benefits?
When a form is submitted in classic ASP, all form values are cleared. Suppose you have submitted a form with a lot of information and the server comes back with an error. You will have to go back to the form and correct the information. You click the back button, and what happens..... ..ALL form values are CLEARED, and you will have to start all over again! The site did not maintain your ViewState.With ASP .NET, the form reappears in the browser window together with all form values.This is because ASP .NET maintains your ViewState. The ViewState indicates the status of the page when submitted to the server.
102. What tags do you need to add within the asp:datagrid tags to bind columns manually?
Set AutoGenerateColumns Property to false on the datagrid tag and then use Column tag and an ASP:databound tag
< asp:DataGrid runat="server" id="ManualColumnBin ding" AutoGenerateColumns ="False" >
< Columns >
< asp:BoundColumn HeaderText=" Column1" DataField="Column1" / >
< asp:BoundColumn HeaderText=" Column2" DataField="Column2" / >
< /Columns >
< /asp:DataGrid >



103. Which property on a Combo Box do you set with a column name, prior to setting the DataSource, to display data in the combo box? DataTextField and DataValueField
104. Which control would you use if you needed to make sure the values in two different controls matched? CompareValidator is used to ensure that two fields are identical.
105. What is validationsummary server control?where it is used?.
The ValidationSummary control allows you to summarize the error messages from all validation controls on a Web page in a single location. The summary can be displayed as a list, a bulleted list, or a single paragraph, based on the value of the DisplayMode property. The error message displayed in the ValidationSummary control for each validation control on the page is specified by the ErrorMessage property of each validation control. If the ErrorMessage property of the validation control is not set, no error message is displayed in the ValidationSummary control for that validation control. You can also specify a custom title in the heading section of the ValidationSummary control by setting the HeaderText property. You can control whether the ValidationSummary control is displayed or hidden by setting the ShowSummary property. The summary can also be displayed in a message box by setting the ShowMessageBox property to true.
106. What is the sequence of operation takes place when a page is loaded?
BeginTranaction - only if the request is transacted
Init - every time a page is processed
LoadViewState - Only on postback
ProcessPostData1 - Only on postback
Load - every time
ProcessData2 - Only on Postback
RaiseChangedEvent - Only on Postback
RaisePostBackEvent - Only on Postback
PreRender - everytime
BuildTraceTree - only if tracing is enabled
SaveViewState - every time
Render - Everytime
End Transaction - only if the request is transacted
Trace.EndRequest - only when tracing is enabled
UnloadRecursive - Every request
107. Difference between asp and asp.net?.
"ASP (Active Server Pages) and ASP.NET are both server side technologies for building web sites and web applications, ASP.NET is Managed compiled code - asp is interpreted. and ASP.net is fully Object oriented. ASP.NET has been entirely re-architected to provide a highly productive programming experience based on the .NET Framework, and a robust infrastructure for building reliable and scalable web
applications. "
108. Name the validation control available in asp.net?.
RequiredField, RangeValidator, RegularExpressio n,Custom validator,compare Validator
109. What are the various ways of securing a web site that could prevent from hacking etc .. ?
1) Authentication/ Authorization
2) Encryption/Decrypti on
3) Maintaining web servers outside the corporate firewall. etc.,
110. What is the difference between in-proc and out-of-proc?
An inproc is one which runs in the same process area as that of the client giving tha advantage of speed but the disadvantage of stability becoz if it crashes it takes the client application also with it.Outproc is one which works outside the clients memory thus giving stability to the client, but we have to compromise a bit on speed.
111. When you’re running a component within ASP.NET, what process is it running within on Windows XP? Windows 2000? Windows 2003? On Windows 2003 (IIS 6.0) running in native mode, the component is running within the w3wp.exe process associated with the application pool which has been configured for the web application containing the component.
On Windows 2003 in IIS 5.0 emulation mode, 2000, or XP, it's running within the IIS helper process whose name I do not remember, it being quite a while since I last used IIS 5.0.
112. What does aspnet_regiis -i do ?
Aspnet_regiis. exe is The ASP.NET IIS Registration tool allows an administrator or installation program to easily update the script maps for anASP.NET application to point to the ASP.NET ISAPI version associated with the tool. The tool can also be used to display the status of all installed versions of ASP. NET, register theASP.NET version coupled with the tool, create client-script directories, and perform other configuration operations.
When multiple versions of the .NET Framework are executing side-by-side on a single computer, the ASP.NET ISAPI version mapped to an ASP.NET application determines which version of the common language runtime is used for the application.
The tool can be launched with a set of optional parameters. Option "i" Installs the version of ASP.NET associated with Aspnet_regiis. exe and updates the script maps at the IIS metabase root and below. Note that only applications that are currently mapped to an earlier version of ASP.NET are affected
113. What is a PostBack?
The process in which a Web page sends data back to the same page on the server.
114. What is ViewState? How is it encoded? Is it encrypted? Who uses ViewState?
ViewState is the mechanism ASP.NET uses to keep track of server control state values that don't otherwise post back as part of the HTTP form. ViewState Maintains the UI State of a Page
ViewState is base64-encoded. It is not encrypted but it can be encrypted by setting EnableViewStatMAC= "true" & setting the machineKey validation type to 3DES. If you want to NOT maintain the ViewState, include the directive < %@ Page EnableViewState= "false" % > at the top of an .aspx page or add the attribute EnableViewState= "false" to any control.
115. What is the < machinekey > element and what two ASP.NET technologies is it used for?
Configures keys to use for encryption and decryption of forms authentication cookie data and view state data, and for verification of out-of-process session state identification. There fore 2 ASP.Net technique in which it is used are Encryption/Decrypti on & Verification
116. What three Session State providers are available in ASP.NET 1.1? What are the pros and cons of each? ASP.NET provides three distinct ways to store session data for your application: in-process session state, out-of-process session state as a Windows service, and out-of-process session state in a SQL Server database. Each has it advantages.
1.In-process session-state mode
Limitations:
* When using the in-process session-state mode, session-state data is lost if aspnet_wp.exe or the application domain restarts.
* If you enable Web garden mode in the < processModel > element of the application' s Web.config file, do not use in-process session-state mode. Otherwise, random data loss can occur.
Advantage:
* in-process session state is by far the fastest solution. If you are storing only small amounts of volatile data in session state, it is recommended that you use the in-process provider.
2. The State Server simply stores session state in memory when in out-of-proc mode. In this mode the worker process talks directly to the State Server
3. SQL mode, session states are stored in a SQL Server database and the worker process talks directly to SQL. The ASP.NET worker processes are then able to take advantage of this simple storage service by serializing and saving (using .NET serialization services) all objects within a client's Session collection at the end of each Web request
Both these out-of-process solutions are useful primarily if you scale your application across multiple processors or multiple computers, or where data cannot be lost if a server or process is restarted.
117. What is the difference between HTTP-Post and HTTP-Get?
As their names imply, both HTTP GET and HTTP POST use HTTP as their underlying protocol. Both of these methods encode request parameters as name/value pairs in the HTTP request.
The GET method creates a query string and appends it to the script's URL on the server that handles the request.
The POST method creates a name/value pairs that are passed in the body of the HTTP request message.
118. Name and describe some HTTP Status Codes and what they express to the requesting client. When users try to access content on a server that is running Internet Information Services (IIS) through HTTP or File Transfer Protocol (FTP), IIS returns a numeric code that indicates the status of the request. This status code is recorded in the IIS log, and it may also be displayed in the Web browser or FTP client. The status code can indicate whether a particular request is successful or unsuccessful and can also reveal the exact reason why a request is unsuccessful. There are 5 groups ranging from 1xx - 5xx of http status codes exists.
101 - Switching pr