Hugoware

The product of a web developer with a little too much caffeine

Posts Tagged ‘Tools

Meanwhile, Back At CodePlex…

leave a comment »

Just a quick update — I’ve been working on Flow Based MVC Controllers some more and hope to do a blog post about them in the next couple days…

For now, I’ve moved some of my other MVC projects onto CodePlex so there is a better home for them (than my own website of course :))

Mvc Content Marker

A few months ago I wrote some code that allowed you to write to different parts of the page using inline code — You probably know it isn’t easy to add a stylesheet or script to a different part of the page since after render code has finished you can’t go back and write over it.

This code makes it so you can place a marker on the page and then write back to it no matter where you are at. It also supports forward looking markers (meaning markers that haven’t been added to the page yet) so it makes it easy to add scripts to the footer of your page from higher up in the document.

As it turns out Spark has something similar to this — but if you aren’t ready to jump into Spark then this still might be handy for you. (Spark is cool, don’t get me wrong though)

Mvc WebForm

Mvc WebForm does exactly what you think it does — It lets you place a WebForm inline with your Mvc code. I isn’t perfect at all and in all honestly was just to see if it was possible. As it turns out you can have basic event handling, button clicks, data grids — whatever — and it works directly in your Mvc Views. Neat stuff even if it is evil.

I expected to be shunned by the development community with this but surprisingly I got several ‘thank you’s and ‘good job’s — Funny how that works out sometimes.

Written by hugoware

December 7, 2009 at 10:16 am

Tool List Mania!

with one comment

Not sure if everyone else has been noticing this but a lot of devs have been developing lists of their favorite tools. While I’m not calling myself a “famous dev”, I do think that I’ll join in party!

ClipX – Clipboard Manager

clipx

Seriously, this tool ranks as one of my favorites – it’s such an amazingly useful concept executed with simplicity and elegant… or something like that. Basically, Copy as much as you want and even use your Paste command like you normally would. But if you need something from your history press Shift+Paste and BAM! A list of previously copied text and images – Awesome!

Notepad++ – Simple, Clean, Excellent

notepad

The classic Windows Notepad has served us well but all things must pass. Notepad++ is actually a bit of a misnomer if they are trying to describe how much better it is compared to regular Notepad. It should be something like Notepad+x42, but you get the idea anyways.

One of the reasons why this Notepad sets itself apart from others is it’s Word Completion “intellisense” – basically it uses the words already in your document for the auto-complete text, which is surprisingly useful!

notepad-word-complete

Expresso – Makes Me Think Of Coffee

expresso

There is probably thousands of Regular Expression tools out on the web that people all love – my personal choice has always been Expresso. I’m not sure if its the tools, that its free or a sub-conscious choice since I like coffee so much. Regardless, Expresso has been in my toolkit for a long time now and until someone else comes up with another coffee flavored named version, I’m sticking with it.

RocketDock- My Personal Apple Indulgence

rocketdock

Yeah, this looks like the application launcher for the enemy but it is still one of my favorite ways to get access to my most commonly used applications. Windows 7 might change my mind but for now this is hard to beat. You can even download additional plug-ins that can create the same “fan” style folder list! Awesome!

Like most tools, there are a lot of other options out there, but RocketDock is the only one that consistently placed the window focus on programs I launched, which was pretty much the most important part of the whole thing for me. 🙂

.NET Reflector – Pure AWESOME

reflector

I’m shocked when I encounter a developer that hasn’t heard of Reflector – but then again all of us, at one point or another, never knew about it. Even though you probably know all about it I’m going to list it just in case. If you ever need to see what the source of compiled .NET code looks like this is the tool.

jLinq- Personal Plug

jlinq

It’s like LINQ with your JSON data! Brilliant! Someone needs to get this guy a raise! In all seriousness if you’re going to be doing a lot of work with JSON data, especially large arrays of records, then jLinq will go a long way to help you keep your code short and clear!

n52te – Bonus Hardware Section

n52te

