RSS Feeds

Wednesday, June 9, 2010

How to get list of all active HttpModules in ASP.NET?

Here is a quick tips to get the list of all active HTTPModules at runtime. We can get the list of all HttpModules from the web.config or from machine.config file. But, what we need to do if we want to get the list of all active HttpModules during runtime? Yes. We can easily get the details with the help of HttpApplication and HttpModuleCollection Class. If we quickly recall the IIS Process Request [One detailed Article], when a request reaches to worker Process from client browser, First of all Worker process is responsible to start and HttpRuntime by loading ISAPI filter. After that HttpRuntime load an HttpApplication object with the help of HttpApplicationFactory class. Each and every request should pass through the corresponding HTTPModule to reach to HTTPHandler, this list of module are configured by the HTTPApplication. Below is the code snippet by which we can get the list of active HttpModules.

//Get Application Instance from Current Content
HttpApplication httpApps = HttpContext.Current.ApplicationInstance;
//Get List of modules in module collections
HttpModuleCollection httpModuleCollections = httpApps.Modules;
Response.Write("Total Number Active HttpModule : " + httpModuleCollections.Count.ToString() + "
");
Response.Write("List of Active Modules" + "
");
foreach (string activeModule inttpModuleCollections.AllKeys)
{
Response.Write(activeModule + "
");
}

Wednesday, June 2, 2010

“CompressionEnabled” Session in ASP.NET 4.0

ASP.NET 4.0 comes us with a new option for compressing the Session data with Out Process Session mode. To enabling this functionality we need to add “compressionEnabled=”true” attribute with the SessionMode in web.config..
Here is the complete blog post...
CompressionEnabled” Session in ASP.NET 4.0

Monday, May 17, 2010

CSS Friendly Menu Control in ASP.NET 4.0


It is very much easier to apply CSS when we have ul,li elements as the HTML content. If we look into ASP.NET Menu Control till Version 3.5, its render as Table-TR-TD Tag. Though Table/Tr/Td is quite useful to display tabular data but sometime creates a big problem when we need to do more work with CSS. To overcome this problem we generally used CSS Friendly adapter to render the ASP.NET Control in ul/li mode.

ASP.NET 4.0 makes the things easier for web developer by providing "RenderingMode" properties. Here we can specify RenderMode of a ASP.NET Menu control. Which define the what will be the HTML Render Content Type. Bydefault mode is "List" which means control will be render as ul/li.



Read Complete Article @ Abhijit's World Of .NET
CSS Friendly Menu Control in ASP.NET 4.0

Saturday, May 15, 2010

ViewState Control in ASP.NET 4.0


View State is one of the most important and useful client side state management mechanisms. It can store the page value at the time of post back (Sending and Receiving information from Server) of your page. ASP.NET pages provide the View State property as a built-in structure for automatically storing values between multiple requests for the same page.

we generally used “EnableViewState” Properties for both Page Level and Server Control Level to maintain the view state. Till ASP.NET 3.5 Version, Page Level view state control treat as highest priorities. Which means If we set EnableViewState= “False” in page level that will automatically derived by all the server side control. In that case if we set “EnableViewState=”True”” for any server side control will treat as false, as we have defined them “False” in Page Level.Here is one complete article on ASP.NET 2.0/3.5 View State , which may helpful for you

Now, let’s have a look into the changes in ViewState Control in ASP.NET 4.0. There is a massive change in View State Control in ASP.NET 4.0 which is very much helpful for developer also. Asp.net 4.0 added a new property to Page object and server controls called ViewStateMode.

Sunday, May 9, 2010

IntelliTrace Debugging - Video Demo

Recently I have published one complete tutorial on Visual Studio 2010 Debugging. Which covered almost all main features of debugging in Visual Studio 2010 like Basic of Breakpoints,  breakpoint labeling, data tips, multithreaded debugging, and parallel debugging and IntelliTrace debugging. You can read the complete article from My Blog or from CodeProject.

While preparing the article I had created one small video on IntelliTrace Debugging which will show you the demo of using IntelliTrace Debugging.  Hope you will enjoy this video.






kick it on DotNetKicks.com

Friday, May 7, 2010

Mastering in Visual Studio 2010 Debugging

Visual Studio IDE gives us a lot of tools to debug our application. Sometimes debugging activity takes a very long time to identify the root cause. But VS IDE provides a lot of handy tools which help to debug code in a better way. Debugger features include error listing, adding breakpoints, visualize the program flow, control the flow of execution, data tips, watch variables and many more. Many of them are very common for many developers and many are not. In this article, I have discussed all the important features of VS IDE for debugging like Breakpoint, labeling and saving breakpoints, putting conditions and filter on breakpoints, DataTips, Watch windows, Multithreaded debugging, Thread window, overview of parallel debugging and overview of IntelliTrace Debugging

Sunday, April 25, 2010

"Spotlight" - Microsoft’s official website www.asp.net



I am happy to inform that one of my article "Beginner’s Guide: How IIS Process ASP.NET Request" published at DotNetFunda.Com has been featured at Microsoft's official website www.asp.net as Spotlight .

This article has also been selected as "Article of the day" at asp.net site few weeks back. This time I am quite excited to see  the article in Spotlight section.

Thanks to DotNetFunda and Thanks to all of you for your good wishes.
You can read all of my article here