One of the first things you figure out when working with Git is that like other source control providers, you want an easy way to exclude files from ending up on your source control to save yourself uploading items such as binaries and local user files (here’s looking at you Resharper!). By adding a .gitignore file to your repository you easily make this possible (if you’re using Windows, feel free to take a look at my post on creating these files successfully in Windows). The problem you have next is when you add a gitignore rule that’s a little too aggressive and your new project files fail to be picked up by Git, but you’re not quite sure which rule is the cause – this post shows you how you can troubleshoot these issues.
Sometimes your ASP.Net sites crash or hang, and you have no idea why. No exceptions, no event logs. This leaves you a little light on places to start your debug investigation journey. Microsoft Developers who live a little closer to the metal (i.e. non web developers) will know of tools like WinDbg, but for web developers these tools can seem a little scary/low level. This post is aimed at allowing you to get a closer view on your ASP.Net website at the time of a failure, without any of complexity of learning WinDbg on your own.
Over the past two weeks I've begun moving a lot of my hosting infrastructure onto Microsoft Azure. This has consisted of all sorts of configuration – virtual networks, VPN's, backups, servers, databases and sites. One of my sites uses Code First Migrations at it's core, and during the migration simply nothing would work. After much pain and frustration I made the worst mental leap a developer can make: I came to the simple conclusion that is was everyone else's fault. Like most of these kinds of problems, I was to blame all along.
Often you'll find yourself logged into a web or application server and need to simply test that you can get to the SQL server you've unsuccessfully been trying to point your app at. Luckily there is a nifty trick built into Windows that allows you to save the day without having to install anything on your box – and it works on both client and server operating systems just as well.
Windows 8 comes with some pretty awesome new toys, one of these for me is the Music app. As a Windows phone user for many years now I’ve fallen in love with the all-you-can-eat music subscription service that Microsoft has on offer. Sadly for me when I installed Windows 8 the app simply crashed every time I tried to play music. I searched for months and months, and now have the answer – in the hope that I save someone else the heart ache I’m happy to share what I discovered.
We’ve all been guilty of it in our development careers at one time or another. When starting out using a language or framework that you’ve never used before you often have no choice but to. What I’m talking about is the act of “copy paste coding”, and it’s as common in the programming world as chewing gum under seats. When you copy and paste other developer’s code into your application it’s important to fully understand what the code does before you continue; or risk joining the many fools that have gone before you.
When you include .Net 2.0 mixed mode assemblies in .Net 4.0 or .Net 4.5 projects you often have to add some start up options to your project’s config file to get it all to play nice when your app starts up. This backwards compatibility feature is great as it allow you to use older/non supported projects in your recent work.When when using Visual Studio 2012’s new unit testing tools this magical piece of app.config code doesn’t seem to help though, and the solution is pretty simple.
During the big Mango update rush over the last 3 weeks i joined the rest of the Windows Phone 7 Development community and excitedly upgraded my phone from Windows Phone 7 Mango Beta to the real thing. I was so eager to upgrade right now that I did so on my work PC where I connect my phone as a Guest. This happily got me up and running (definite thanks to the WP7 team for doing such a great job of the upgrade experience). My troubles only began when i tried to synch my phone at home a couple of days later. Hopefully i can save a few of you the time i spent looking into this.
One of the most annoying things I find when i start working with a fresh installation of Visual Studio 2010 is that when implementing interfaces and base classes using the “Implement Interface X” function (CTRL + period) it inserts those crappy #region tags.
If on your first ever start of Visual Studio you pick a layout that happens to be missing the oober aweshuum “Build configuration” dropdown menu from your toolbar and are struggling to find it in the Build toolbar (i know i was..) here is how you add it back:
MS SQL Server has a habit of sprouting enormous appendages in the form of log files. Like the infamous Tree Man from Indonesia, sometimes this can be a situation that gets out of control. The SQL error log is one of these sources of pain, but there are a few tricks to pull out of your sleave that’ll save the day.
One of the niggling that often happens when your deployed to a cheap shared hosting environment is having your table owners change on you. If you have created a data access layer that references tables using their long name this is an issue. This can be caused by a deployment script not maintaining user permissions on your tables or maybe you’re using a web console to interract with you database like myLittleAdmin and it doesn’t allow you to create a table under any user but your own.
So this may be a post that exists in a million places on the web if you know where to look, however it would appear that whenever i do this a colleague gets the idea that i am channelling black magic. How does one “debug” a mail server connection – this is as easy as 123.