If you like gaming then you might want to check this out – the n52te. It is hard to see how I used to play games in the past before this came along. When I get this thing configured I can do 66+ commands reliably all with my left hand! Your keyboard certainly can’t do it!

I also use this thing for work from time to time, interestingly enough. For example, I have a separate configuration for using Blender (3D modeling program) that makes it easier to navigate the application. (I’m not good at 3D modeling, just something I do for fun)

In fact this is my second time buying this – I used to own its baby brother – until he died (granted it took a lot of abuse before it did).

And For Your Viewing Pleasure

You may have come here today looking for .NET programming related content… sorry… But how about a .NET related LOL-Cat?

lolcat

Written by hugoware

September 4, 2009 at 2:19 am

Encrypt Your Web.config, Please

with 29 comments

If you follow me on Twitter you may notice me talk about #BadVendor from time to time. Actually, they were recently upgraded to #EpicFailVendor when I discovered they weren’t cleaning strings before passing them into SQL queries. Needless to say, everyday has been a little more shocking than the next.

For the most part all of these systems are things I can’t make changes to — either it’s compiled code or I just don’t have the authority to go in and make the fixes, but there is something that I can do — encrypt their web.config files.

Making Encrypting Easier

Encrypting normally involves logging onto the server in question, locating a few mildly obscure pieces of information and then running aspnet_regiis. It’s not that hard but it isn’t point and click easy as well.

I wanted to make it easier to update these files without needing to locate all the information each time so I wrote a little application to make the whole process a bit easier. The utility uses credentials you supply to log into your servers via WMI and locate the required information and then encrypt your files without needing to pull up a command prompt.

I’m not really a WinForms guy and WMI is certainly not my specialty, but this program came together pretty quickly and seems to be fairly decent. It’s certainly not bug free and could use a round of refactoring to make it nicer, so any feedback is appreciated.

How It Works

The first step is to provide your credentials to the server you want to log into. If you choose to run the tool on the actual server itself then you can leave all those fields blank (since WMI won’t use them for local connections anyways). If you aren’t an admin for that server or at least and account with some elevated credentials then this may not work for you.

nkript.screen1

Once you successfully connect to the server, a list of the sites on the server will be loaded along with any virtual directories (since they could potentially contain a web.config file). At this point you can simply browse around and find the web.config you’re wanting to encrypt.

nkript.screen2

It’s worth noting that if there aren’t any web.config (that name specifically) found inside the directory then it won’t be listed. If you happened to have something named web.temp.config then it won’t show up on this list.

At this point the program is going to do a little painful WMI magic and connect out to your server and load the web.config file into the view. The config file will be parsed and all the root nodes will be listed as available to be encrypted.

nkript.screen3

There are apparently some rules about what can or cannot be encrypted, so if the actual aspnet_regiis call fails, you’ll just end up with the same file as before, but you don’t get an explicit message as to why (still trying to find out how I can access messages like that in a semi-reliable WMI fashion).

There isn’t much configuration for this application. The default settings are used to perform the encryption and decryption of the web.config files, so if you are wanting to add some features on you are more than welcome to add them in. I’d love to hear about your changes so I can add them to this version.

It’s not hard to encrypt your web.config files and keep your sensitive information safe. The command line tool aspnet_regiis offers a lot of great functions to further protect your data. Hopefully, this tool allows you to get your work done even faster.

Now if you’ll excuse me, I need to share this tool with #EpicFailVendor. I dunno about the rest of you you but enough is enough! I’ve had it with these monkey fighting vendors not encrypting their their Monday to Friday web.configs!

Mandatory Disclaimer: This program is certified as ‘Works On My Machine’ – The author makes no warranties about how it might behave in your environment (but most likely you have nothing to worry about).

Downloads

Download Nkrypt.exe (Web.config Encryption Tool)

Download Nkrypt.zip (Source Code)

.

After posting this article I got an interesting response from another person that web.config encryption is ‘pointless’ — I thought it was interesting enough to do a follow up blog post about it.

Written by hugoware

July 16, 2009 at 6:20 am