“No transport” or “Access is denied” errors in a Microsoft Project Add-in

It’s a new year and apparently that means it’s time to get back and spend some more time working on MS Project Add-ins. The previous one was incredibly useful and I needed to make a couple of modifications so I could re-use the same approach for a new project. The new version needed to hit a different endpoint (no VersionOne this time, yay!), but otherwise needed to get similar data and do similar stuff.

I thought it was going to be incredibly simple (and it was in the end), but I ended up getting caught by an odd piece of stupidity.

Whenever I tried to apply a simple piece of JavaScript that I’d prototyped in a local HTML file to my Add-in, I received a errors with my jQuery $.ajax call – specifically "No transport" and "Access is denied". I had a local file with JavaScript that worked properly, so it had to be something specific to my MS Project Add-in – in the end the answer was right in front of me.

Back when I did my other Add-in I’d grabbed a quick downloadable sample from Microsoft and used that as my starting point, and I’d used that Add-in as the starting point for this new one. Both of the HTML files contained the following tag:

<meta http-equiv="X-UA-Compatible" content="IE=9" />

For some reason this hadn’t been a problem with any of the $.ajax calls in the previous Add in, but here, it was killing $.ajax’s attempt to use CORS. My guess is that the slightly different approach I had to take for authing to the new endpoint was pushing things over the edge, as otherwise the $.ajax requests between the two Add-ins were pretty identical. IE10+ got better/proper support for CORS which jQuery is well aware of and checks for before performing any $.ajax requests, and so the instance of IE11 running inside MS Project pretending to be IE9 was probably confusing the hell out of jQuery.

All I had to do was update my tag to get things working:

<meta http-equiv="X-UA-Compatible" content="IE=Edge" >

A really obvious fix, but when you’re doing web development inside MS Project with limited debugging (*cough* NO ALERT *cough*) it’s amazing how easy it is to overlook the simplest fixes.

Posted on Monday, February 15, 2016 11:06 PM |

Like this? Share it!

No comments posted yet.

Post a comment
Please add 1 and 8 and type the answer here:
Remember me?
Ensure the word in this box says 'orange':