Digital Tool Factory blog - Backend web development in Atlanta GA

The Digital Tool Factory Blog

What to do when intellisense stops working in java script files in Visual Studio 2015

Recently I was working on a project and noticed that none of my jquery code extension were working in Visual Studio 2015.  After much rending of garments and gnashing of teeth I discovered that the jquery code snippet plug just doesn’t work with jquery 3 – I downgraded to the most recent version of 2.0 and it all worked perfectly.

Mar 17

Written By Steve French


What to do when your web.release.config does not transform in Visual Studio 2015

Make sure that you are building in release mode – i.e. go to Build => Configuration Manager, and make sure that the relevant project is set to “Release” (like below)

Feb 17

Written By Steve French


How to do a cross domain json request with jquery and mvc web api

So – I was trying to request some data from one server from another – not normally a big deal, but the data would vary depending on whether or not the user was logged in or not.  I thought just setting up CORS would work (I’m using mvc web api 2).  I thought a simple jquery .post or .get would do the job, but surprisingly the .get and .post do not send the auth cookie when making the request – you have to use the .ajax features of jQuery, as well as enabling the “SupportsCredentials” part of Cors – the relevant parts look like this

In your web api controller

[EnableCors(origins: “*”, headers: “*”, methods: “*”,  SupportsCredentials = true)]

Your javascript code should look like this

url: ‘’,
dataType: ‘json’,
xhrFields: {
withCredentials: true
crossDomain: true,
success: function (authText) {

Jan 17

Written By Steve French


How to fix problems with missing form values on jquery serialization

So – I was toiling away on some client side code, and noticed that a dropdown value was not being sent on a post command.  After much rending of garments and gnashing of teeth I figured it out.  I was setting the value with a .val(“something” command) – then doing the post.  It would seem that if you are doing that immediately the value is not quite in the dropdown yet (probably some DOM thing) and rather than send a null value it will omit the dropdown entirely on the serialization, and not send it on the post.

The solution is to

  1. manually add the value as an option in the dropdown
  2. then set that value with the .val() command
  3. then serialize the form
  4. then do the post.


Dec 16

Written By Steve French


How to fix 404 errors in web api 2

So – you’ve tried everything and you’re still getting weird 404 errors in web api 2.    You’ve tried the 4 main ways of fixing it, and you still get nothing – that was what I did anyway.  Finally I started a new project in the solution, and noticed that the problem only occured when other projects were referenced – and that I had several duplicate controller names.

I.E. Project A had and “AjaxController” and Project B had an “AjaxController”.  Everything works fine until you reference Project A from Project B – if you change the name of the controller in Project B the problem goes away and everything works perfectly.

Sep 16

Written By Steve French


How to fix the Compiler Error Message: The compiler failed with error code 255 error

Recently I was deploying some sites, and got the error “Compiler Error Message: The compiler failed with error code 255.” – which looks like this

after some research the cause of, and solution to was all in the nuget package manager.  I had recently added a new project to the solution and some of the more “stock” nuget packages were out of sync with with the newer packages.  Make sure all of the nuget packages are the same version and your problems will be resolved.

Jul 16

Written By Steve French


How to fix the The type initializer for Emgu.CV.CvInvoke threw an exception problem when deploying to azure web apps

I’ve been doing a little Facial Recognition lately – then came across the following error “The type initializer for ‘Emgu.CV.CvInvoke’ threw an exception.” after I deployed to azure web apps.  Everything was working fine locally.

After doing more digging I realized that the actual .exe files for open cv were not being included in the web deployment – all that was necessary was to include the x86 and x64 directories in the project in the Solution Explorer in the project and presto!  Everything works wonderfully.

Jul 16

Written By Steve French


How to set the zoom level in Visual Studio 2015

This is non-intuitive, but all you have to do is click in the zoom area – type in the value (in my case 90%) and then click enter, NOT TAB OUT.

That just threw me for ten minutes.

May 16

Written By Steve French


How to fix the System.InvalidOperationException: The property ‘PropertyID’ is part of the object’s key information and cannot be modified problem

Often times when you are using Entity Framework and trying to update objects using the handy


Method you will encounter the error

InvalidOperationException: The property ‘PropertyID’ is part of the object’s key information and cannot be modified problem

After lots of thought I came across the remarkably simple answer, to wit – the PropertyID field is not being EXPLICITLY included in the object you are passing back to the controller.  Just put that in a “HiddenFor and you’re all set.

Nov 15

Written By Steve French


How to fix an odd problem with autonumeric.js

So, you’re using the standard autonumeric.js jquery plugin on your html 5 site – you set up the initialization properties and nothing happens – what is wrong?

First check to make sure that your textbox is of type “text” and not type “number” – that threw me for about ten minutes today.

Apr 15

Written By Steve French


Copyright 2011 Digital Tool Factory. All Rights Reserved. Powered by raw technical talent. And in this case, WordPress.