How to troubleshoot slow Page Rendering in ASP.NET?

by rahul 11/20/2009 7:37:44 AM
Before I answer this question, let us have a quick refresher. Answer this question diligently… Is Page_Render in ASP.NET really an EVENT? A BIG ZERO if you have said YES! The answer is No, It is not. Here is an excerpt from MSDN… <snip> This is not an event; instead, at this stage of processing, the Page object calls this method on each control. All ASP.NET Web server controls have a Render method that writes out the control's markup that is sent to the browser. If you create a custom... [More]


Insert functionality in GridView – Part 2

by rahul 7/10/2009 1:33:07 PM
In my previous post I have shown that if you have no records in your table and try to bind that table to a grid view, you will get nothing. Not even the header rows. To get rid of this issue, there is a very simple way. 1. Select Edit Templates 2. Switch over to EmptyDataTemplate 3. Drag and drop a Form View control and bind it to the same data source. 4. Change the Default Mode of this Form View to Insert and you should be good to go. And if this doesn’t suit your bill… “Code”. ... [More]


Location of Temporary ASP.NET files in Vista or Windows 7

by rahul 7/9/2009 4:59:03 AM
Ideally, you would see the Temporary ASP.NET files in… C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files But, if you are working on Vista/Windows 7 and not running Visual Studio as an Administrator, you may find that this location Temporary ASP.NET Files will be empty. Thankfully, the functionality of the web application doesn’t get affected. Nevertheless, if you need to go to the Temporary ASP.NET Files, find it here… c:\Users\[myuserid]\AppData\Local\Temp\Temporary ASP.N... [More]


Missing Insert functionality in GridView – Part 1

by rahul 7/6/2009 4:52:28 AM
I have never been a very big fan of “drag and drop, do data binding… get your application up in no time, and rejoice” approach, but sometimes when I am really lazy I go that route too. So, today was that day… I had a very simple requirement. Let’s take a look at the two tables below… one is Course (Master) and the other one is CourseArticle (Detail). My requirement is to use LINQ and see how fast I can make the things work in ASP.NET. Approach 1 : Using GridView Step 1. Drag and drop Gri... [More]


Sample ASPX page to show security details in ASP.NET

by rahul 4/5/2009 2:38:40 AM
This may come in handy if you are trying to troubleshoot security related issues in ASP.NET. I had this page posted here, but it was in VB.NET and I have been experiencing some issues with my previous blog site, so I am cross posting it here in C# for future reference. All you have to do is create a page (say security.aspx) and open it up in Notepad. Paste the following code, and you should be good.   <%@ Page Language="C#" %> <!DOCTYPE html PUBLIC "-//W3C//D... [More]


Using Javascript and ASP.NET Ajax to create a continuous list

by rahul 1/28/2009 8:34:29 AM
What the heck is a continuous list anyway? Honestly, I don't know if I should be using this name or not, but probably this is what it looks like. Without further ado, let's see what I am referring to... Visit www.dzone.com - Notice that whenever you tend to reach the bottom of the page, there are some more items listed for you. The list seems almost endless, and I like this interface a lot, simply because it doesn't ask me to go to page N.   In this post, we will use the following to create... [More]


Having your custom ASPX page in an ASP.NET compiled Website

by praveen 11/15/2008 3:55:11 AM
  When you publish an ASP.NET website using Visual Studio it will give you a pre-compiled site. This process of pre-compilation does various actions on the ASPX pages. Files are treated differently. There are various reasons why you would want to pre-compile your ASP.NET site. If you need more details on that you could go here or here.   Now when you have a pre-compiled site, there are a few problems you run up against. For example you run into issues with Global.asax and I have read s... [More]


ASP.NET:How to write error messages into a text file using a simple httpModule

by Rahul 7/18/2008 12:14:11 PM
In one of my previous posts, I mentioned about how to troubleshoot some issues with the use of a module. In this post, I will show you how a similar module could be of use when you want to log all the errors in a text file for troubleshooting purposes. Please ensure that C:\Temp folder has Write access for the account that is running the IIS Worker Process. Here is the code for the module... using System; using System.Collections.Generic; using System.Text; using System.Web; using System.IO;... [More]


Run a batch file as a specific User (or Administrator) from ASP.NET...

by Rahul 7/13/2008 8:20:21 AM
...well first of all, I am NOT recommending it, but sometimes it could be necessary! Now, let's proceed to the code... 1. Create a page called RunBatchFile.vb and paste the following...Imports System.Diagnostics Imports System.IO Partial Class RunBatchFile Inherits System.Web.UI.Page Dim _password As New System.Security.SecureString Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Dim password As String 'Read from any R... [More]


How to use httpModules to troubleshoot your ASP.NET application

by Rahul 7/13/2008 5:52:01 AM
No matter how many things you keep in mind before developing an application, when once they are put in production... quite often you will see something not behaving the way you expected. Many-a-times, the applications would throw an error which you can troubleshoot depending on the error message you found. In this post, my intention is not to cover those "error" scenarios. I intend to cover something which is more problematic to troubleshoot... like intermittent slowness in some pages, or some e... [More]


Search


Tags



Categories

Calendar

<<  September 2010  >>
MoTuWeThFrSaSu
303112345
6789101112
13141516171819
20212223242526
27282930123
45678910

View posts in large calendar

All Items
Sign in

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.
© Copyright 2010, Rahul Soni

Powered by BlogEngine.NET 1.4.5.0