Visual Studio 2015 Nasty Scroll Problem

It just happened to me again.  I accidentally moved a file in my Visual Studio solution that I had not intention of moving.  I think I’ve narrowed down what my user error is that causes this but still, I know this happens to a lot of people besides me so I thought I’d file a connect bug with the hopes that Microsoft fixes it.

Here is the URL of the connect bug.  Please go and vote for it!

Here is what I actually posted:

I’m labeling this as a bug because it happens so often and often with large consequences.  Today, I finally spend some time and nailed down what actually causes it.

Here is the scenario:
1.  Go to scroll bar of Solution Explorer and grab scroll bar
2.  Start Moving scroll bar
3.  (do not notice that you missed grabbing the scroll bar but instead have grabbed a file
4.  let go of dragged files

The result is the file is dropped at some random place in your solution, likely never to be found again.

Debugging SendGrid’s Parsing Incoming Messages

SendGrid has a nice feature available to it’s Silver Level Subscribers and above (currently $79/month) that let’s you have incoming message to a domain parsed and forwarded through a web service.  This is great if it works but if it does not debugging is tricky because the web service is running on your production server.


Here are some steps to debug the service.

Go to the URL: and then use the URL given to you as the email forwarding URL inside of the SendGrid Control panel.



Then, send an email to your domain you want to parse ( in my case).

Head back to the page and look at the request.

Copy the headers into the fiddler compose request page, then the body into the data area.  You can now post this to your real web server running locally to see what happens.


For some details on what the web service might look like in ASP.NET WebAPI check out this post:  I’d do a little more error checking than done here and also remove some extra code.  Otherwise, it works great.


Google Chrome Extension Clear Cache, My Pick!

I’ve been listening to the podcast recently Adventures in Angular and in particular the “Podcaster Picks” at the end of each podcast.  At first I thought this was pretty silly but have been surprised that many of the picks I did not know about and have been quite useful.  So, in the Holiday spirit of giving, here is my pick for the day.

Clear Cache from Benjamoin Bojko

Motivation For Needing this

I’ve been doing a lot of JavaScript programming for the past couple years and Chrome Dev Tools is my debugger of choice.  It’s amazing easy to clear cache which is something I do quite often.  To be clear, all I have to do is:  1) Tools Pull down then 2) select “clear cache” and finally 3) select the URL in the browser and press refresh.  I just timed this and it takes me about 2.5 seconds.  I could do the keyboard short cuts and maybe shave it down to 1.5 seconds but I switch back and forth between OSX and Windows quite a bit and the key strokes are slightly different so I just do the menus.

Today, I decided to spent 5 minutes hunting for a chrome extension thinking I could use a little more DRY (don’t repeat yourself) in my life and shave a second off my life.

Why I Like Clear Cache

  • It has lots of users so it likely gets attention
  • It puts itself on my toolbar
  • It only requires one click to execute
  • It refreshes the current URL after clearing just the parts of cache I want


Very nice!  HTH’s.

WebAPI REST Routing For AngularJS and ExtJS

As most of my readers know, I’ve done a lot of work with the JavaScript libraries made by Sencha (ExtJS and SenchaTouch).  The typical JSON sent down to the requesting web application looks like the following with both Sencha products.

  "data": [
      "shirtSize": "Mens-4XL",
      "id": 30
      "shirtSize": "Mens-5XL",
      "id": 31
      "shirtSize": "Mens-6XL",
      "id": 32
  "total": 34,
  "success": true

Notice that it is a single JavaScript object that has a property named data which is the array we are interested in.

AngularJS’s Resource api expects just the data array by default without the nice wrapping with total and status.  That is, Angular just wants this:

      "shirtSize": "Womens-L",
      "id": 4
      "shirtSize": "Womens-XL",
      "id": 5
      "shirtSize": "Womens-2XL",
      "id": 6
      "shirtSize": "Mens-S",
      "id": 7

The default routing in Microsoft’s ASP.NET WebAPI 2 is such that a rest controller always formats data the same and it is non trivial to write a special filter to convert the results to one format or the other based on something like a request header.  The work around I came up with to allow basically one WebAPI service to handle both types of output was to have the REST call be slightly different.  The original REST calls to get data were as follows:

…/rest/ShirtSize and …/rest/ShirtSize/31

That is, the two above URLs always get me the full result including the total and success value.  What I want is another REST call I can use in AngularJS that will return me just the array.  My design calls for the following two URLs to do that.

../rest/ShirtSize/ArrayOnly and /rest/ShirtSize/ArrayOnly/31

To do this in WebAPI is quite simple.  All we need to do is add to our routing file (WebApiConfig.cs) the following code.

    ("API Presenter ArrayOnly", "rest/presenter/arrayonly/{id}",
            controller = "presenter",
            arrayonly = 1,
            id = RouteParameter.Optional

Then, in our WebAPI controller itself we have the following method signature.

public HttpResponseMessage Get(int? arrayonly=null,int? id = null)

Now, when the WebAPI call happens without arrayonly specified we get the default behavior which includes the success and count but when arrayonly is passed in the parameter line we can return a custom response that just has our array.


Plugin by Social Author Bio


Get every new post delivered to your Inbox

Join other followers: