Menu

Blog

Technology tidbits

CSRF Protection with AngularJS and Spring

May 18, 2016 by Christopher Sherman

Spring Framework, and other web application frameworks like it, comes with Cross-Site Request Forgery (CSRF) protection built-in and enabled by default. However, many tutorials assume that you will be performing a full post-back for each request, thereby allowing the CSRF token to be included in a hidden metadata attribute on the view.

Continue reading

Bootstrap Modal with AngularJS

September 22, 2015 by Christopher Sherman

To use demonstrate using the Bootstrap frameworks’s modal component within an AngularJS project, we’ll create a custom directive for editing text properties throughout an application. This example makes use the modal.js file that is part of the core Bootstrap framework.

In the directive below, you’ll notice we restrict the directive to being instantiated as an attribute only. This provides us with a nice hook on the element upon which the attribute appears. We take advantage of this hook within the link property at the bottom of the directive. Access to the element enables us to add a dismiss function to the directive’s scope, which hides the modal.

Continue reading

Sticky Foundation Alert Elements

March 11, 2015 by Christopher Sherman

Zurb’s Foundation front-end framework comes with built-in alert elements you can drop into a page, but my guess is you’ll want to make them sticky (fixed to the top of the view). To accomplish this behavior, we just need to add a bit of CSS.

Continue reading

Integrate Foundation Abide Validation with Razor HTML Helpers

March 10, 2015 by Christopher Sherman

Razor HTML Helpers are convenient methods that return HTML strings representing different types of content. In this tutorial I’ll explain how to extend the Razor validation message helper so it integrates with Foundation’s Abide Validation library.

Continue reading

CAS Custom Role Provider

March 9, 2015 by Christopher Sherman

The CAS authentication service is a single sign-on solution for web services used by a number of universities. When authenticating with CAS, the server has the option of embedding a list of user roles inside the encrypted authentication cookie. In this tutorial, I’ll explain how to write a custom role provider in ASPASP Dot Net MVC applications to extract the roles passed from the authentication server and integrate them with ASP.NET role authorization.

If you don’t already have your app configured to use CAS authentication, check out my post on getting started with the .NET CAS Client.

Continue reading

Use BrowserSync with Visual Studio

March 6, 2015 by Christopher Sherman

BrowserSync is a synchronized browser testing tool with an ever-expanding suite of features. Fundamentally, BrowserSync will watch files for changes, alleviating the need to manually refresh the browser. In this tutorial I’ll explain how to integrate BrowserSync with Visual Studio.

Continue reading

Copy File If It Doesn't Exist with Grunt Plugin grunt-contrib-copy

March 5, 2015 by Christopher Sherman

Grunt’s copy plugin, grunt-contrib-copy, is helpful for tasks like copying CSS and JavaScript from a Bower components folder to a friendly directory. Copying files is problematic, however, when you’ve modified the destination files and don’t want your changes overwritten the next time the copy task runs. In this tutorial I’ll explain how to add a filter to the copy task to ignore files that already exist.

Continue reading

Rename Copied Files Using Grunt Plugin grunt-contrib-copy

March 4, 2015 by Christopher Sherman

Grunt’s copy plugin, grunt-contrib-copy, comes in quite handy for tasks like copying CSS and JavaScript from a Bower components folder to a friendly css/ or js/ directory. In this tutorial, I’ll show you how to extend copy tasks to rename files in the destination folder.

Continue reading

Integrate CAS with ASP.NET Applications

March 3, 2015 by Christopher Sherman

The CAS authentication system started as a project at Yale University and is now used by a number of higher education institutions. The CAS NuGet package, authored by Jasig, provides CAS authentication for ASP.NET applications. In this tutorial I’ll explain my process for integrating CAS with modern MVC applications.

Continue reading

Publish from Adobe Dreamweaver to Microsoft Azure

March 2, 2015 by Christopher Sherman

  1. In the Microsoft Azure management portal, select New > Compute > Website > Quick Create and complete the prompts to create a new website instance.

Continue reading