ASP.Net 5 Areas

Visual Studio 2015 with ASP.Net 5 doesn’t support Areas in the GUI editor. Hopefully that will come, but until then here is a simple workaround. Create folder structure In the root of your project (not wwwroot) create the folder structure for Areas manually. In this example I created an area named “Foobar”. Edit Startup.cs to add routes for… Read More »

Better text console for C#

I recently discovered how slow Console.MoveBufferArea actually is. I used it for writing NLog output to a console and discovered that at times of high output it became dead slow. I could at times see it flicker and update line for line while the whole machine temporarily came to a crawl. As I searched the web I found… Read More »

Optimizing RDP for casual use

Optimizing RDP client/server for casual use. Make it use less bandwidth. Get higher throughput and adaptive transfers. Revisit Back in 2011 I wrote a blog post on optimizing RDP in Windows 7. I’ve been thinking of updating that post for some time, and now finally got around to it. Background Since sometime around 2000 I have been working… Read More »

HTML5: Drop-in prerender and prefetch script

Reading about prefetch and prerender, and especially Chromes prerender, got me thinking that this could to some extent be automated. My blog has become increasingly slow and I though that this would work as a simple quick-fix. This script relies on jQuery. Prefetch At startup (document ready) it will find any a-links tagged as “prefetch” and add their… Read More »

Legacy app: Net-Chat 2.0a (Quick Basic 4.5, DOS)

Recently got some old tapes recovered. There I found an old chat program I wrote in QB45 in 1996 (I was 16 years old). I installed Windows XP under Hyper-V to test it out since Windows 8 doesn’t run 16-bit DOS programs. But I wanted to have the executable work on my computer so I searched and found… Read More »

Multiple deployment configs in one config file with ACL

Most projects that is deployed into production require some kind of config change upon deployment. Often it is the connection string that varies, but it can be any number of custom settings. Forgetting to change the config file when deploying, or forgetting to change config back on your dev machine after deploying can have disastrous consequences. Back in… Read More »

Alternative directory layout for MVC

In .Net the MVC pattern is implemented through a template project. The project is set up for you when you create a new MVC application and imposes certain patterns on you. And that is exactly what MVC is, a pattern. By default you will create a controller, a view and a model. Usually you add scripts to that… Read More »

Image sizes of GIF, PNG, and JPEG after compression

When working with storage and network it is sometimes useful to know the estimated size of image. Should it be stored in SQL/NoSQL, locally, to CDN? Quite a few times have I tried to get a quick answer by Google, but its not that easy. So today I figured I’d write up a quick app, convert an image… Read More »

Windows 2012 Storage Spaces not mounting after reinstall

After reinstalling Windows 2012 R2 Server you may find that the Storage Spaces virtual disks will not show up automatically. In fact you won’t even see them in “Computer Management”. The reason for this is that the server is not configured to use the old storage space setup. Authorize server for read-write to storage spaces First you must authorize… Read More »