Saturday, December 22, 2007
SQL Performance Tips
The areas which you have to look for are :
1) Transaction Locking
2) Performance of your queries (In medium and high data volumes)
3) Transaction isolation levels
4) Clustered index and indexes of your tables
Browse the flowing for in-depth understanding.....
DBA’s Quick Guide to Timeouts
How to troubleshoot ODBC timeout errors
Friday, November 30, 2007
Dynamic SQL Tips and Tricks
The Curse and Blessings of Dynamic SQL
Tuesday, June 12, 2007
ASP.NET Ajax support in DNN
Saturday, June 09, 2007
Architects! Design Scalable ASP.NET Solutions
- My solution accesses web services and they are fairly slow
- Overall site usage is very high
- Simple web requests takes too long to get their responses
One of the simplest design technique is to design asynchronous pages which access third party web services. ASP.NET 2.0 has built in support for implementing Async web pages. You simply have to :
1) Add <%@ Page Async="true" directive in your page
2) Register "Begin event handler" and "End event handler" delegates using AddOnPreRenderCompleteAsync method
Call your web service in Begin event handler and process the web service response in End event handler. Read this for in-depth understanding.
Sunday, June 03, 2007
My Last Trip at EC
Saturday, May 26, 2007
ASP.NET 2.0 Beginners Troubleshooting Guide
Resolution : In IIS the account(ASPNET or NETWORK SERVICE) access the app_data folder. Therefore the app_data folder must have write/modify permission for this account
I will try to add some troubleshooting tips into this article time to time.
Sunday, May 20, 2007
Do you believe in Unit Testing
Here is how one of Microsoft MVP's described this book
“Beautifully craft ed, detailed unit testing masterpiece.
Bravo, Bravo, Bravo!”
—Mohammad Azam, Microsoft MVP, HighOnCoding
Some of the supplementary tools are :
- NDbUnit, DbUnit
- Rhino Mocks, NMock
- Fit, WinFITRunnerLite
- TypeMock
- NUnitAsp
Enjoy and Rethink about unit testing.....
Wednesday, May 16, 2007
.NET Tools Portal
Saturday, May 05, 2007
Maintainable Regular Expressions
Regex regex = new Regex(@"
^ # anchor at the start
(?=.*\d) # must contain at least one numeric character
(?=.*[a-z]) # must contain one lowercase character
(?=.*[A-Z]) # must contain one uppercase character
.{8,10} # From 8 to 10 characters in length
\s # allows a space
$ # anchor at the end",
RegexOptions.IgnorePatternWhitespace);
You can comment your expressions using # but make sure you use the RegexOption IgnorePatternWhitespace.
Saturday, April 21, 2007
How to Study with your Spouse, Children and a Full Time Job
How to Study with Full Time Job
Sunday, April 08, 2007
CSS Friendly Adaptor Controls
<div class="SimpleEntertainmentMenu" id="Menu1">
<div class="AspNet-Menu-Horizontal">
<ul class="AspNet-Menu">
<li class="AspNet-Menu-WithChildren">
<a href="javascript:__doPostBack('Menu1','bMusic')" class="AspNet-Menu-Link">
Music</a>
<ul>
<li class="AspNet-Menu-Leaf">
<a href="javascript:__doPostBack('Menu1','bMusic\\Clasical')" class="AspNet-Menu-Link">
Clasical</a>
</li>
</ul>
</li>
<li class="AspNet-Menu-WithChildren">
<a href="javascript:__doPostBack('Menu1','bMovies')" class="AspNet-Menu-Link">
Movies</a>
<ul>
<li class="AspNet-Menu-Leaf">
<a href="javascript:__doPostBack('Menu1','bMovies\\Action')" class="AspNet-Menu-Link">
Action</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
In the App_Browsers folder create the CSSFriendlyAdapters.browser and configure all the adaptor controls to be used with different ASP.NET controls.
In this file you can configure in which browsers Adaptor controls should be enabled or disables. Please refer CSS Friendly Adaptors for more details
Sunday, April 01, 2007
MS SQLEXPRESS Issue
If somebody is getting the following error when trying to create new sqlexpress data bases from Visual Studio please follow the instructions bellow to sort out the problem. I've been struggling for couple of hours to figure out the problem
Error : "Failed to generate a user instance of SQL Server due to a failure in starting the process for the user instance"
Resolution : Delete C:\Documents and Settings\USERNAME\Local Settings\Application Data\Microsoft\Microsoft SQL Server Data\SQLEXPRESS.
This is definitely authentication problem. When you uninstall and reinstall sqlexpress it can happen.
Sunday, March 25, 2007
Automate your Build and Packaging Process
Wix ToolSet
Tips and Tricks
Learn MSBUILD
Thursday, March 22, 2007
Beauty Of .NET (Extender Controls)
Extender controls allows you to extend functionality of exiting controls in a form without subclasing. You have to only drag the extender control to the form and there you go ..... all the controls in the form are equipped with the new functionality.
The basics are very simple, and you have to build the rest according to your needs. End of this article I have presented some interesting things that can be done using this technique. Extender control is a component so you have inherit your class from a component and implement the IExtenderProvider interface.
[ProvideProperty("HelloWorld",typeof(System.ComponentModel.Component))]
public class HelloWorldComponent : Component,IExtenderProvider
IExtenderProvider interface is very simple. You have to only implement the CanExtend method.
public bool CanExtend(object extendee)
{
if (extendee is Control && !(extendee is HelloWorldComponent))
{
return true;
}
else
{
return false;
}
}
The above will extend all the controls in a form (win or web) with properties extended from extender control. You can introduce one to many properties to controls in a form using one extender control. For introduce a property you have implement two methods Set
Interesting things you can do with Extender Controls
1) UI Security Implementations
2) Two Way Data Binding in ASP.NET for simple controls like text boxes and radio buttons
Have fun.........
Friday, March 09, 2007
Robust Coding with CBO's and Hydrator
First I'll refer to a Framework that use CBO's and hydrator design pattern. DotnetNuke is a open source Content Management and Portal development framework (http://www.dotnetnuke.com/). It has a large community and fairly stable product. We have used this for couple of commercial products and customers are happy so do we. The complete data layer of this solution is built on CBO's and a Hydrator. This greatly reduces the size of the code and it's complexity.
If you are using CBO's in your code just think how are you going to populate those objects using a DaraReader. If you are going to hand code all the filling mechanisms definitely it's going to be a nightmare. Just think the the maintenance effort, if you change something in the data model you have to go and change the filling codes as well. You can greatly reduce this complexity by using a hydrator or a helper class with CBO's to automatically fill your CBO's based on reflection.
Few hints on how to write a flexible helper class (Hydrator)
- Use .NET 2.0 Generics to define the FillCollection method
public static C FillCollection
where T : class, new()
where C : ICollection
By using generics you can generalize the method to use custom return collections as well as to define concrete objects to be filled at compile time. What I love about this is you can specify generic constraint using where clause.
C# supports five different constraints:
- Interface constraint - The type argument must implement the specified interface.
- Inheritance constraint - The type argument must derive from the specified base class.
- Class constraint - The type argument must be a reference type.
- Struct constraint - The type argument must be a value type.
- New constraint - The type argument must expose a public, parameterless (default) constructor.
In the above "where T : class, new()" means the object should be a reference type and it should have a parameterless constructor
- Use Custom Attributes to map object properties to DB columns and to define custom values to null properties. So you don't have to use the same DB column names in your object properties and you can override default null values.
Saturday, February 24, 2007
Google Apps
Tuesday, January 09, 2007
Connection Strings
Thursday, January 04, 2007
.NET Documentation Compilers
When Microsoft introduces XML documentation I was wondering why Microsoft didn’t introduce a compiler to compile this XML documentation into nice looking
Now the good news is Microsoft have open up there internal MSDN style XML documentation tool to the community. All who are interested in code /
SandCastle is purely command prompt base set of tools and compilers. If you like to get a technical overview of the tool have a look at this blog
https://blogs.msdn.com/sandcastle/archive/2006/07/28/681209.aspx