Behavior Driven Development Principles
June 25, 2015ALM,Test Driven Development,Agile,Behavior Driven Development
According to AgileAlliance.org:
BDD (Behavior Driven Development) is a synthesis and refinement of practices stemming from TDD (Test Driven Development) and ATDD (Acceptance Test Driven Development).
That's great, but what does that really mean?
BDD has its roots in TDD, but supersedes TDD in the agile development process. BDD recognizes that User Stories are the framework for the development process and that these stories determine the necessary tasks required to satisfy given business requirements. Read more
Moving Hyper-V to Azure
January 23, 2015PowerShell,Hyper-V,Windows Azure
This past week I needed to move a client's Hyper-V machine to a Windows Azure VM. If you haven't figured it out already, the process isn't as straightforward as one may hope - especially, since there's a rather large chasm between the new and old Azure management portals as neither offer an entire end-to-end solution. As with most things Microsoft nowadays, PowerShell seems to be the best solution for truly accomplishing your needs.
Below, you'll find a resource for tackling all of the different components of moving a Hyper-V VM to Azure. There are some ways to do parts of this through the various GUI's, but, again, none of the GUI's offer a complete solution.
Using OLEDB with SQL Native Client
January 20, 2015ASP.NET,SQL,Windows Azure,SQL Azure
This week, while moving a client's VM to Windows Azure, I was also required to upgrade their database from SQL 2005 to SQL Azure. While not extremely difficult, there were a few gotcha's along the way. These "gotacha's" were primarily features that had been deprecated. Those deprecated features aren't the purpose of blog post, however. This post is addressing a connection string issue.
Why Unit Test?
December 20, 2014C#,ASP.NET,MVC,Visual Studio,WPF,ALM,Test Driven Development,Agile,Unit Testing
As a Microsoft Certified Trainer over the past 2 years, I've had the opportunity of teaching hundreds of professionals how to properly engage in unit testing. Amazingly enough, even though unit testing has been around quite a while, it is still a concept that is very infantile in the corporate arena. Most developers who have adopted unit testing are those who work for start-ups or the few companies who've started to embrace agile methodologies executing test-driven development (TDD).
Enabling Web Deploy Publishing With Visual Studio 2012
February 27, 2014Visual Studio,Windows Azure,Windows Server
So after a few hours of trying to figure out how to publish my MVC project in Visual Studio 2012 to my web server running Microsoft Server 2012, I finally got it working. I know there's a lot of other blogs out there, but in order for me to get it working, I ended up having to take bits and pieces from multiple blogs and MSDN articles. So, I decided to compile what I've learned and share here on my blog.
Custom Validation Errors in MVC
December 16, 2013ASP.NET,MVC,Razor
There are times where you may want to display custom validation error messages in MVC. As for me, I'm not a huge fan of the classic ValidationSummary HTML helper. I will still annotate my data model, but I want the errors to have a better presentation in the UI. Occasionally, I may want to display one error at a time. In order to do all of this, there's a few steps that need to be implemented.
Render HTML in a Validation Message in ASP.NET MVC
December 12, 2013ASP.NET,MVC,Razor
Often times you may want to render a custom validation message that contains HTML markup. If you simply add the line:
@Html.ValidationSummary()
This will encode the markup so that less than signs and greater than signs are rendered < and >, respectively. This, of course, is not what you want.
To render your HTML markup, its a little dirty, but it does work.
Simply add the following to your view:
@Html.Raw(HttpUtility.HtmlDecode(Html.ValidationMessageFor(m => m.Email).ToHtmlString()))
Where "Email" is a property of your model.
FileNotFoundException: Could not load file or assembly 'Microsoft.Web.Infrastructure'
When deploying an MVC application to a hosting environment you may receive the error:
[FileNotFoundException: Could not load file or assembly 'Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.]
This is also one of a few component libraries that are needed for deploying an MVC application:
- System.Web.Helpers.dll (required by the web.config)
- System.Web.Mvc.dll
- System.Web.Razor.dll
- System.Web.WebPages.dll
- System.Web.WebPages.Razor.dll
- Microsoft.Web.Infrastructure.dll
The system libraries are installed with .NET 4, however, 'Microsoft.Web.Infrastructure.dll' is only installed when Visual Studio is installed on the machine. Therefore, short of needing to install MVC and Visual Studio on a production environment, we need to deploy the libraries with out application - and we'd like to do so automatically.
There are a few ways to automatically deploy the 'Microsoft.Web.Infrastructure.dll' component library with your application. The steps depend on which version of Visual Studio you are using.
WMI Firewall Exception for Team Foundation Reporting Server 2012 in Virtual Environment
March 7, 2013Team Foundation Server,Hyper-V,Team Foundation Server 2012
While installing TFS 2013 in a Windows Server 2012, I was having issues getting the TFS Application Tier to connect to WMI on the Reporting Server. Being that I’ve installed Team Foundation Server 2010 and 2012 countless times, I was sure that all of my settings were correct. Therefore, I predicted that this must be a firewall issue…and I was correct.
SharePoint 2013 + Visual Studio 2012 Debugging Extremely Slow
March 5, 2013SharePoint,SharePoint 2013,Visual Studio 2012,VMware
Prior to upgrading my machine to Windows 8, I was forced to use VMware Workstations 8 & 9 for development within a virtual environment.
My virtual environment within VMware Workstation 9 was:
- Windows Server 2008R2
- Visual Studio 2012
- SharePoint 2013
- SQL Standard 2012
- 16 GB RAM
- 4 Proc’s
When debugging SharePoint 2013 server-side code, all requests to SharePoint through the w3wp.exe process is extremely slow. Furthermore, stepping through code becomes very sluggish. Additionally, while debugging 2013, the Virtual Studio Remote Debugging Monitor process eats up anywhere between 20-30% of the CPU resources.