Use Visual Studio 2010 to Profile your ASP.NET Application which is hosted on IIS

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.

Continue reading

Using ASP.NET 4.0 Chart Control With New Tooling Support for SQL Server CE 4.0 in VS 2010 SP1 and Entity Model

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.

Continue reading

Download My Virtual Tech Days Session Video on Caching enhancements in ASP.NET 4.0– Feb 2011

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.

image

You can download all the session video from  Virtual Tech Days Site

Few important tips that you should know while using ASP.NET Session

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.

Continue reading

100 Useful .NET Tips & Tricks

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.

To know more ……

Light bulbVisit  http://dailydotnettips.com

Light bulbSubscribe Tips to your mail box : http://bit.ly/hFAhop

Light bulbFor Quick Update Follow : @dailydotnettips 

Thanks to all the contributors Abhishek Sur, Prayan Rana, Jebarson Jebamony, Atul Verma,Shravan Kumar  who spends their time and shared tips.

Looking forward more contribution from all of you.

Freezing If you want to contribute your tips at  http://dailydotnettips.com , please contact with me via Contact Page.

Thanks !

AJ

ASP.NET Custom Repeater Control with EmptyTemplate, ShowHeaderWhenEmpty,ShowFooterWhenEmpty,ShowCount Properties

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 GriimagedView 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.

Continue reading

Download PPT – “Caching Enhancement in ASP.NET 4.0” – Virtual Tech Days – 9th Feb 2011

Today I delivered an 1 hour session on “Caching Enhancement in ASP.NET 4.0”  at Microimagesoft 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. 

Continue reading

Details explanation on Compression Enabled Session for SQL Server and State Sever Session Mode in ASP.NET 4.0

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 imagestorage 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 Serializedfirst . So, when we are moving session data from Web Server to Out 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 SessionMode in web.config .

Continue reading

Programmatically Changing Session State Behavior in ASP.NET 4.0

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 SessionStatebehaimagevior  :

  • 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;

Continue reading

.NET Community Event – ASP.NET 4.0 In-depth ( II )

In continuation of our previous session on ASP.NET 4.0 – In Depth , We are going to take remaining part of the  session on 10th October 2010.  asp-net-4-0-session-agenda

We will be covering below topics

  • State Management Enhancements
  • Client side Enhancements
  • Deployment
  • Overview of Dynamic Data 

    Rest of the topic we have already covered in our previous session. 

  • You can download the videos and presentation of previous session from  here.

    Details of the Session :

    Speakers: Abhijit Jana & Abhishek Sur

    Scheduled Date: 10th – October- 2010  (Sunday )

    Scheduled Time: 2.00 PM to 4.30 PM – IST

    Live meeting URL: https://www.livemeeting.com/cc/mvp/

    Meeting ID:  Will be send from DotNetFunda.Com upon registration

    Is Paid?: No, It’s FREE Session

    Is Registration required ? Yes . Please register here http://bit.ly/d6aVYM .

    Note: Members who had already nominated for the first part of this session happened on 19-Sep-2010 need not re-nominate.

    Thanks !

    AJ

    Different Version of Integrated Web Server in Visual Studio 2010

    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.

    1 2

    Continue reading

    Update : ASP.NET 4.0 – In Depth Session – Download Video and PPT

    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 :

    1. Basic Introduction of ASP.NET 4.0 Features
    2. Visual Studio 2010 Enhancement Session for ASP.NET 4.0 (With Demo)
    3. Server Control Enhancements (With Demo)
    4. Search Engine Optimization (With Demo)

    Whatever we have covered till now, ready to download

    ASP.NET 4.0 In-Depth Session videos, PPT and source code

    We have lots of things to cover and probably we will fix a time later in the up coming weekends and update you the same.

    Below topics we will cover in out next sessions

       1. State Management  improvement in ASP.NET 4.0  ( With Demo)

       2. Deployment in ASP.NET 4.0 ( with Demo )

       3. Client Side improvement ( With Demo )

       4. Dynamic Data ( With Demo)

    Apart from those topic I will discuss few tips and tricks of ASP.NET 4.0

    We will be update soon with our next session date and time. Thanks again for joining.

    Regards,

    Abhijit

    .NET Community Session : ASP.NET 4.0 In-Depth

    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
    • CompressionEnabled Session
    • CSS Improvements and CSS Friendly Menu Control
    • ListView rendering mechanism, Enhancement in Listview control
    • Enhancement in RadioButtonList and CheckBoxList
    • SEO Friendly URL (Web Form Routing)
    • Permanent Redirection mechanism
    • Improvements in Code Expressions
    • Overview of Dynamic data
    • Caching mechanism (Output Caching, Object caching etc.)
    • ASP.NET Applications / Database deployment.
    • Q & A
    • Summary

    Speakers:  Abhijit Jana & Abhishek Sur

    Scheduled Date: 19-Sep-2010 (Sunday )

    Scheduled Time: 2.00 PM to 4.30 PM

    Live meeting URL:  https://www.livemeeting.com/cc/mvp/

    Meeting ID:  Will be send from DotNetFunda.Com upon registration

    Is Paid?: No, It’s FREE Session

    Is Registration required ? Yes . Please register here http://bit.ly/d6aVYM .

    Disclaimer : http://abhijitjana.net/disclaimer/