Most of all are well aware about command line profiling for ASP.NET Application using VSPerfASPNETCmd command line tool . This can easily profile your ASP.NET Web applications which is hosted on IIS. We just need to run VSPerfASPNETCmd command with required parameter. Once profiling done, we can inspect the generated performance report (.vsp) file within Visual Studio. But, do you know we can do the complete profiling within Visual Studio itself. How ? Here you go.
In this post I’m going to talk about how we can use ASP.NET 4.0 Chart Control with SQL CE as back-end data base using Entity Framework. I will also show how Visual Studio 2010 SP1 provides new tooling supports for SQL Server CE 4.0. ASP.NET 4.0 introduced inbuilt chart controls features and Visual Studio 2010 SP1 Came up with nice tooling support for SQL Server CE. SQL CE is a free, embedded, lightweight database engine that enables easy database storage. This does not required any installation and runs in memory. Let’s see how we can place this together and create a small apps and deploy it using new “Web Deployment Tool” which is available with Visual Studio 2010 SP1.
The 11th edition of Virtual TechDays – was held on 9th to 11th Feb 2011. I presented a session on “Caching enhancements in ASP.NET 4.0” . In this session I have talked about different enhancement of Caching in ASP.NET 4.0 with many demos. The recording session is now available for download.
While working with ASP.NET web application you must be familiar with one of most important state management technique “Session”. If you want to do a quick refresh or want to know some thing more, please go ahead and read one of my article “Exploring Session in ASP.NET” published at Code Project. In this post I am going to share some important tips that might be useful.
Daily .NET Tips is aiming to sharing useful coding tips and tricks for .NET Developers. This site completely design for sharing Tips and Tricks, useful Code Snippet which anyone use in daily development work and targeted anything related with .NET. In this post I am quickly listing down all the tips which are posted over the month April 2011.
Daily .NET Tips is aiming to sharing useful coding tips and tricks for .NET Developers. This site completely design for sharing Tips and Tricks, useful Code Snippet which anyone use in daily development work and targeted anything related with .NET. I started with this new site few months back and with in short time period we have total 100 Tips which mainly focused on the practical oriented problem. You can find tips related with C#, ASP.NET, Silverlight, WPF, WCF, JQuery, WP7 etc.
If you have worked with ASP.NET GridView Control you must be aware of GridView.EmptyDataTemplate Property which Gets or sets the user-defined content for the empty data row when a GridView control data source has no records. Similarly ShowHeaderWhenEmpty property allows you to show or hide the Header row when there is no records. These are the really good and very frequent required properties. Now, if you are working with the Repeater Control, it doesn’t have any direct features which enables you to set user define content when data source is empty. In this blog post I will discuss how we can create a custom ASP.NET Repeater control with support of EmptyTemplate along with few more important features.
Today I delivered an 1 hour session on “Caching Enhancement in ASP.NET 4.0” at Microsoft Virtual Tech days 2011. It was the Day 1 of Virtual Tech Days and I presented the 4th session on Developer Track 1, from 3.00 PM To 4.00 PM IST. Thanks to all of you for attending my session. In this session I have discussed about ASP.NET 4.0 Caching Enhancement . I started with fundamentals of ASP.NET Caching to make sure all the attends are in same page. In Caching Quick Tour section I have talked about why Caching ? What are the different types of caching ? How Caching works ? etc. Then I have discussed about New Object Caching API in .NET 4.0. In this section I have talked about new Memory Cache API, there Implementation using System.Runtime.Caching . I have also shown how we can use same set of API in an Winforms / WPF / Console Application. Followed by, I have explained how we can extend the Object Caching by implementing MemoryCache Class.
While we are talking about state management we consider Session is one of most useful server side state management mechanism for a web application. In ASP.NET mainly we are having two type of state management 1. In Process and 2. Out Process . “In process” is the by default session storage mode for ASP.NET Web application and this is taken care by worker process in IIS. When it comes under Out Process we can use either of state server or SQL Server to persist session data. In case of In Process, session data stored in In memory of worker process. But when we are talking about “OutProc” session mode, we need to ensure that session data should be “Serialized” first . So, when we are moving session data from Web Server toOut Process Server( State Server or SQL Server ) it can be a performance overhead based on the size of data that we are storing in Session.
ASP.NET 4.0 comes 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 SessionModein web.config.
Session is one of most important state management in ASP.NET. We can enable or disabled session state either in web.config or using @Page directive’s EnableSessionState attributes. But there was no provision to change the session state at runtime till date in ASP.NET. But using ASP.NET 4.0, we can change the session state programmatically . The .NET 4.0 framework adds a new method SetSessionStateBehavior to the HttpContext class for ASP.NET. This method required SessionStatebehavior value to set the current session mode. To call SetSessionStateBehavior simply create a new HttpModule by Implementing IHttModule and hook the BeginRequest event. Most important you can only use the SetSessionStateBehavior until the AcquireRequestState event is fired, because AcquireRequestState Occurs when ASP.NET acquires the current state that is associated with the current request
While calling SetSessionStatebehavior, You can pass the following values as SessionStatebehavior :
Default: This is default setting which means everything works as before
Disabled: Turned of Session Sate for Current Request.
ReadOnly: Read only access to Session State;
Required: Enabled session state for both Read and Write Access;
While running your ASP.net application you might have found it to be running on Integrated Web development environment. Visual Studio 2010 comes with two version of Integrated Web Development environment which could run side by side. In case you run your ASP.NET application in VS 2010 you can have an option to choose between the two version of Web Development environment, one running CLR 2.0, which was there before VS2010 and a new version of Web Dev with CLR 4.0. Multi – targeting allows you to configure your visual studio to run more than one Web Dev server at a time one using CLR 2.0 and another using CLR 4.0
In one of my ASP.NET Online session I had talked about the multi targeting features of Visual Studio 2010 for web development. During the demo I have shown, how we can target two different version of .NET CLR version same time. Some of the attendees having some doubts on that, So in this blog post, I am going to explain how we can target two different version of CLR at same time.
To demonstrate it, Start with a new Visual Studio Instance, and Create a solution file which contains two different Framework version of web applications. Let’s say there are two web application which are targeting to ASP.NET 3.5 and ASP.NET 4.0 version.
Today I have given an Online session on “ASP.NET 4.0 – In Depth” with Abhishek in a community event organized by DotNetFunda.Com. Thanks to all the attendees. As we were running out of time, we will continue the same in a different session on rest of the topic. All the nominated users will get an email for next session details.
Things that we have covered already :
Basic Introduction of ASP.NET 4.0 Features
Visual Studio 2010 Enhancement Session for ASP.NET 4.0 (With Demo)
Server Control Enhancements (With Demo)
Search Engine Optimization (With Demo)
Whatever we have covered till now, ready to download
I will be speaking in a .NET Community session organized by http://dotnetfunda.com on ASP.NET 4.0 . Below is the more details about the session
ASP.NET 4.0 introduces number of features that improve the core ASP.NET functionality and many changes that allow developers to have a strong controls over the application. These enhanced features makes ASP.NET 4.0 more effective for the web developer than the already existing versions of ASP.NET.
The agenda of this session :
What’s New in ASP.NET 4.0
Improvement in Visual Studio 2010 for web development
Empty Website project and Cleaner Web.Config
MetaKeyword and MetaDescription enhancements
Controlling ViewState mechanism
Controlling ClientID generation for asp.net controls
CSS Improvements and CSS Friendly Menu Control
ListView rendering mechanism, Enhancement in Listview control