Digital Tool Factory blog - Page 5 of 34 - Backend web development in Atlanta GA Digital Tool Factory blog - Page 5 of 34 - Backend web development in Atlanta GA

The Digital Tool Factory Blog

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.


04
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.


05
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

db.Entry(useableProperty).CurrentValues.SetValues(property);

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.


02
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.


08
Apr 15


Written By Steve French

 

How to fix problems with FoolProof Validation in asp.net mvc

For some reason the otherwise delightful nuget Package FoolProof Validation does not work with modern version of the entity framework – rather, the validation works just fine, but it chokes when you try to update the database with entity framework.

The workaround I found was to validate on a view model – and then translate that viewmodel to the actual model, which is then sent to the database.


20
Mar 15


Written By Steve French

 

How to fix problems with Jquery Validate and dynamically generated forms

I recently came across the problem of validating dynamically generated forms with the jquery.validate plugin – everything worked well with the original form, but when there were multiple forms available I got peculiar syntax errors. A quick googling told me to simply add the following code

$(“form”).validate();

to the javascript and everything would be fine. I tried that to no avail. Then I read things more closely and realized that I needed to specify which form I wanted to validate, I changed the code to

$(“#editForm”).validate();

And voila! Problem so.


03
Mar 15


Written By Steve French

 

How to use query strings in framesets with asp.net mvc 5 routing

The problem – I was working on a project that required frames – and I was trying to pass a querystring value to the frameset, as in /FramePage/?page=/SomePageOffSite.aspx – my first thought was to just pass the url of one of the frames to the frameset page as a string.  I made the model for the view a string and attempted to pass it via the usual way in the controller, i.e.

return View(“MyFramedInPage.aspx”);

My thought was that I could just use the Model property as the url, as in

frame src=”@Model” name=”main” noresize scrolling=”auto” marginheight=”0″ marginwidth=”0″

However, whenever I did that MVC would try to find a view with the url of the string (in this case SomePageOffSite.aspx – which did not exist) I was passing in the model.  I eventually figured it out – there is a feature I never use on return View – to wit – you can redirect it to another view simply by passing in the view name (I always used the redirect option) – therefore you can’t ever use a model as a string.  Lesson learned.


11
Feb 15


Written By Steve French

 

How to web deploy to a virtual directory or web application in IIS and Visual Studio 2013

For whatever reason you cannot directly deploy (using Visual Studio WebDeploy) to a virtual directory in IIS.  This threw me for a bit until I created both the virtual directory, a separate website, and pointed them both to the same directory.  Then you just deploy to the otherwise unused website, and your web application shows up in your virtual directory


12
Dec 14


Written By Steve French

 

How to fix problems with 404 errors and ScriptResource.axd

I recently had this problem when working with an older site – I fixed it by changing the AppPool Managed Pipeline mode to “Classic”.

Why that worked I had no idea, but work it did!


11
Aug 14


Written By Steve French

 

How to fix problems with Visual Studio 2013 Web Deploy

Recently I began having problems with the Visual Studio Web Deploy feature – I did some googling and found that restarting the “Web Deploy Agent Service” fixes everything – I’m not sure why the service would lock up after a boot but that did fix it.


15
Jul 14


Written By Steve French

 




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