Browse by Tags

All Tags » .net (RSS)

I am no more

I have moved my blog to http://omaralzabir.com and I am no longer blogging here. Please update your readers and subscribe to the feed on the new site.
Posted by omar
Filed under: , ,

C# with keyword equivalent

There’s no with keyword in C#, like Visual Basic. So you end up writing code like this: this . StatusProgressBar . IsIndeterminate = false ; this . StatusProgressBar . Visibility = Visibility . Visible ; this . StatusProgressBar . Minimum = 0 ; this ...
Posted by omar | 17 comment(s)
Filed under: , ,

Do Unit Test and Integration Test from same test code using Conditional Compilation

You usually write unit test and integration test code separately using different technologies. For example, for unit test, you use some mocking framework like Moq to do the mocking. For integration test, you do not use any mocking, just some test classes...
Posted by omar | 6 comment(s)
Filed under: , , , ,

Is your computer running slow, battery running out quickly?

If your computer is running hot or battery running out quickly then it is most likely due to some application or process consuming high CPU or memory. If you keep running applications for a long time, for example, Outlook, then it continues to grow in...
Posted by omar | 1 comment(s)
Filed under: , , ,

Unit Testing and Integration Testing in real projects

I am yet to find a proper sample on how to do realistic Test Driven Development (TDD) and how to write proper unit tests for complex business applications, that gives you enough confidence to stop doing manual tests anymore. Generally the samples show...
Posted by omar | 4 comment(s)
Filed under: , ,

Simple way to cache objects and collections for greater performance and scalability

Caching of frequently used data greatly increases the scalability of your application since you can avoid repeated queries on database, file system or to webservices. When objects are cached, it can be retrieved from the cache which is lot faster and...
Posted by omar | 11 comment(s)
Filed under: , ,

Web 2.0 AJAX Portal using jQuery, ASP.NET 3.5, Silverlight, Linq to SQL, WF and Unity

Dropthings – my open source Web 2.0 Ajax Portal has gone through a technology overhauling. Previously it was built using ASP.NET AJAX, a little bit of Workflow Foundation and Linq to SQL. Now Dropthings boasts full jQuery front-end combined with ASP.NET...

Memory Leak with delegates and workflow foundation

Recently after Load Testing my open source project Dropthings , I encountered a lot of memory leak. I found lots of Workflow Instances and Linq Entities were left in memory and never collected. After profiling the web application using .NET Memory Profiler...
Posted by omar | 1 comment(s)
Filed under: , , ,

Optimize ASP.NET Membership Stored Procedures for greater speed and scalability

Last year at Pageflakes , when we were getting millions of hits per day, we were having query timeout due to lock timeout and Transaction Deadlock errors. These locks were produced from aspnet_Users and aspnet_Membership tables. Since both of these tables...
Posted by omar | 8 comment(s)

Linq to SQL solve Transaction deadlock and Query timeout problem using uncommitted reads

When your database tables start accumulating thousands of rows and many users start working on the same table concurrently, SELECT queries on the tables start producing lock contentions and transaction deadlocks. This is a common problem in any high volume...
Posted by omar | 14 comment(s)

Strongly typed workflow input and output arguments

When you run a Workflow using Workflow Foundation, you pass arguments to the workflow in a Dictionary form where the type of Dictionary is Dictionary<string, object> . This means you miss the strong typing features of .NET languages. You have to...
Posted by omar | 2 comment(s)
Filed under: , ,

Linq to SQL: Delete an entity using Primary Key only

Linq to Sql does not come with a function like .Delete(ID) which allows you to delete an entity using it’s primary key. You have to first get the object that you want to delete and then call .DeleteOnSubmit(obj) to queue it for delete. Then you...
Posted by omar | 19 comment(s)
Filed under: , ,

Solving common problems with Compiled Queries in Linq to Sql for high demand ASP.NET websites

If you are using Linq to SQL, instead of writing regular Linq Queries, you should be using Compiled Queries . if you are building an ASP.NET web application that’s going to get thousands of hits per hour, the execution overhead of Linq queries is...
Posted by omar | 16 comment(s)
Filed under: , ,

Deploy ASP.NET MVC on IIS 6, solve 404, compression and performance problems

There are several problems with ASP.NET MVC application when deployed on IIS 6.0: Extensionless URLs give 404 unless some URL Rewrite module is used or wildcard mapping is enabled IIS 6.0 built-in compression does not work for dynamic requests. As a result...

Fast, Streaming AJAX proxy - continuously download from cross domain

Due to browser's prohibition on cross domain XMLHTTP call, all AJAX websites must have server side proxy to fetch content from external domain like Flickr or Digg. From client side javascript code, an XMLHTTP call goes to the server side proxy hosted...

Desktop RSS Feed Aggregator client with Outlook Integration

Back in 2005, I built an open source RSS Feed Aggregator Desktop client which has been quite popular since its release. It has 48,672 downloads so far. From the activity I see on sourceforge statistics, it's being used about 20,000 times per day....
Posted by omar | 2 comment(s)
Filed under: ,

10 ASP.NET Performance and Scalability Secrets

ASP.NET 2.0 has many secrets, when revealed, can give you big performance and scalability boost. For instance, there are secret bottlenecks in Membership and Profile provider which can be solved easily to make authentication and authorization faster....
Posted by omar | 3 comment(s)

My first book - Building a Web 2.0 Portal with ASP.NET 3.5

My first book " Building a Web 2.0 Portal with ASP.NET 3.5 " from O'Reilly is published and available in the stores. This book explains in detail the architecture design, development, test, deployment, performance and scalability challenges...

Linq to SQL: How to Attach object to a different data context

After upgrading to Visual Studio 2008 RTM, you will have trouble updating Linq to SQL Classes which are read from one data context and then updated into another data context. You will get this exception during update: System.NotSupportedException: An...
Posted by omar | 16 comment(s)
Filed under: ,

On-demand UI loading on AJAX websites

AJAX websites are all about loading as many features as possible into the browser without having any postback. If you look at the Start Pages like Pageflakes , it's only one single page that gives you all the features of the whole application with...
Posted by omar | 8 comment(s)
Filed under: , , ,
More Posts Next page »