I wanted to write a post to put more emphasis on a practice that, even if no silver bullet, constantly helps me to improve the quality of my daily work and reduce the amount of errors when writing code (yes, we all make mistakes). ‘Diff before commit’ is what I call reviewing each of the... read more
When performing load testing, Visual Studio allows you to collect performance counters from the machines under test, including the controller and agents (which are collected by default). However, when trying to add a counter from a remote machine in your Visual Studio Load Test, you might get the following error: Cant read performance counter categories... read more
For generating enough user load to simulate a real usage scenario of a web application, multiple computers can be used for running a Visual Studio load test in a distributed environment. This set of computer is known as a test rig, which consists of a single test controller and one or more test agents. A... read more
Some time ago, I needed to create and register a custom HttpModule in a SharePoint Web Application. As you probably, know registering the module implies adding an entry in the <modules> section of the Web.config. Reviewing SharePoint Best Practices, I’ve learned that the recommended way of doing this in a SharePoint Application is through the... read more
If you create a Visual Studio Load Test for a SharePoint application that uses Federated Authentication using ADFS (Active Directory Federation Services), you might end in a situation where each Web tests request of the Load Test does not arrive to the application, but is stuck in an ADFS redirection like this: Without getting into... read more
In ADFS v2.0 you can use regular expression (regex) in the claim rules to either: Check for a condition in an incoming claim Transform claim values In this post I’ll show you how to perform both with a simple example. Now, let’s say that I have an incoming claim that says a user can access Document... read more
Update (03/05/2012): A ‘Date and time formatting sample’ that showcases the DateTimeFormatter class has been published as part of the Windows Samples Gallery. You can download it here. The DateTimeFormatter class from the Windows.Globaliztion.DateTimeFormatting namespace provides convenient date and time formatting methods. However, I had some difficulties while trying to define my own date format... read more
If you want to get a sneak peak on what’s coming up in the next version of Visual Studio, the Visual Studio 11 Training Kit is the no brainer choice. The training kit includes hands-on labs to help you understand how to take advantage of the variety of enhancements in Visual Studio 11 and the... read more
Do you want to avoid having repeated code for performing a common task across your WebMatrix site? Do you want to perform a complex task on your WebMatrix site that depends on assemblies (DLL libraries) that are not directly accessible from the WebMatrix environment? Are you exposing an API for a service/website and want to... read more
The OSArchitecture string is a member of the Win32_OperatingSystem WMI class. You can use this string to check the architecture of the current operating system. This means discovering if it’s is 32-bit or 64-bit operating system. You can query this class using PowerShell as follows: $> Get-WMIObject win32_operatingsystem Strangely, I’ve found that this string can... read more