Background of ASP.NET Session State
ASP.NET session state enables you to store and retrieve values for a user as the user navigates ASP.NET pages in a Web application. HTTP is a stateless protocol. This means that a Web server treats each HTTP request for a page as an independent request. The server retains no knowledge of variable values that were used during previous requests. ASP.NET session state identifies requests from the same browser during a limited time window as a session, and provides a way to persist variable values for the duration of that session. By default, ASP.NET session state is enabled for all ASP.NET applications.
Alternatives to session state include the following:
*
Application state, which stores variables that can be accessed by all users of an ASP.NET application.
*
Profile properties, which persists user values in a data store without expiring them.
*
ASP.NET caching, which stores values in memory that is available to all ASP.NET applications.
*
View state, which persists values in a page.
*
Cookies.
*
The query string and fields on an HTML form that are available from an HTTP request.
Why Dynamic Programming?
Most C# developers use multiple tools in a single application to accomplish complex tasks. If you’re writing WPF desktop applications, you’re using C# and XAML. It is quite possible that you might find some open source code that solves a problem, but it might be written in another language such as VB or F#. One of the benefits of .NET since its inception is the ability to have cross-language interoperability and the runtime is even called the “Common Language” Runtime (CLR). In recent years, Microsoft has created dynamic languages, such as IronRuby and IronPython, but developers don’t have an easy way to perform interop with dynamic languages. If you have this need, then you’ll welcome the ease with which C# dynamic programming makes interop between C# and dynamic languages possible.
When performing reflection to run a method on an object, there are several hoops to jump through, including obtaining a reference to an object type, getting a reference to a member info object, determining the type of bindings to use, and then invoking the member. While reflection has an undeniable coolness factor, it still feels like a hack and that’s where C# 4.0 dynamic methods can help. Later in this article, I’ll show you how to just call the object member.
Performing COM interop with C# has always been cumbersome; partly because of the need to write extra syntax for conversions, optional parameters, and more. This has left some C# developers with a touch of VB envy because VB has easier COM interop support. One of the purposes of dynamic programming in C# is to help the C# programmer write cleaner syntax in COM interop scenarios.
Define Trace Switches
Define Trace Switches.
Trace switches are used to configure tracing behavior.
There are two kinds of trace switches: BooleanSwitch and TraceSwitch.
BooleanSwitch: It is either on or off.
TraceSwitch : It has property to determine trace behaviour.
Trace switches can be configured through application's .config file even after the application is compiled.
What are Trace switches?
Trace switches are used to enable, disable and filter the tracing output. They are objects can be configured through the .config file.
Explain how to implement properties.
You can either use fields or property procedure to add properties.
It is convenient to use fields when the values associated with the properties are less in number. eg: boolean which can have only two values associated with it.
If property procedure has to be used to add a property, then three steps need to be followed:
- Declare a private variable to store the value of the property
- Write a get procedure to retrieve the value of the variable and
- Write a set procedure to set the value of the variable.
What is break mode? What are the options to step through code?
What is break mode? What are the options to step through code?
Break mode lets you to observe code line to line in order to locate error.
VS.NET provides following option to step through code.
Step Into
Step Over
Step Out
Run To Cursor
Set Next Statement
.NET debug and trace classes - August 25, 2008 at 18:00 PM by Amit Satpute
What is Break mode?
When changes are made to the code in an application, the way to be able to view how those changes have changed the way of execution is Break Mode. In break mode, a snapshot of the running application is taken in which the status and values of all the variables is stored.
What is Windows Presentation Foundation, WPF?
What is Windows Presentation Foundation, WPF?
WPF allows creating rich application with respect to look and feel. The rich classes of WPF along with a design engine allow you to make innovative interfaces and client applications with 3D images, animation that is not available using HTML
What are the different documents supported in WPF?
The different documents supported by WPF are mainly fixed documents and flow documents. Fixed documents are used for what you see is what you get (WYSIWYG) applications. In such applications observance to the original design is important. E.g. Desktop applications Flow documents concentrate more on optimize viewing and readability., rather than using a “fixed” layout, flow documents adjust their content based on values of runtime variables. Adjusting content will also include adjusting size, resolution etc. E.g. a Web page.
Explain the ways of authentication techniques in ASP.NET
Selection of an authentication provider is done through the entries in the web.config file for an application.
The modes of authentication are:
<authentication mode=”windows”>
<authentication mode=”passport”>
<authentication mode=”forms”>
Custom authentication needs installation of ISAPI filter in IIS. It compares incoming requests to a list of source IP addresses and a request is considered to be authenticated if it comes from an acceptable address.
How to use performance monitor to diagnose bottlenecks in your application?
Monitor is a tool built to assist you in diagnosing the problem.
Type ‘perfmon’ in command prompt to access Performance Monitor
The counters, sampling intervals, etc can be used to monitor the performance.
A baseline should be established so that critical reference points, changes and trends can be observed and identified.
Results can be made more readable by removing all the distracting sample noise so that the graphical view of trend lines is not blurred. This can be done using buckets - a vertical line, indicating the minimum, average, and maximum of the sample points in the bucket.
It should be noted that the bottlenecks can be caused due to over utilization of physical disk, memory, process, CPU, and network.