June 2012 - Digital Tool Factory blog June 2012 - Digital Tool Factory blog

The Digital Tool Factory Blog

How to fix problems with Ajax Page Caching in asp.net mvc 4

The Problem

'Error' photo (c) 2008, Nick Webb - license: http://creativecommons.org/licenses/by/2.0/You’re using the otherwise awesome ASP.net MVC 4 and you can use an ajax function once, via the @Ajax.ActionLink tool, but you try it again, and it does nothing.

The Cause

For whatever reason the browser thinks it is a cache page and pulls it from the cache – I’m not 100% sure of this.

The Solution

Just add a DateTime.Now as a parameter, this forces the browser to send the data every time.


28
Jun 12


Written By Steve French

 

How to fix the “Handler “dotless” has a bad module “ManagedPipelineHandler” in its module list” problem

The Problem

'Software Bugs' photo (c) 2006, Martin Maciaszek - license: http://creativecommons.org/licenses/by/2.0/You are working away, using the wonderful dotless plugin for IIS, and also taking advantage of the great features of the Less Css System.  Then, for no good reason, your .less file stops loading.  You create all sorts of new Mime types and reboot the server, but nothing seems to work, how do you fix it?

The Cause

Upon closer examination, you uncover the following error

HTTP Error 500.21 – Internal Server Error
Handler “dotless” has a bad module “ManagedPipelineHandler” in its module list

even though you have not changed anything about dotless.

The Solution

At some point the application pool has changed.  Just change it back to a more recent version (I was using a custom application pool) and the problem goes away.


27
Jun 12


Written By Steve French

 

How to fix Visual Studio slowness problems by deleting ExpansionsXML.xml

The Problem

'Program Guy 1' photo (c) 2009, Briles Takes Pictures - license: http://creativecommons.org/licenses/by/2.0/I’ve had Visual Studio 2010 installed from the first day it was released, and lately it has gotten significantly slower.   That’s not surprising with an increased number of add-ons and extensions.  However, closing the program recently started taking an increasingly long period of time.  It recently reached OVER EIGHT MINUTES so I opted to do some googling.

The Cause

I started by installing PerfMon, and PerfMonWatson, which while telling me the computer was slow, did nothing to tell me of the nature of the problem.  Then I installed Process Monitor by the Sys Intenals division of Microsoft and watched what happened when I opened adn closed the Visual Studio 2010.

The result?  When you open or close Visual Studio 2010 a terrifying number of things happen, but in my case an xml,

C:Users[UserName]AppDataLocalMicrosoftVisualStudio10.01033ExpansionsXML.xml

was being accessed, read and closed several thousand times.  Apparently Visual Studio will do that when the file gets corrupted.

The Solution

Just delete the .xml file and everything should run normally.  Visual Studio 2010 regenerated the file, and it was about one fifth the size it was before.  Everything is working slightly faster in general, and it now closes at a normal speed.


22
Jun 12


Written By Steve French

 

Which jQuery cropping plugin should you use?

'As night falls foggy on San Francisco, construction begins on @BalsaMan's moderately famous face.' photo (c) 2010, Aaron Muszalski - license: http://creativecommons.org/licenses/by/2.0/I recently had the need to do some automated image cropping.  I was already using the wonderful ImageResizing.Net plugin, which made all of the server code very easy.  It came with some sample code that uses the JCrop plugin (by Deep Liquid).

Jcrop does it’s job very well.  However…

In the modern web development environment, plugins are both a blessing and a curse.  The blessing portion is that the plugins work very well.  JCrop is no exception.  It does a great job selecting the proper portions of an image to crop in an easy and intuitive manner.  So far so good.

The curse is that every need is somewhat new to the world, and the factory settings ALMOST apply, but not quite.  I was pulling  a list of uploaded images from the server, and I wanted the images to pop up in a normal jquery ui modal dialog window.  It was trivial to display the large photos from a list of thumbnails.  So….

Now to integrate the two

I opted to have the JCrop appear after the thumbnail was clicked.  It did.  So far so good.

Then I ran into problems.  After you select one image, no matter what you select next, the first image will always show up in the modal window, which was a considerable problem.  If you disable JCrop the problem went away, but no matter what combinations I tried in terms of loading order, ready states and dailog and object creation I could not get jCrop to to work in this situation.

Mind you, this is not jCrop’s problem, but it was not the situation I was trying to use

Enter ImgAreaSelect

After quite a few hours I gave up and let my fingers do the googling for other plugins.  I was led to ImgAreaSelect – which was simple and easy to use, and did not have the problems with the dialog boxes that jCrop did.  The documentation was good too.


18
Jun 12


Written By Steve French

 

Less Accounting Review – a 10 part series – The Signup

'Accounting Sense != Common Sense' photo (c) 2007, Paul Downey - license: http://creativecommons.org/licenses/by/2.0/I recently signed up with Less Accounting and I will be publishing a Less Accounting review  and experiences with the setup process here (read the introduction).

  1. Introduction
  2. My accounting background
  3. The Signup (This post)
  4. Import Quickbooks File
  5. Wire Account
  6. Set Recurring
  7. Hook up Bank Account
  8. Hook Up American Express Account
  9. Less Accounting – One Week Later
  10. Less Accounting – One Month Later

There really isn’t much to the signup process (which is a good thing).

I’m tempted to leave it at that for this part of the review, but one thing that does bear mention is the overall look and feel of their website, and the role it plays in your decision making.  The site isn’t flashy, or terribly notable graphically, however, it is very, very well written, and designed to show off the writing, which makes it quite persuasive.

It has a good Unique Selling Proposition (see the Copy Hackers Series for more information on that) and it identifies me quickly (their novice button), and I have a clear action to take. based on those two factors.

The information presented was all useful, both to me, the end user, and my accountant (who needs to approve these sorts of things).

On the whole, it was good enough to get me to sign up and try it.  They identified my frustrations and promised me a cure with at a decent price and nominal risk.  My big concens were importing American Express data, as well as connecting to my bank without additional fees, which they put more of less on the home page.

On the whole, their signup process gets an A+.


08
Jun 12


Written By Steve French

 

How to fix “The system cannot find the path specified” error in asp.net mvc 4

The Problem:

So, you’re coding away, and you run your asp.net mvc 4 site and you get the following error: The system cannot find the path specified

The Cause:

Most likely you have not already specified the database in the web.config, it’s a simple fix.

The Solution:

Just add this code into the web.config

<add name=”BlogProphetsiteContext” connectionString=”Server=.SQLEXPRESS;Database=BlogProphetsite;Trusted_Connection=true;MultipleActiveResultSets=true” providerName=”System.Data.SqlClient” />

and all will be good. For some reason it does not automatically generate one for you.


08
Jun 12


Written By Steve French

 

Facebook AWD is the WordPress plugin to use

'facebook business' photo (c) 2010, Sean MacEntee - license: http://creativecommons.org/licenses/by/2.0/I have now retracted my previous WordPress plugin review, and I have now found FaceBook AWD plugin quite useful, and I’m giving it the full run through.  So far I like it quite a lot.  We’ll see how well it works over the long term.

There seem to be quite a number of features I’ll never use, but so far, so good.


01
Jun 12


Written By Steve French

 




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