Screen cast: Notifications in SQL 2005 using SqlDependency

18 באוגוסט 2007

One of the classic problems with database applications is refreshing stale data. In a nutshell, Query Notification allows you to cache data and be notified when the data has been changed in SQL Server. Upon notification, you can then refresh your cache or take whatever action you need to. In the following screen cast I will examine the capabilities of the notification services using the SqlDependency class.     You can download the sample code from here. You can download the screen cast from here.
תגובה אחת

Detecting a thread leak

15 באוגוסט 2007

Here is a strange scenario I encountered. One of my customers complained that the number of threads is continuously increasing. So, in order to check it, I opened the Pefmon and selected the System category that includes both processes count and the threads count. I monitored it for a while and could not detect any increase in the total threads count. Then I opened the Objects category in the Perfmon and selected the Processes and the Threads objects. At first glance I could see that the System counters and the Objects counters are not in sync. ...
תגיות:
אין תגובות

Dinner now!

12 באוגוסט 2007

DinnerNow is a fictious marketplace where customers can order food from local restaurants for delivery to their home or office. This sample is designed to demonstrate how you can develop a connected application using several new Microsoft technologies. The demo utilizes several technologies including: IIS7, ASP.NET Ajax Extensions, Linq, Windows Communication Foundation, Windows Workflow Foundation, Windows Presentation Foundation, Windows Powershell, and the .NET Compact Framework.  You can download the entire DinnerNow sample code from here.
אין תגובות

Screen cast: Transactions in unit tests & web tests

8 באוגוסט 2007

In the following cast, I will be talking about the transactions for both unit tests and web tests. Transactions specifies one or more steps that are grouped together, in the web test context those steps are a bunch of URLs, where in unit test it is a bunch of code that is marked as a group. So, why do we need it? I will try and explain it using an example. Lets say that you have a really complicated scenario that must be executed within a unit test. The scenario requires a long initialization and couple of calls to the CRM...
4 תגובות

Creating a custom exception handler

7 באוגוסט 2007

With enterprise library 3.1 you can create a custom exception handler that will handle the exception on hand. First you need to create a custom exception handler. In order to implement your custom handler you must follow 3 rules: Implement the IExceptionHandler. Add a class attribute that implements the ExceptionHandlerData (e.g. CustomExceptionData). Add a constructor that receives a NameValueCollection. Here is a sample ExceptionHandler that implements those 3 rules: public class MyCustomHandler : IExceptionHandler { public MyCustomHandler(NameValueCollection collection) ...
6 תגובות

Screen cast: Using Cryptography Application Block to Encrypt & Decrypt QueryStrings

5 באוגוסט 2007

In this screen cast, I will be show how to use the cryptography application block in order to encrypt and decrypt query string parameters. In addition I am attaching the source code for the screen cast here.   You can download the screen cast from here. Screen cast walk-through In this screen cast I will create a web site application that will contain two pages: Default.aspx and Default2.aspx. The first page will ask the user for a product id input, then it will encrypt it and perform a redirection to the second page while passing the encrypted product id. The second page will decrypt...
תגובה אחת

Pages / Sec versus Page Faults / Sec

1 באוגוסט 2007

"What is pages/sec performance counter ?" The pages/sec performance counter is a memory related counter that measures the hard page faults. A hard page fault occurs when a memory page is not in the immediate memory and needs to be fetched from the disk. It is a very important counter that can potentially help us find bottlenecks. From my experience, a good warning threshold value for the pages/sec counter would be 10 and critical threshold value would be 20. "What is page faults/sec performance counter ?" The page faults/sec performance counter is also a memory related counter that measures the...
תגיות:
תגובה אחת