Hey checkout my new blog on Github Pages using Jekyll.

Asp.Net vNext

Working with MVC Areas in Asp.Net vNext (MVC 6)

Working with MVC Areas in Asp.Net vNext (MVC 6)

Working with MVC Areas in Asp.Net vNext (MVC 6)

I have recently started to play around Visual Studio 2015 Preview and Asp.Net vNext. As usual, I jump into new stuff like this with the mindset of building projects the same way that I would have with other versions. So in this case, I was trying to build a MVC 6 website the same way that I would build a MVC ¾/5 website.

Straight away I wanted to add an Area to the project. In Visual Studio 2013, I would have right clicked on the MVC project, selected “Add” and then “Area”, typed in the name for the Area and then Visual Studio would scaffold this for me.

Changing the Password length in Asp.Net vNext Identity

A while ago I wrote a blog post regarding MVC 3 Password Length DataAnnotation in order to easily change the length of the password required to register for an account within your website. This blog post is about how you can easily manage your password password strength in an Asp.Net vNext project (Asp.Net 5)

If you create a new Asp.Net 5 Web Application in Visual Studio 15 Preview you will see that it is set up to use Microsoft.AspNet.Identity for handling user Authentication.

By default it will come with a RegisterViewModel that has the Password property and various DataAttributes

[StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)]
[Display(Name = "Password")]
public string Password { get; set; }

Similar to my MVC 3 Password Length DataAnnotation post, the length of the password is controlled from within the Model, so if you want to change this length then you will have to edit code.

Stopping and Starting your Application Pool with Octopus Deploy

Depending on your Web Server set up, you might not be able to overwrite the Bin folder without some manually intervention. Usually it is because there is a process using files within the Bin folder and you will have to stop the application pool first.

Octopus will soon inform you if this is the case when deploying your package to the server, and will give you the error message:

One or more files in the directory may be locked by another process. You could use a PreDeploy.ps1 script to stop any processes that may be locking the file. Error details follow.

Octopus Deploy

Entity Connection String within Octopus Deploy

I have been using Octopus Deploy more and more recently and it is quickly becoming my deployment tool of choice. If you haven’t heard about it, then I would highly recommend that you go and check it out now! Octopus Deply

One of the projects I have been working on uses the EntityFramework for data access, so there is a System.Data.EntityClient connection string within the web.config. The EntityClient connection string differs from the standard SqlClient string in that it contains metadata along with the connection string. It also contains " within this string.

Multiple Site Bindings Enabled

I was updating a client’s site recently which had various Web apps located in the same website folder all sharing the same web.config file. After the update, everything looked as though it was working as expected, however there was something wrong.

This collection already contains an address with scheme http.

Luckily my logging code was emailing me the error which was being thrown silently from some Ajax posts.

Photoshop CC 2014

Exporting all Photoshop layers as Jpeg

Sometimes I like to just blog some handy hints that you might find useful, but really they are just so i have a central reference for handy hints!

Handy Hint Photoshop CC Layer exporting

In Photoshop, it is possible to export all layers as individual files rather than manually going through each and saving for web. This saves a heck of a lot of time!

Knockoutjs default if empty

I have been working on a big project recently involving knockoutjs and have learnt so much about this data binding MVVM library. It is a well supported JavaScript framework with a large community of users, so there is always a solution to a problem. However I came across a little problem, not with knockoutjs, but with how IE handles empty <span> tags.

Knockoutjs conditional attribute binding

You can create a custom binding attrIf which will check the value of a specific observable boolean before add or not the attributes. See this example:

Getting to know Markdown


Single line without any additional markup





CSS image captions

I have only recently discovered this, but it is something I thought was worth noting down on my blog for my future reference if anything!

Easy CSS image captions using :after and the attr attribute.

About Me

Tim James I'm Tim, a web applications developer from Glasgow, Scotland. Currently working for Kingfisher Systems Ltd, building bespoke systems within the Car Auction industry.

  • C#
  • VB.NET
  • .NET MVC
  • Web API
  • Razor
  • HTML5
  • CSS3
  • jQuery
  • WCF
  • SQL
  • knockout.js
  • Angularjs
  • AJAX
  • APIs
  • SignalR
Why not follow me on twitter? Follow me on Twitter