<?xml version='1.0' encoding='utf-8'?><rss version='2.0'><channel><title>Steve Woods Web Development Blog</title><link>http://www.lanilogic.com</link><description>Web development and design related shenanigans from Steve Woods in North Lincolnshire</description><lastBuildDate>Mon, 14 Mar 2016 12:01:06 GMT</lastBuildDate><language>en-gb</language><item><title>How to use SQLCMD at the command line against a specific database to run a SQL Script</title><link>http://www.swoo.co.uk/blog/40049/how-to-use-sqlcmd-at-the-command-line-against-a-specific-database-to-run-a-sql-script</link><guid>http://www.swoo.co.uk/blog/40049/how-to-use-sqlcmd-at-the-command-line-against-a-specific-database-to-run-a-sql-script</guid><pubDate>Mon, 14 Mar 2016 12:01:06 GMT</pubDate><description>&lt;p&gt;I had an issue where the script I was trying to execute from SQL Enterprise Manager was too large and causing &amp;quot;out of memory&amp;quot; errors to occur.&lt;/p&gt;

&lt;p&gt;The only option was to run it outside of the GUI via the command line - here&amp;#39;s the syntax (open a Command Prompt):&lt;/p&gt;

&lt;pre&gt;
SQLCMD -S SERVERNAME -d DATABASENAME -i FILENAME.SQL&lt;/pre&gt;

&lt;p&gt;If you do not specify the -d DATABASENAME, it will default to the database &amp;#39;&lt;span style=&quot;color: rgb(42, 42, 42); font-family: &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif; line-height: 18px;&quot;&gt;DefaultLocalInstance&amp;#39; which is usually &amp;#39;Master&amp;#39; (you don&amp;#39;t usually want to do this).&lt;/span&gt;&lt;/p&gt;
</description></item><item><title>How to build a Property Search using a ViewModel</title><link>http://www.swoo.co.uk/blog/40048/how-to-build-a-property-search-using-a-viewmodel</link><guid>http://www.swoo.co.uk/blog/40048/how-to-build-a-property-search-using-a-viewmodel</guid><pubDate>Mon, 07 Mar 2016 00:27:38 GMT</pubDate><description>&lt;p&gt;In this ASP.NET MVC tutorial, I show you how to use a ViewModel to build a basic Property Search simulation which emulates something you might find in a real-world property search website like Zoopla or RightMove.&lt;/p&gt;

&lt;p&gt;&lt;iframe allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;500&quot; src=&quot;https://www.youtube.com/embed/BeQS6Iz8yPw?rel=0&quot; width=&quot;100%&quot;&gt;&lt;/iframe&gt;&lt;/p&gt;
</description></item><item><title>Implementing a PayPal Payment Button with ASP.NET WebForms</title><link>http://www.swoo.co.uk/blog/40046/implementing-a-paypal-payment-button-with-aspnet-webforms</link><guid>http://www.swoo.co.uk/blog/40046/implementing-a-paypal-payment-button-with-aspnet-webforms</guid><pubDate>Tue, 15 Dec 2015 19:33:47 GMT</pubDate><description>&lt;p&gt;One of the biggest problems with ASP.NET WebForms development is the fact that every single page is wrapped in a form tag for the postback functionality, and you can&amp;#39;t nest forms within other forms.&lt;/p&gt;

&lt;p&gt;This causes issues when integrating features like PayPal buttons which are normally placed on the page as a simple form template, with the parameters specified as hidden input fields.&lt;/p&gt;

&lt;p&gt;I recently worked on a project for a colleague who&amp;#39;s client needed a nice form to be submitted to PayPal so that a gift certificate could be dispatched, and was tasked with making this work in ASP.NET WebForms.&lt;/p&gt;

&lt;p&gt;Because I couldn&amp;#39;t place another form on the page (such as the ones that they recommend on the PayPal developer website) I had to construct a URL based on the WebForms form, and then redirect to the PayPal server once the postback has been initialised.&lt;/p&gt;

&lt;h2&gt;Here&amp;#39;s the code for a hosted button&lt;/h2&gt;

&lt;pre&gt;
protected void SendButton_Click(object sender, EventArgs e)
{
    if (Page.IsValid)
    {
        StringBuilder ppHref = new StringBuilder();

&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ppHref.Append(&amp;quot;https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&amp;quot;);
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ppHref.Append(&amp;quot;&amp;amp;hosted_button_id=[HOSTED BUTTON ID]);
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ppHref.Append(&amp;quot;&amp;amp;on0=Voucher Amount&amp;quot;);
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ppHref.Append(&amp;quot;&amp;amp;os0=[PRE-DEFINED OPTION]&amp;quot;);
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ppHref.Append(&amp;quot;&amp;amp;on1=Name to send voucher&amp;quot;);
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ppHref.Append(&amp;quot;&amp;amp;os1=[RECIPIENT NAME]&amp;quot;);
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ppHref.Append(&amp;quot;&amp;amp;on2=Email to send voucher&amp;quot;);
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ppHref.Append(&amp;quot;&amp;amp;os2=[RECIPIENT EMAIL]&amp;quot;);
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ppHref.Append(&amp;quot;&amp;amp;on3=Personal Message&amp;quot;);
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ppHref.Append(&amp;quot;&amp;amp;os3=[YOUR MESSAGE HERE]&amp;quot;);
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ppHref.Append(&amp;quot;&amp;curren;cy_code=GBP&amp;quot;);

        Response.Redirect(ppHref.ToString(), true); 
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } 
}
&lt;/pre&gt;

&lt;p&gt;Worked a treat :)&lt;/p&gt;
</description></item><item><title>OpenVPN won&#39;t connect on Windows 10 - Solved</title><link>http://www.swoo.co.uk/blog/40045/openvpn-won't-connect-on-windows-10---solved</link><guid>http://www.swoo.co.uk/blog/40045/openvpn-won't-connect-on-windows-10---solved</guid><pubDate>Mon, 14 Dec 2015 13:53:43 GMT</pubDate><description>&lt;p&gt;I work with some colleagues who use OpenVPN to connect to their SVN repository and as such have to authenticate via a VPN tunnel before I can checkout the existing codebase.&lt;/p&gt;

&lt;p&gt;However, every single time I update Windows 10 to the latest version (which is mandatory after a while!), the OpenVPN software then fails to connect - with a brilliant and informative error &amp;quot;Failed to connect&amp;quot;. Nothing in the logs, nothing in the Event Logs.&lt;/p&gt;

&lt;p&gt;After tearing out what little hair I have left, I came across a solution on &lt;a href=&quot;https://www.reddit.com/r/Windows10/comments/30wp2q/build_10049_openvpn_client_cant_connect_anymore/&quot;&gt;Reddit&lt;/a&gt; of all places - just reinstalling the OpenVPN client won&amp;#39;t work, you have to also reinstall the TAP drivers for OpenVPN by downloading&amp;nbsp;&lt;a href=&quot;https://swupdate.openvpn.org/community/releases/tap-windows-9.21.1.exe&quot;&gt;https://swupdate.openvpn.org/community/releases/tap-windows-9.21.1.exe&lt;/a&gt;&amp;nbsp;.&lt;/p&gt;

&lt;p&gt;Once downloaded, you have to run the TAP update script, but you MUST run it as an Administrator, else it&amp;#39;ll fail.&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;Click the &lt;strong&gt;Start Menu icon&lt;/strong&gt;.&lt;/li&gt;
	&lt;li&gt;Go to&lt;strong&gt; All Apps&lt;/strong&gt;&lt;/li&gt;
	&lt;li&gt;Scroll down to&lt;strong&gt; TAP Windows&lt;/strong&gt;&lt;/li&gt;
	&lt;li&gt;Right click on &lt;strong&gt;Add a new TAP Virtual Ethernet Adapter&lt;/strong&gt;&lt;/li&gt;
	&lt;li&gt;Click on &lt;strong&gt;&amp;quot;More Options&amp;quot;&lt;/strong&gt;&lt;/li&gt;
	&lt;li&gt;Click on&lt;strong&gt; &amp;quot;Run as Administrator&amp;quot;&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now install the OpenVPN client from your VPN address, and it should connect fine once done.&lt;/p&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;
</description></item><item><title>What makes someone a bad programmer?</title><link>http://www.swoo.co.uk/blog/40044/what-makes-someone-a-bad-programmer</link><guid>http://www.swoo.co.uk/blog/40044/what-makes-someone-a-bad-programmer</guid><pubDate>Sat, 12 Dec 2015 10:25:51 GMT</pubDate><description>&lt;p&gt;During my time in the web industry I&amp;#39;ve seen the question about what makes someone a bad programmer mentioned quite a few times so I thought I&amp;#39;d publish my own thoughts on the matter.&lt;/p&gt;

&lt;p&gt;Personally I don&amp;#39;t think it&amp;#39;s anything to do with programming or inate technical ability per-se, but more of a persons general attitude towards work, towards peers and towards the overall goal of the organisation they work for.&lt;/p&gt;

&lt;p&gt;&lt;img alt=&quot;&quot; src=&quot;/content/images/blog/bitch.jpg&quot; /&gt;&lt;/p&gt;

&lt;h2&gt;I was a bad programmer&lt;/h2&gt;

&lt;p&gt;I can hold my hands up and say that I was a bad programmer for the first half of my career and it&amp;#39;s one of my biggest regrets. It&amp;#39;s not that I was bad at the work - I&amp;#39;m good at coming up with technical solutions - but my attitude was poor, I had bad timekeeping, my personality left something to be desired and I generally preferred to be left alone to do my work instead of being &amp;quot;bothered&amp;quot; by colleagues. All toxic components, especially if you work, as I did, in a dynamic envronment such as a website design agency, where communication and teamwork really is key.&lt;/p&gt;

&lt;p&gt;The thing is, quite a few programmers including myself tend to be introverted (especially in their late teens and early twenties) and even if they do have &amp;#39;people skills&amp;#39; they generally prefer not to use them because they prefer to be left alone. It&amp;#39;s a comfort-zone thing, or at least in my case it was. Unfortunately you can&amp;#39;t really get away with this in a workplace and while you may not see it as a problem, sometimes this behaviour comes across as arrogance, aloofness or, worse, rudeness towards work colleagues.&lt;/p&gt;

&lt;p&gt;The only clue to these issues might be the moment you are pulled into a disciplinary meeting or, worse, actually get fired, and by then the damage tends to have been done.&lt;/p&gt;

&lt;p&gt;Sadly, I have experience of both scenarios and absolutely regret not working better with a number of colleagues who I might actually have learned a lot from had I noticed the opportunities they presented me at the time, instead of me falsely assuming that I knew it all (ah, the curse of a young developer :) ) and being completely dismissive of them.&lt;/p&gt;

&lt;h2&gt;How to be a good programmer&lt;/h2&gt;

&lt;p&gt;Fortunately as time has gone on, my confidence, outlook and attitude have improved immeasurably. I&amp;#39;m much more personable, have a positive attitude towards work, colleagues and clients and this has reflected itself in both the quality of my work output and the clients I am fortunate enough to work with.&lt;/p&gt;

&lt;p&gt;These days, I want to shake programmers I see who have so much potential given their technical brilliance, but who are trudging along the same self-destructive path I once took by coming across as aloof or arrogant and putting themselves on their own meaningless elitist pedestal.&lt;/p&gt;

&lt;p&gt;It&amp;#39;s a crying shame that sometimes people don&amp;#39;t see what they&amp;#39;re doing until damage is done and they have blighted their career, because it&amp;#39;s extremely difficult to put it right. There are only so many burnt bridges that you can rebuild.&lt;/p&gt;

&lt;p&gt;So, I think that the most important qualities a programmer can have, with much more importance being placed on this than raw technical ability, is being personable, friendly and open to learning.&lt;/p&gt;

&lt;p&gt;These simple qualities open up many avenues with clients and colleagues which, in turn, open up further potential work opportunities - and since most programmers are tech-savvy to start with, career success then becomes almost a given.&lt;/p&gt;

&lt;p&gt;At the very least you&amp;#39;ll be someone who people actually want to work with - and that&amp;#39;s never a bad thing.&lt;/p&gt;
</description></item><item><title>Let&#39;s Build - ASP.NET MVC 5 TodoList with Entity Framework and Identity</title><link>http://www.swoo.co.uk/blog/40043/let's-build---aspnet-mvc-5-todolist-with-entity-framework-and-identity</link><guid>http://www.swoo.co.uk/blog/40043/let's-build---aspnet-mvc-5-todolist-with-entity-framework-and-identity</guid><pubDate>Fri, 27 Nov 2015 03:12:36 GMT</pubDate><description>&lt;p&gt;In this C# tutorial series I show you how to create a simple multi-user ASP.NET 5 todo list application using .NET MVC 5, Entity Framework, Migrations, SQL Server and Identity.&lt;/p&gt;

&lt;h2&gt;Part 1 - Hooking up the database, working with Identity and scaffolding in Entity Framework&lt;/h2&gt;

&lt;p&gt;&lt;iframe allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;500&quot; src=&quot;https://www.youtube.com/embed/_7u9dOyK92o?rel=0&quot; width=&quot;100%&quot;&gt;&lt;/iframe&gt;&lt;/p&gt;

&lt;h2&gt;Part 2 - Adding the todolist tables and hooking them up to the currently logged in user&lt;/h2&gt;

&lt;p&gt;&lt;iframe allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;500&quot; src=&quot;https://www.youtube.com/embed/bp5K8t71jE8?rel=0&quot; width=&quot;100%&quot;&gt;&lt;/iframe&gt;&lt;/p&gt;

&lt;h2&gt;Part 3 - Lazy Loading the data from child tables and implementing a data repository&lt;/h2&gt;

&lt;p&gt;Coming soon&lt;/p&gt;

&lt;h2&gt;Part 4 - Adding a UI for data entry&lt;/h2&gt;

&lt;p&gt;Coming soon&lt;/p&gt;

&lt;h2&gt;Part 5 - Adding notifications when a task is due&lt;/h2&gt;

&lt;p&gt;Coming soon&lt;/p&gt;
</description></item><item><title>How to force lowercase URLs in ASP.NET 5</title><link>http://www.swoo.co.uk/blog/40041/how-to-force-lowercase-urls-in-aspnet-5</link><guid>http://www.swoo.co.uk/blog/40041/how-to-force-lowercase-urls-in-aspnet-5</guid><pubDate>Wed, 18 Nov 2015 02:23:39 GMT</pubDate><description>&lt;p&gt;One of the most annoying things about ASP.NET development is that the Routing components default to being in CamelCase so you end up with URLs like /About/Index instead of /about/index.&lt;/p&gt;

&lt;p&gt;In terms of SEO, a URL is classed as distinct based on its case, so the first and second URL are treated as two pages even though they share the same content - this can have a detrimental effect on your page ranking in Google because it classes one of the URLs as duplicate content.&lt;/p&gt;

&lt;p&gt;Besides, it&amp;#39;s always nice to have consistency in a web app and since the rest of the world seems to default to lowercase (and it looks better) t&amp;#39;s a good idea to make it the default setting for your application.&lt;/p&gt;

&lt;p&gt;You can of course use redirects in IIS to automatically do this, but that usually involves a 301 redirect which can be fairly expensive if you have a high-traffic website.&lt;/p&gt;

&lt;p&gt;Here&amp;#39;s a simple solution that works for all generated URLs in ASP.NET Routing, for instance those generated using Tag Helpers, i.e.:&lt;/p&gt;

&lt;pre&gt;
@Html.ActionLink(&amp;quot;&lt;strong&gt;H&lt;/strong&gt;ome&amp;quot;, &amp;quot;&lt;strong&gt;I&lt;/strong&gt;ndex&amp;quot;, &amp;quot;Click Me&amp;quot;)&lt;/pre&gt;

&lt;p&gt;will output:&lt;/p&gt;

&lt;pre&gt;
&amp;lt;a href=&amp;quot;/home/index&amp;quot;&amp;gt;Click Me&amp;lt;/a&amp;gt;&lt;/pre&gt;

&lt;h2&gt;For ASP.NET 5&lt;/h2&gt;

&lt;h3&gt;Add the following to startup.cs in the ConfigureServices() method:&lt;/h3&gt;

&lt;pre&gt;
    services.ConfigureRouting(routeOptions =&amp;gt;
    {
        routeOptions.LowercaseUrls = true;
    });
&lt;/pre&gt;

&lt;h2&gt;For ASP.NET 4&lt;/h2&gt;

&lt;h3&gt;Add the following to your RegisterRoutes() method in your RouteConfig Class&lt;/h3&gt;

&lt;pre&gt;
routes.LowercaseUrls = true;
&lt;/pre&gt;

&lt;p&gt;I hope you find this useful!&lt;/p&gt;
</description></item><item><title>How to use Class Interfaces in C#</title><link>http://www.swoo.co.uk/blog/40039/how-to-use-class-interfaces-in-c-sharp</link><guid>http://www.swoo.co.uk/blog/40039/how-to-use-class-interfaces-in-c-sharp</guid><pubDate>Mon, 09 Nov 2015 23:01:04 GMT</pubDate><description>&lt;p&gt;In this video we build a simulated bank machine in a Console Application to learn the basics of Interfaces and Class Inheritance with C#.&lt;/p&gt;

&lt;p&gt;The demo illustrates how different products could be offered to bank customer types, without compromising the core business logic of the application which is to allow the user to maintain their bank account from a cash machine.&lt;/p&gt;

&lt;p&gt;&lt;iframe allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;400&quot; src=&quot;https://www.youtube.com/embed/WD8czND_WRw?rel=0&quot; width=&quot;100%&quot;&gt;&lt;/iframe&gt;&lt;/p&gt;

&lt;h2&gt;Source Code&lt;/h2&gt;

&lt;p&gt;&lt;a href=&quot;http://github.com/woodss/IBankAccount&quot;&gt;View on Github&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>UK Drone Register</title><link>http://www.swoo.co.uk/blog/40033/uk-drone-register</link><guid>http://www.swoo.co.uk/blog/40033/uk-drone-register</guid><pubDate>Tue, 27 Oct 2015 15:10:30 GMT</pubDate><description>&lt;h2&gt;The Brief&lt;/h2&gt;

&lt;p&gt;The drone industry has taken off in a big way (no pun intended, honestly!) with a massive influx of both commercial and recreational aircraft taking to the skies.&lt;/p&gt;

&lt;p&gt;I have a personal interest in the hobby of &amp;quot;FPV Flying&amp;quot; which is essentially fitting a camera to these aircraft (whether it be a plane or a multicopter) and transmitting the video feed via a live downlink to some goggles that I wear, allowing me to pilot my aircraft as if I were sitting inside it.&amp;nbsp;&lt;/p&gt;

&lt;p&gt;One of the major problems with the hobby is that there is a LOT of money in the air at any one time - sometimes upwards of &amp;pound;1,000 and as with anything, sometimes &amp;quot;stuff&amp;quot; happens and the aircraft crashes at an unknown location. That&amp;#39;s a big problem because not only have you just lost a lot of expensive equipment, there&amp;#39;s no way for anyone to get it back to you if they come across it.&lt;/p&gt;

&lt;h2&gt;The Solution&lt;/h2&gt;

&lt;p&gt;The UK Drone Register allows you as a pilot to register your aircraft, each being given a unique GUID as a reference number, and the resulting code can be printed out on stickers that are then placed on each aircraft. The code can then be entered into the website if someone finds the aircraft. The stickers also contain a QR code that, when scanned, will bring the finder to the same page.&lt;/p&gt;

&lt;p&gt;Once scanned or a code entered, the finder can elect to notify the registered pilot of the whereabouts of their equipment. This can either be done in free text &amp;quot;i.e its at my house in 999 Letsbe Avenue&amp;quot; or using the location services built into a mobile device.&amp;nbsp;&lt;/p&gt;

&lt;p&gt;Once the finder send the notification, the pilot receives an SMS message and an e-mail, telling them where to find their aircraft. If GPS coordinates are supplied, a device such as a TomTom Navigator can be used to &amp;quot;home in&amp;quot; on the downed aircraft.&lt;/p&gt;

&lt;p&gt;The website also displays safety notices at each stage of the notification process, warning the finder that the motors (and propellers) may start without warning and to prevent any injury to children who may be nearby.&lt;/p&gt;

&lt;p&gt;&lt;a class=&quot;cta&quot; href=&quot;http://www.ukdroneregister.co.uk&quot;&gt;Visit UK Drone Register&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>Solved - jQuery Mobile Click Event Not Firing After AJAX Page Request Completes</title><link>http://www.swoo.co.uk/blog/40031/solved---jquery-mobile-click-event-not-firing-after-ajax-page-request-completes</link><guid>http://www.swoo.co.uk/blog/40031/solved---jquery-mobile-click-event-not-firing-after-ajax-page-request-completes</guid><pubDate>Fri, 04 Sep 2015 21:37:55 GMT</pubDate><description>&lt;p&gt;Today I had a weird problem that, like most software issues, made complete sense once I&amp;#39;d figured it out, but almost cost me my remaining hair while I was trying to get to the bottom of it.&lt;/p&gt;

&lt;p&gt;Basically I have an application which has a button that causes a menu to slide out from the right hand side of the page, a mobile menu, as featured on many websites.&lt;/p&gt;

&lt;p&gt;In this particular case though, the pages are handled by the jQuery Mobile framework - this is a set of Javascript libraries that give you some cool effects like touch buttons, dropdown menus and page transitions - all of which are nice to have on a mobile device because they improve the &amp;quot;feel&amp;quot; of the app.&lt;/p&gt;

&lt;p&gt;The page transitions are handled via an Ajax call which displays a loading icon, then a cool &amp;quot;slide&amp;quot; effect to the new page when a link is clicked - all good.&lt;/p&gt;

&lt;p&gt;Originally I was attaching an event to my &amp;quot;menu toggle&amp;quot; button using code like this:&lt;/p&gt;

&lt;pre&gt;
$(document).ready(function() {
&amp;nbsp;   $(&amp;#39;.toggler&amp;#39;).click(function() { // slide out the menu });
});&lt;/pre&gt;

&lt;p&gt;Pretty standard really and it worked well - until I clicked a link and went to a new page. The click event did not get re-attached to the button so obviously it did nothing - not good!&lt;/p&gt;

&lt;p&gt;The reason for this is because during the page refresh, the button was reinitialised - but because the page did not specifically reload, the $.ready() event didn&amp;#39;t get fired, which meant my button didn&amp;#39;t get an event reattached to it.&lt;/p&gt;

&lt;p&gt;The workaround was to BIND the event to any object under a parent (in this case the document) so that whenever the parent object was refreshed, the event would remain bound.. and it&amp;#39;s as simple as this:&lt;/p&gt;

&lt;pre&gt;
$(document).on(&amp;#39;click&amp;#39;,&amp;#39;.toggler&amp;#39;, function() { 
&amp;nbsp;    // Slide the menu
});
&lt;/pre&gt;

&lt;p&gt;Happy days! I hope this helps and saves you some time :)&lt;/p&gt;
</description></item><item><title>Windows 10 Wireless Issues - No Connections Available [SOLVED]</title><link>http://www.swoo.co.uk/blog/30031/windows-10-wireless-issues---no-connections-available-[solved]</link><guid>http://www.swoo.co.uk/blog/30031/windows-10-wireless-issues---no-connections-available-[solved]</guid><pubDate>Fri, 31 Jul 2015 00:14:14 GMT</pubDate><description>&lt;p&gt;Today I installed Windows 10 via Windows Update over the top of my Windows 8.1 setup - well, three times actually, because twice I had to roll back as I couldn&amp;#39;t get my wireless network adapter to work. Device Manager said that all was well, but it simply could not find any network connections. Additionally, I wouldn&amp;#39;t use the F12 key on my laptop to turn on Flight Mode - it acted like it was stuck and had no effect (I&amp;#39;m on a HP Envy by the way) which signified to me that all was NOT in fact well, and something was definitely up.&lt;/p&gt;

&lt;p&gt;More importantly, I could not even install any drivers because each time I tried to use the Windows 8 drivers in compatibility mode, I kept getting a &amp;quot;semaphore timeout&amp;quot; error - whatever that is.&lt;/p&gt;

&lt;p&gt;So yea, I was stuck ... and with no wireless connection I had no Internet, so no chance of figuring this out in the browser.&lt;/p&gt;

&lt;h2&gt;Event Log to the rescue&lt;/h2&gt;

&lt;p&gt;The only tool I had at my disposal was the Event Viewer application which was showing some errors attempting to bind the IPV4 stack to the network interface, so I fired up my phone and started trawling the internet for any network interface related issues with Windows 10 of which there were none of any real relevance.&lt;/p&gt;

&lt;p&gt;However I thought to myself what else could be preventing anything from binding - that suggested something else was trying to use the interface and I remembered that I had the Cisco VPN client installed, which does some really funky stuff to the network stack on Windows at times. I decided to check if it was running and for some reason, the service had failed to start... hmm, something definitely in this.&lt;/p&gt;

&lt;p&gt;I have no need for the Cisco VPN client at present, so decided to uninstall it - but when I tried, Windows claimed the OS was corrupt (WTF?) and wouldn&amp;#39;t let me do it. So I decided to roll back to Windows 8.1 and uninstall it from there instead.&lt;/p&gt;

&lt;p&gt;Once I&amp;#39;d uninstalled the VPN client (and associated services), I reinstalled Windows 10 and the wireless adapter worked straight away, no issues whatsoever.&lt;/p&gt;

&lt;p&gt;So - if you have the Cisco VPN client installed on your Windows 8.1 machine, uninstall it before you upgrade to Windows 10.&amp;nbsp;&lt;/p&gt;

&lt;p&gt;I hope this helps!&lt;/p&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;
</description></item><item><title>SureCalf Vaccination Planner</title><link>http://www.swoo.co.uk/blog/10030/surecalf-vaccination-planner</link><guid>http://www.swoo.co.uk/blog/10030/surecalf-vaccination-planner</guid><pubDate>Thu, 09 Jul 2015 20:24:04 GMT</pubDate><description>&lt;h2&gt;The Brief&lt;/h2&gt;

&lt;p&gt;SureCalf is a vaccination programme that is used to certify whether or not cattle are correctly imunised against respiratory diseases before they are traded at market. The Vaccination Planner was designed to visually illustrate the timeframes for correct immunisation based on a number of parameters such as the date of sale, whether or not the cattle were to be housed over winter and the vaccination programme they are on.&lt;/p&gt;

&lt;h3&gt;The Solution&lt;/h3&gt;

&lt;p&gt;Working closely with the design team at Bright White Space and MASS UK, I produced this tool in ASP.NET MVC and jQuery that takes the inputted form data and outputs a nice visual chart depicting the valid ranges for vaccinations. The data is submitted into the form via an AJAX POST request and is run through the business logic that runs the main website (which I also produced) to generate the correct date ranges. These are then used to dynamically generate the resulting HTML and CSS which is then plotted onto the chart.&lt;/p&gt;

&lt;h3&gt;Special Development Considerations and Challenges&lt;/h3&gt;

&lt;p&gt;Because the chart is generated dynamically the CSS generated had to be consistent across months which, of course, have a different number of days in them. To correctly &amp;quot;fit&amp;quot; into the visual design, each day worked out to be approximately 7 pixels in width on the chart and thus, depending on the months that were shown, the columns had to be shortened or widened to correctly show the positions of the date plots. Example: February which has 28 (or sometimes 29) days, and December which has 31 days. The resulting column widths were 7px*28 days = 196px and 7px * 31 days = 217px accordingly. This was important because otherwise the display of the dates would not be in the correct position and the chart would be less useful to the customer.&lt;/p&gt;

&lt;p&gt;&lt;a class=&quot;cta&quot; href=&quot;http://www.surecalf.co.uk/planner&quot;&gt;Visit the SureCalf Planner&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>AtmosCam Aerial Imaging Systems Ltd</title><link>http://www.swoo.co.uk/blog/10031/atmoscam-aerial-imaging-systems-ltd</link><guid>http://www.swoo.co.uk/blog/10031/atmoscam-aerial-imaging-systems-ltd</guid><pubDate>Wed, 08 Jul 2015 23:24:00 GMT</pubDate><description>&lt;h3&gt;The Brief&lt;/h3&gt;

&lt;p&gt;I was approached by AtmosCam AIS Ltd in early 2014 with a brief to create an industry leading website to showcase the new company&amp;#39;s foray into the burgeoning UAV inspection and surveying industry.&lt;/p&gt;

&lt;h3&gt;The Solution&lt;/h3&gt;

&lt;p&gt;I worked with AtmosCam to produce a high-impact, modern looking website to promote their aerial services business.&lt;/p&gt;

&lt;p&gt;Built using ASP.NET MVC running on a Windows Server, this solution is fast-loading and fully content-managed allowing staff to update text and media whenever they need, to keep the website up to date.&lt;/p&gt;

&lt;h3&gt;CAA UAV Pilot Register&lt;/h3&gt;

&lt;p&gt;The solution also includes a custom registration setup to allow prospective pilots to sign up for work and be alerted when contracts become available.&lt;/p&gt;

&lt;p&gt;&lt;a class=&quot;cta&quot; href=&quot;http://www.atmoscam.com&quot; target=&quot;_blank&quot;&gt;Visit AtmosCam&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>HeatingSpareParts.com</title><link>http://www.swoo.co.uk/blog/10033/heatingsparepartscom</link><guid>http://www.swoo.co.uk/blog/10033/heatingsparepartscom</guid><pubDate>Wed, 08 Jul 2015 23:24:00 GMT</pubDate><description>&lt;h3&gt;The Brief&lt;/h3&gt;

&lt;p&gt;I was approached by Heat Group who needed a helping hand after being let down by their previous website agency.&lt;/p&gt;

&lt;p&gt;While they already had an existing website, it was outdated and the culmination of many different developers&amp;#39; efforts, none of which worked particularly well or reliably.&lt;/p&gt;

&lt;p&gt;I was tasked with initially fixing the issues that were happening on a daily basis to stablise the website, then plan an entirely new build to push the business forward.&lt;/p&gt;

&lt;h3&gt;The Solution&lt;/h3&gt;

&lt;p&gt;Using the .NET stack and built in ASP.NET MVC, the resulting system allows customers to search over 300,000 unique heating spare parts and order them online. Payments are taken via PayPal Express Checkout, and orders are managed in a custom backend system that also allows the entire catalogue to be kept up to date.&lt;/p&gt;

&lt;p&gt;The system also allows the Heat Group staff to create unlimited extra pages via a content management system, to promote special offers and write articles.&lt;/p&gt;

&lt;p&gt;One unique feature of the website is a secure online registration system that allows gas engineers to log on and view technical boiler diagrams and order relevant parts directly from the website - this too is completely content managed, providing a truly unique offering to the industry.&lt;/p&gt;

&lt;p&gt;Fully responsive, the website currently takes around 20% of its sales from mobile devices, with the expectation that this will increase year on year.&lt;/p&gt;

&lt;h3&gt;Future Progress&lt;/h3&gt;

&lt;p&gt;I&amp;#39;m currently building a suite of applications to complement the website such as Gas Certificate generation, and Boiler Diagram subscription payments to further strengthen the position of HSP as a major player in the heating industry.&lt;/p&gt;

&lt;p&gt;&lt;a class=&quot;cta&quot; href=&quot;http://www.heatingspareparts.com&quot; target=&quot;_blank&quot;&gt;Visit HeatGroup Ltd&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>Eastman Building Ltd</title><link>http://www.swoo.co.uk/blog/10034/eastman-building-ltd</link><guid>http://www.swoo.co.uk/blog/10034/eastman-building-ltd</guid><pubDate>Wed, 08 Jul 2015 23:24:00 GMT</pubDate><description>&lt;h3&gt;The Brief&lt;/h3&gt;

&lt;p&gt;The old Eastman Building website was looking a bit tired, was difficult to update and didn&amp;#39;t showcase their work effectively.&lt;/p&gt;

&lt;p&gt;I was hired to produce an effective design and build a website which loaded quickly but allowed the owners to quickly update content and showcase their work using high quality imagery.&lt;/p&gt;

&lt;h3&gt;The Solution&lt;/h3&gt;

&lt;p&gt;I produced a custom website design using the company branding and colours and built the templates using standard HTML.&lt;/p&gt;

&lt;p&gt;To allow the client to update the content quickly and easily, I integrated the entire site with a third party content management system called CushyCMS - this service communicates directly with the server, allowing the client to make &amp;quot;real time&amp;quot; updates that are then uploaded automatically, with zero programming knowledge required.&lt;/p&gt;

&lt;p&gt;The solution allows the design to remain untouched, while giving the client full control over the content and imagery on the site.&lt;/p&gt;

&lt;h3&gt;Taking it Mobile&lt;/h3&gt;

&lt;p&gt;In 2014, I was approached to make the website work on mobile phones after the smartphone and tablets became ubiquitous tools in the armory of your typical web surfer. Because I use web standards compliant code to build all of my websites, the transition from &amp;quot;desktop only&amp;quot; to &amp;quot;device agnostic&amp;quot; was produced in a matter of days, maintaining the seamless content management and control the client was used to, while allowing the website to automatically adjust itself to suit the device being used to view it.&lt;/p&gt;

&lt;p&gt;&lt;a class=&quot;cta&quot; href=&quot;http://www.eastmanbuilding.co.uk&quot; target=&quot;_blank&quot;&gt;Visit Eastman Building Ltd&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>RBV Energy Plc</title><link>http://www.swoo.co.uk/blog/10035/rbv-energy-plc</link><guid>http://www.swoo.co.uk/blog/10035/rbv-energy-plc</guid><pubDate>Wed, 08 Jul 2015 23:24:00 GMT</pubDate><description>&lt;h3&gt;The Brief&lt;/h3&gt;

&lt;p&gt;I was approached by a design agency to produce a fully bespoke development for a north-east based energy company, showcasing their products and services in many different languages.&lt;/p&gt;

&lt;h3&gt;The Solution&lt;/h3&gt;

&lt;p&gt;I worked closely with the agency to produce this well-received website that not only looks great thanks to their impressive design concepts, but is currently available in 4 different languages.&lt;/p&gt;

&lt;p&gt;Built using ASP.NET MVC running on a Windows Server, this solution allows the client to continually update the website in an unlimited number of languages as and when it is required - they simply add a new language to the index, then enter content for each section.&lt;/p&gt;

&lt;p&gt;&lt;a class=&quot;cta&quot; href=&quot;http://www.rbvenergy.com&quot; target=&quot;_blank&quot;&gt;Visit RBV Energy&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>Cathedral Training Ltd</title><link>http://www.swoo.co.uk/blog/10036/cathedral-training-ltd</link><guid>http://www.swoo.co.uk/blog/10036/cathedral-training-ltd</guid><pubDate>Wed, 08 Jul 2015 23:24:00 GMT</pubDate><description>&lt;h3&gt;The Brief&lt;/h3&gt;

&lt;p&gt;I was approached by Cathedral Training to produce a lightweight content managed website for their startup training business.&lt;/p&gt;

&lt;p&gt;The main purpose of the website was to display curriculum information for all of their online courses in an attractive manner.&lt;/p&gt;

&lt;h3&gt;The Solution&lt;/h3&gt;

&lt;p&gt;I was proud to support the launch of Cathedral Training Ltd in 2013 by providing them with a beautiful new website from which to offer their online training materials.&lt;/p&gt;

&lt;p&gt;A fully bespoke design, the website is built using ASP.NET MVC and is fully content managed, allowing staff to update documents and training materials using a secure backend management system.&lt;/p&gt;

&lt;p&gt;The website has been a huge success in its first year, helping the company go from strength to strength and I look forward to working with Cathedral Training as they grow into North Lincolnshire&amp;#39;s premier training provider.&lt;/p&gt;

&lt;p&gt;&lt;a class=&quot;cta&quot; href=&quot;http://www.cathedraltraining.co.uk&quot; target=&quot;_blank&quot;&gt;Visit CallTrader Ltd&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>CallTrader Ltd</title><link>http://www.swoo.co.uk/blog/10037/calltrader-ltd</link><guid>http://www.swoo.co.uk/blog/10037/calltrader-ltd</guid><pubDate>Wed, 08 Jul 2015 23:24:00 GMT</pubDate><description>&lt;h3&gt;The Brief&lt;/h3&gt;

&lt;p&gt;CallTrader approached me with a requirement for a simple &amp;quot;brochure&amp;quot; style website in order to promote their business to business service offerings.&lt;/p&gt;

&lt;p&gt;There was a fixed timescale of 4 days from concept to completion.&lt;/p&gt;

&lt;h3&gt;The Solution&lt;/h3&gt;

&lt;p&gt;I designed and developed this simple brochure website to showcase the product and service offerings of CallTrader Ltd, a sales lead profiling company.&lt;/p&gt;

&lt;p&gt;Built using &amp;quot;Classic&amp;quot; ASP, the site has a client login facility to allow CallTrader customers to sign up to different package offerings from a database of targeted sales leads, which are generated by an automated lead delivery system.&lt;/p&gt;

&lt;p&gt;&lt;a class=&quot;cta&quot; href=&quot;http://www.calltrader.co.uk&quot; target=&quot;_blank&quot;&gt;Visit CallTrader&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>True Beauty Inside Ltd</title><link>http://www.swoo.co.uk/blog/10038/true-beauty-inside-ltd</link><guid>http://www.swoo.co.uk/blog/10038/true-beauty-inside-ltd</guid><pubDate>Wed, 08 Jul 2015 23:24:00 GMT</pubDate><description>&lt;h3&gt;The Brief&lt;/h3&gt;

&lt;p&gt;I was approached by a new startup company who wanted to sell herbal remedies online via PayPal and so required an e-commerce system. They did not wish to use an off-the-shelf solution and so opted for a completely bespoke offering.&lt;/p&gt;

&lt;h3&gt;The Solution&lt;/h3&gt;

&lt;p&gt;I produced a stunning e-commerce portal for (Tru.B) True Beauty Inside, a trading name of Healthy Therapies Ltd to showcase a brand new range of healing products.&lt;/p&gt;

&lt;p&gt;A fully bespoke design, the website was built using ASP.NET MVC and fully content managed, allowing staff to update pages and content using a secure backend management system.&lt;/p&gt;

&lt;p&gt;Products were managable too, and purchased were made online using PayPal Express Checkout.&lt;/p&gt;

&lt;p&gt;&lt;a class=&quot;cta&quot; href=&quot;http://www.truebeautyinside.co.uk&quot;&gt;Visit True Beauty Inside&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>IISQuickToggle</title><link>http://www.swoo.co.uk/blog/10040/iisquicktoggle</link><guid>http://www.swoo.co.uk/blog/10040/iisquicktoggle</guid><pubDate>Wed, 08 Jul 2015 23:24:00 GMT</pubDate><description>&lt;h2&gt;Windows Desktop Application&lt;/h2&gt;

&lt;p&gt;IISQuickToggle is a simple Windows Forms application that I built in Visual C# that allows you to quickly toggle any of the IIS services on a machine such as Web, SMTP, FTP and IIS Admin without needing to type on a command line.&lt;/p&gt;

&lt;p&gt;Essentially it was simply a technical exercise of using the Windows APIs to detect avauilable services, the state of those services and to interact with them quickly.&lt;/p&gt;

&lt;p&gt;A log window was added later so that the current status of the services in question could be viewed.&lt;/p&gt;
</description></item><item><title>MilesPerGallon</title><link>http://www.swoo.co.uk/blog/10041/milespergallon</link><guid>http://www.swoo.co.uk/blog/10041/milespergallon</guid><pubDate>Wed, 08 Jul 2015 23:24:00 GMT</pubDate><description>&lt;h2&gt;A Windows Phone Application&lt;/h2&gt;

&lt;p&gt;MilesPerGallon is a very simple mobile application that I built for the Windows Phone platform that simply allows you to maintain a list of cars in your household, and enter fill-up information whenever you put petrol in.&amp;nbsp;&lt;/p&gt;

&lt;p&gt;Using this data, the application shows you your average miles per gallon since the last fill-up, and since you started keeping records, for each car.&lt;/p&gt;

&lt;p&gt;The application was more of a technical exercise than anything really useful, but taught me the basics of XAML, Windows Mobile File I/O, Mobile Application LifeCycle and also deployment to both devices and the Windows Store.&lt;/p&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;
</description></item><item><title>C# Class for Generating QR Codes using the Google Charts API</title><link>http://www.swoo.co.uk/blog/10029/c-sharp-class-for-generating-qr-codes-using-the-google-charts-api</link><guid>http://www.swoo.co.uk/blog/10029/c-sharp-class-for-generating-qr-codes-using-the-google-charts-api</guid><pubDate>Wed, 08 Jul 2015 14:41:07 GMT</pubDate><description>&lt;p&gt;QR codes are those nifty little barcode-type things you sometimes find on packaging which, when scanned with a smartphone, can perform an action such as taking you to a URL to view more detailed information.&lt;/p&gt;

&lt;p&gt;Google provide a nice little API to make producing QR codes super simple. I&amp;#39;ve made it even simpler for C# programmers by wrapping the API in a C# Class which will allow you to specify any or all of their required and optional parameters, or simply the data you&amp;#39;d like to encode with default values for everything else.&lt;/p&gt;

&lt;p&gt;No third party controls are required, although you&amp;#39;ll obviously need Internet access so that the API can be called - I say API, it&amp;#39;s simply a HTTP/GET request but you get the idea.&lt;/p&gt;

&lt;h2&gt;Live Coding Example&lt;/h2&gt;

&lt;p&gt;&lt;iframe allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;450&quot; src=&quot;https://www.youtube.com/embed/giIKZN0y-hU?list=PLtIyVX4yRGIxNWWXGBymw95T1dYFLrGr2&quot; width=&quot;100%&quot;&gt;&lt;/iframe&gt;&lt;/p&gt;

&lt;h2&gt;Basic Usage&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;string qrcode = new QRCodeHelper.GenerateUrl(DATA);&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;Output&lt;/h2&gt;

&lt;p&gt;A string URL which can be used as an img src tag in a HTML Page, or an object property in a WinForms application (such as PictureBox.ImageLocation).&lt;/p&gt;

&lt;h2&gt;Source Code&lt;/h2&gt;
&lt;script src=&quot;https://gist.github.com/woodss/53c6dceab102188893e0.js&quot;&gt;&lt;/script&gt;</description></item><item><title>Prevent Superscripts and Subscripts from Affecting Line-Height</title><link>http://www.swoo.co.uk/blog/10028/prevent-superscripts-and-subscripts-from-affecting-line-height</link><guid>http://www.swoo.co.uk/blog/10028/prevent-superscripts-and-subscripts-from-affecting-line-height</guid><pubDate>Mon, 29 Jun 2015 13:48:18 GMT</pubDate><description>&lt;p&gt;Sometimes it&amp;#39;s problematic to use a &lt;sup&gt; tag in your code because it puts a gap between two lines in a paragraph making it look incorrect - here&amp;#39;s how to solve it.&lt;/sup&gt;&lt;/p&gt;

&lt;h2&gt;Add this to your CSS file:&lt;/h2&gt;

&lt;pre&gt;
sup, sub {
   vertical-align: baseline;
   position: relative;
   top: -0.4em;
}
sub { top: 0.4em; }
&lt;/pre&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;
</description></item><item><title>What A Website Developer Does All Day</title><link>http://www.swoo.co.uk/blog/10027/what-a-website-developer-does-all-day</link><guid>http://www.swoo.co.uk/blog/10027/what-a-website-developer-does-all-day</guid><pubDate>Mon, 29 Jun 2015 11:05:55 GMT</pubDate><description>&lt;p&gt;Sometimes a picture says more than words ever could, so if ever you wanted to understand what it is your website developer is doing with their time (and can&amp;#39;t be bothered with the geeky stuff), this one should help:&lt;/p&gt;

&lt;p&gt;&lt;img alt=&quot;&quot; src=&quot;http://i.imgur.com/DkioMUo.gif&quot; style=&quot;width: 100%;&quot; /&gt;&lt;/p&gt;
</description></item><item><title>How to use Constructors and Deconstructors in C# Classes</title><link>http://www.swoo.co.uk/blog/10025/how-to-use-constructors-and-deconstructors-in-c-sharp-classes</link><guid>http://www.swoo.co.uk/blog/10025/how-to-use-constructors-and-deconstructors-in-c-sharp-classes</guid><pubDate>Mon, 22 Jun 2015 15:54:32 GMT</pubDate><description>&lt;p&gt;&lt;span style=&quot;line-height: 1.6em;&quot;&gt;In this simple tutorial I show you how to use Constructors properly when instantiating objects, including times when you have multiple properties against an object and need to be able to override them.&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;You&amp;#39;ll also learn how to run code when killing an object by using a Destructor method.&lt;/p&gt;
&lt;h2&gt;Live Code Example&lt;/h2&gt;
&lt;p&gt;&lt;iframe allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;500&quot; src=&quot;https://www.youtube.com/embed/W7hl8V9PVxI?list=PLtIyVX4yRGIxNWWXGBymw95T1dYFLrGr2&quot; width=&quot;100%&quot;&gt;&lt;/iframe&gt;&lt;/p&gt;
&lt;h2&gt;Source Code&lt;/h2&gt;
&lt;script src=&quot;https://gist.github.com/woodss/579b3a6d8fa01974a136.js&quot;&gt;&lt;/script&gt;</description></item><item><title>Unable to add &#39;Global.asax&#39; to the Web site. An unknown WinINet error has occurred (code 12113).</title><link>http://www.swoo.co.uk/blog/29/unable-to-add-'globalasax'-to-the-web-site-an-unknown-wininet-error-has-occurred-code-12113</link><guid>http://www.swoo.co.uk/blog/29/unable-to-add-'globalasax'-to-the-web-site-an-unknown-wininet-error-has-occurred-code-12113</guid><pubDate>Tue, 09 Jun 2015 07:43:49 GMT</pubDate><description>&lt;p&gt;&lt;iframe allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;450&quot; src=&quot;https://www.youtube.com/embed/k4yrTu5dCoA&quot; width=&quot;100%&quot;&gt;&lt;/iframe&gt;&lt;/p&gt;

&lt;p&gt;When publishing - especially via FTP (people still use that?) - using Visual Studio, you may come across the error:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Connecting to ftp://xxx.xxx.xxx.xxx Unable to add &amp;#39;Global.asax&amp;#39; to the Web site. An unknown WinINet error has occurred (code 12113).&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;To solve it, you must simply add Visual Studio to your firewall exclusion list - the error is a result of the firewall blocking Visual Studio from accessing your FTP server.&lt;/p&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;
</description></item><item><title>FPVTV.co.uk</title><link>http://www.swoo.co.uk/blog/24/fpvtvcouk</link><guid>http://www.swoo.co.uk/blog/24/fpvtvcouk</guid><pubDate>Mon, 23 Feb 2015 13:41:47 GMT</pubDate><description>&lt;p&gt;FPVTV is a really simple web application I built to scratch my own itch - some of you who follow me on twitter may also know that I am an avid FPV pilot, currently studying towards achieving a BNUC-S qualification to operate small UAV aircraft commercially for my other aerial imaging and surveying company, &lt;a href=&quot;http://www.atmoscam.com&quot;&gt;AtmosCam&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;AtmosCam was born out of my hobby, radio control flying. However, it is not traditional radio control flying, it is piloting the miniature aircraft from a first person &amp;quot;cockpit&amp;quot; view, using a live video stream from the plane to a ground station.&lt;/p&gt;

&lt;p&gt;There are hundreds of videos on this subject on YouTube and I wanted a place where I could simply search for a specific niche in the hobby without having to trawl through hundreds of videos each time.&lt;/p&gt;

&lt;h3&gt;The Solution&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Enter the YouTube Data API V3&lt;/strong&gt; - using a very simple search engine I built in C# .NET, I was able to filter the results (and get around the max of 50 results from the API ;) ) based on what I wanted to find. I then created a simple front-end using my own responsive framework (no, not Bootstrap!) to allow easy searching and viewing of videos. The videos are viewed using a nice Lightbox style popup which &amp;quot;dims&amp;quot; the lights when watching a video, and allows the user to click next, previous etc without going back to the results.&lt;/p&gt;

&lt;p&gt;I then chucked in a couple of Google Adsense links to earn 3 pence per month and bobs your Uncle .. a simple YouTube niche search in a nifty viewing application.&lt;/p&gt;

&lt;h3&gt;Cross Device Compatibility&lt;/h3&gt;

&lt;p&gt;The website is fully responsive, working well on standard desktops, smartphones and even the XBOX - I use it to sit on the sofa and watch the videos in HD on a big screen in my living room (and no nasty typing via the XBOX controller to find what I want to watch!)&lt;/p&gt;

&lt;p&gt;&lt;a class=&quot;cta&quot; href=&quot;http://www.fpvtv.co.uk&quot;&gt;Visit FPVTV.co.uk&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>How to validate an e-mail address using C# and the MailObject Class</title><link>http://www.swoo.co.uk/blog/23/how-to-validate-an-e-mail-address-using-c-sharp-and-the-mailobject-class</link><guid>http://www.swoo.co.uk/blog/23/how-to-validate-an-e-mail-address-using-c-sharp-and-the-mailobject-class</guid><pubDate>Sun, 14 Dec 2014 00:48:59 GMT</pubDate><description>&lt;p&gt;&lt;span style=&quot;line-height: 1.6em;&quot;&gt;This is a dead simple way to validate a string of text to ensure that it is an e-mail address. The MailAddress object within the System.Net.Mail; namespace is RFC5322 compliant so if we try to create an instance of the object with an invalid e-mail address, it will throw an error that we can trap using a simple try { } catch {} block as follows.&lt;/span&gt;&lt;/p&gt;

&lt;h2&gt;Live Coding Example&lt;/h2&gt;
&lt;p&gt;&lt;iframe width=&quot;100%&quot; height=&quot;450&quot; src=&quot;https://www.youtube.com/embed/os3NHojVvjU?list=PLtIyVX4yRGIxNWWXGBymw95T1dYFLrGr2&quot; frameborder=&quot;0&quot; allowfullscreen&gt;&lt;/iframe&gt;&lt;/p&gt;
&lt;h2&gt;Source Code&lt;/h2&gt;
&lt;script src=&quot;https://gist.github.com/woodss/0aa6e0e787b76e6c6a6b.js&quot;&gt;&lt;/script&gt;</description></item><item><title>How to get your public IP address using a web service in C#</title><link>http://www.swoo.co.uk/blog/22/how-to-get-your-public-ip-address-using-a-web-service-in-c-sharp</link><guid>http://www.swoo.co.uk/blog/22/how-to-get-your-public-ip-address-using-a-web-service-in-c-sharp</guid><pubDate>Sat, 13 Dec 2014 02:09:38 GMT</pubDate><description>&lt;p&gt;In this tutorial I show you how to get your public IP address from a web service into a C# Console Application&lt;/p&gt;

&lt;h2&gt;Live Coding Example&lt;/h2&gt;

&lt;p&gt;&lt;iframe allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;450&quot; src=&quot;https://www.youtube.com/embed/IHP0b8MC_NQ?list=PLtIyVX4yRGIxNWWXGBymw95T1dYFLrGr2&quot; width=&quot;100%&quot;&gt;&lt;/iframe&gt;&lt;/p&gt;

&lt;h2&gt;Source Code&lt;/h2&gt;
&lt;script src=&quot;https://gist.github.com/woodss/be1a28be873b2221b893.js&quot;&gt;&lt;/script&gt;</description></item><item><title>TimeSpanExtensions .ToFriendlyString()</title><link>http://www.swoo.co.uk/blog/18/timespanextensions-tofriendlystring</link><guid>http://www.swoo.co.uk/blog/18/timespanextensions-tofriendlystring</guid><pubDate>Sun, 07 Dec 2014 16:53:30 GMT</pubDate><description>&lt;p&gt;This post details a nice little snippet I found on StackOverflow a while back called ToFriendlyString() which attaches to a TimeStamp object and outputs the interval in a nice friendly string format which is customisable, depending on how deep you want to go.&lt;/p&gt;

&lt;h2&gt;The Code&lt;/h2&gt;
&lt;script src=&quot;https://gist.github.com/woodss/84ea5ab8f91816f92915.js&quot;&gt;&lt;/script&gt;

&lt;h2&gt;Usage&lt;/h2&gt;

&lt;p&gt;To use the code simply attach it to a TimeStamp object as follows:&lt;/p&gt;

&lt;pre&gt;
DateTime now = DateTime.Now;
DateTime then = DateTime.Now.AddHours(24);
TimeSpan difference = then.Subtract(now);

Response.Write(difference.ToFriendlyString(1)); // will output &amp;quot;24 hours&amp;quot;
Response.Write(difference.ToFriendlyString(2)); // will output &amp;quot;24 hours, 0 minutes&amp;quot;
Response.Write(difference.ToFriendlyString(3)); // will output &amp;quot;24 hours, 0 minutes, 0 seconds&amp;quot;;
&lt;/pre&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;
</description></item><item><title>Website Design Concept for The Mortgage Corner Ltd</title><link>http://www.swoo.co.uk/blog/13/website-design-concept-for-the-mortgage-corner-ltd</link><guid>http://www.swoo.co.uk/blog/13/website-design-concept-for-the-mortgage-corner-ltd</guid><pubDate>Wed, 12 Nov 2014 23:18:18 GMT</pubDate><description>&lt;p&gt;I produced this nice little redesign for The Mortgage Corner Ltd, a small independent mortgage broker based near Hull.&lt;/p&gt;

&lt;p&gt;&lt;a class=&quot;flipme&quot; href=&quot;/content/images/blog/images/design.jpg&quot;&gt;&lt;img alt=&quot;&quot; src=&quot;/content/images/blog/images/design.jpg&quot; style=&quot;width:100%&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I based elements of the design on their logo - it has a small red chevron at the top left hand corner, and I thought this was quite a nice little &amp;#39;thing&amp;#39; to use to highlight the boxes on each page, including subsequent pages. This will subtly convey the brand imagery to the user while they browse the content on the website.&lt;/p&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;

&lt;p&gt;&lt;a class=&quot;flipme&quot; href=&quot;/content/images/blog/images/internal.jpg&quot;&gt;&lt;img alt=&quot;&quot; src=&quot;/content/images/blog/images/internal.jpg&quot; style=&quot;width:100%&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I went for a nice clean look and feel, using imagery they already had of the employees, with a simple navigation structure allowing integration to be done very easily with a content management system.&lt;/p&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;
</description></item><item><title>Including a Day Suffix when formatting a Date in C#</title><link>http://www.swoo.co.uk/blog/16/including-a-day-suffix-when-formatting-a-date-in-c-sharp</link><guid>http://www.swoo.co.uk/blog/16/including-a-day-suffix-when-formatting-a-date-in-c-sharp</guid><pubDate>Sat, 05 Jul 2014 22:17:35 GMT</pubDate><description>&lt;p&gt;One formatting option for the DateTime object in C# that is missing is the ability to display the correct suffix for a given date, as in &lt;strong&gt;4th January&lt;/strong&gt; - Usually the best you can hope for is something like &lt;strong&gt;4 January &lt;/strong&gt;which looks crap.&lt;/p&gt;

&lt;p&gt;Here&amp;#39;s a quick extension method I&amp;#39;ve written which will automatically calculate it for you and allow you to format the date as normal.&lt;/p&gt;

&lt;h2&gt;The Code&lt;/h2&gt;
&lt;script src=&quot;https://gist.github.com/woodss/006f28f01dcf371c2bd1.js&quot;&gt;&lt;/script&gt;

&lt;h2&gt;Usage&lt;/h2&gt;

&lt;p&gt;Call the code like this:&lt;/p&gt;

&lt;pre&gt;
DateTime myDate = new DateTime(2000,1,1,0,0,0);
Debug.Print(myDate.ToStringWithSuffix(&amp;quot;dd[$suffix] mmm yyyy&amp;quot;));&lt;/pre&gt;

&lt;p&gt;&lt;span style=&quot;line-height: 1.6em;&quot;&gt;Job done :)&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;
</description></item><item><title>Custom Authentication Attributes in ASP.NET MVC</title><link>http://www.swoo.co.uk/blog/8/custom-authentication-attributes-in-aspnet-mvc</link><guid>http://www.swoo.co.uk/blog/8/custom-authentication-attributes-in-aspnet-mvc</guid><pubDate>Wed, 14 May 2014 00:12:56 GMT</pubDate><description>&lt;p&gt;Here&amp;#39;s a very simple attribute I set up to require custom authentication on a controller action. You can use attributes like this to execute code before a controller action is run, such as in this case to perform authentication to check if the user has access to this method (if you&amp;#39;re using a custom authentication scheme).&lt;/p&gt;

&lt;h2&gt;The Code&lt;/h2&gt;

&lt;p&gt;Set up another class module in your project called &lt;strong&gt;RequiresAuthenticationAttribute.cs&lt;/strong&gt;&lt;/p&gt;
&lt;script src=&quot;https://gist.github.com/woodss/8ceece7b152a87eabba4.js&quot;&gt;&lt;/script&gt;

&lt;p&gt;This will give you the attribute:&lt;/p&gt;

&lt;pre&gt;
[RequiresAuthentication]&lt;/pre&gt;

&lt;p&gt;That you can use to decorate your methods, i.e.&lt;/p&gt;

&lt;pre&gt;
[RequiresAuthentication]
public ActionResult MySecureDashboard() {
    return View();
}&lt;/pre&gt;

&lt;p&gt;&lt;br /&gt;
That&amp;#39;s it!&lt;br /&gt;
Hope this helps&lt;/p&gt;
</description></item><item><title>301 Rewrite Rules can break MVC forms</title><link>http://www.swoo.co.uk/blog/5/301-rewrite-rules-can-break-mvc-forms</link><guid>http://www.swoo.co.uk/blog/5/301-rewrite-rules-can-break-mvc-forms</guid><pubDate>Mon, 12 May 2014 14:19:33 GMT</pubDate><description>&lt;p&gt;If you use a 301 rewrite rule in IIS to ensure all of your URLs are lowercase (perhaps for SEO purposes), beware that you may end up with broken forms in your application.&lt;/p&gt;

&lt;p&gt;&lt;img alt=&quot;&quot; src=&quot;/content/uploads/images/rewrites.JPG&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Sometimes when I&amp;#39;m building an app in .NET MVC, I end up accidentally using CamelCase in my URLs&amp;nbsp;(because I&amp;#39;m a very bad programmer). I might end up with a form declaration which looks like this:&lt;/p&gt;

&lt;pre&gt;

&amp;nbsp;&lt;/pre&gt;

&lt;form action=&quot;/Processing/MyAction&quot; method=&quot;post&quot;&gt;...&lt;/form&gt;

&lt;p&gt;This is because the Controllers themselves in the MVC project conform to the CamelCase pattern, i.e. &lt;strong&gt;ProcessingController&lt;/strong&gt; ...&amp;nbsp;&lt;/p&gt;

&lt;p&gt;If you&amp;#39;re using IIS Express or similar when developing locally, you probably won&amp;#39;t notice - it&amp;#39;s only when you deploy to the Live environment that the poo will start to fly, because that is where the ReWrite rules exist.&lt;/p&gt;

&lt;p&gt;The reason there is a problem is because the rewrite rule returns a GET request each time it&amp;#39;s called. You may be calling &lt;strong&gt;/Processing/MyAction&lt;/strong&gt; as a POST, but when it gets rewritten by the server, the form will actually attempt to post to&lt;strong&gt; /processing/myaction&lt;/strong&gt; as a GET request. And your app will break.&lt;/p&gt;

&lt;h2&gt;The solution?&lt;/h2&gt;

&lt;p&gt;Ensure all of the request URLs in your application are entirely lowercase - in HTML, Javascript. CSS. This will stop the Rewrite Rule from firing, and your POST request will survive.&lt;/p&gt;
</description></item><item><title>PottyMouth - A Simple C# Swear Word Filter</title><link>http://www.swoo.co.uk/blog/2/pottymouth---a-simple-c-sharp-swear-word-filter</link><guid>http://www.swoo.co.uk/blog/2/pottymouth---a-simple-c-sharp-swear-word-filter</guid><pubDate>Sun, 13 Oct 2013 23:34:54 GMT</pubDate><description>&lt;p&gt;I recently had a requirement on a client project that we should attempt to filter out any bad words or phrases from the public facing pages. &amp;nbsp;It had to be case insensitive and, as you&amp;#39;ve just read, able to filter out phrases instead of just individual words.&lt;/p&gt;

&lt;p&gt;Here&amp;#39;s a simple C# extension method to help you filter out bad words, then call the method on whatever text you&amp;#39;d like to clean up, like so:&lt;/p&gt;

&lt;pre&gt;
MyText.ToFamilyFriendlyString();&lt;/pre&gt;

&lt;p&gt;Here&amp;#39;s the code. It should simply become a new Extension method in the same vein as &amp;quot;.ToString()&amp;quot; is on any string object.&lt;/p&gt;
&lt;script src=&quot;https://gist.github.com/woodss/408593711511cf546b8f.js&quot;&gt;&lt;/script&gt;

&lt;p&gt;It works quite well, but I plan to add to it in the future to allow a whitelist of phrases which may or may not contain any of the objectional words or phrases. It would probably also be beneficial to have the list of words and phrases populated from a database or configuration file so that you can add new words without requiring a whole new application build to be compiled.&lt;/p&gt;

&lt;p&gt;I hope this helps :)&lt;/p&gt;

&lt;p&gt;&lt;img alt=&quot;&quot; src=&quot;/content/uploads/images/gitcat.png&quot; /&gt;You can fork this code on GitHub here:&amp;nbsp;&lt;a href=&quot;https://github.com/woodss/PottyMouth/&quot;&gt;https://github.com/woodss/PottyMouth/&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>Public Speaking at FPVHub 2013</title><link>http://www.swoo.co.uk/blog/6/public-speaking-at-fpvhub-2013</link><guid>http://www.swoo.co.uk/blog/6/public-speaking-at-fpvhub-2013</guid><pubDate>Sun, 12 May 2013 14:36:32 GMT</pubDate><description>&lt;p&gt;I did a nice little talk at FPVHub Northern Meet 2013 to give beginners to the hobby (flying RC planes from a first person perspective via a live video link) a rough idea of what&amp;#39;s involved, how much it&amp;#39;s going to cost (a lot!) and how much fun they can have (also a lot!)&lt;/p&gt;

&lt;p&gt;The talk wen&amp;#39;t pretty well apart from an issue where I couldn&amp;#39;t download my slides from DropBox over the network for a while, and I thoroughly enjoyed the experience. The fact that I didn&amp;#39;t get heckled or have any vegetables thrown was an added bonus :) I can&amp;#39;t wait to do it again :)&amp;nbsp;&lt;/p&gt;

&lt;h2&gt;The Presentation&lt;/h2&gt;

&lt;p&gt;&lt;iframe frameborder=&quot;0&quot; height=&quot;486&quot; scrolling=&quot;no&quot; src=&quot;http://www.slideshare.net/slideshow/embed_code/34570186&quot; style=&quot;border:1px solid #CCC; border-width:1px 1px 0; margin-bottom:5px; max-width: 100%;&quot; width=&quot;597&quot;&gt;&lt;/iframe&gt;&lt;/p&gt;
</description></item><item><title>How to rename a SQL Server table from within Visual Studio 2010</title><link>http://www.swoo.co.uk/blog/9/how-to-rename-a-sql-server-table-from-within-visual-studio-2010</link><guid>http://www.swoo.co.uk/blog/9/how-to-rename-a-sql-server-table-from-within-visual-studio-2010</guid><pubDate>Sat, 14 Jul 2012 06:15:49 GMT</pubDate><description>&lt;p&gt;&lt;span style=&quot;font-family:open sans,helvetica neue,helvetica,arial,sans-serif&quot;&gt;A fairly annoying quirk with Visual Studio 2010 Server Explorer is that it doesn&amp;#39;t allow you to click on a table name to rename it - so here&amp;#39;s how it&amp;#39;s done.&lt;/span&gt;&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;&lt;span style=&quot;font-family:open sans,helvetica neue,helvetica,arial,sans-serif&quot;&gt;?&lt;/span&gt;Right click the table you want to rename&lt;/li&gt;
	&lt;li&gt;Select &amp;#39;Open Table Definition&amp;#39; from the context menu&lt;/li&gt;
	&lt;li&gt;When the table definition loads, go to the Properties pane, and find the (Name) property.&lt;/li&gt;
	&lt;li&gt;Type the new name for your table (or press ESC to cancel editing)&lt;/li&gt;
	&lt;li&gt;Job done&lt;/li&gt;
&lt;/ul&gt;
</description></item><item><title>Incorporating common ViewData into multiple Controllers in ASPNET MVC without duplication</title><link>http://www.swoo.co.uk/blog/10/incorporating-common-viewdata-into-multiple-controllers-in-aspnet-mvc-without-duplication</link><guid>http://www.swoo.co.uk/blog/10/incorporating-common-viewdata-into-multiple-controllers-in-aspnet-mvc-without-duplication</guid><pubDate>Sun, 28 Feb 2010 21:49:55 GMT</pubDate><description>&lt;p&gt;In this short tutorial I will show you how to make common ViewData information available to your Views in ASP.NET MVC, without having to duplicate ViewData[] variables in each seperate controller&lt;/p&gt;

&lt;p&gt;During my learning phase of ASP.NET MVC, one of my bugbears was that when I wanted to display information from my database on multiple Views, I had to load that data in during the running of each Controller Action, and essentially duplicating code across multiple Controller Actions.&lt;/p&gt;

&lt;p&gt;For instance, if I wanted a list of categories for my products on the Master Page, in each controller I might have something like:&lt;/p&gt;

&lt;pre&gt;
ViewData[&amp;quot;Categories&amp;quot;] = (from c in db.Categories 
    where c.isEnabled = true 
    orderby c.Title descending 
    select c);&lt;/pre&gt;

&lt;p&gt;If you imagine that code repeated throughout the perhaps 20 or 30 Controller Actions within the application, you can see the kind of problems you&amp;#39;d have maintaining it - it&amp;#39;s a violation of the DRY (Don&amp;#39;t Repeat Yourself) principle for starters.&lt;/p&gt;

&lt;h2&gt;The solution&lt;/h2&gt;

&lt;p&gt;Essentially the solution is very simple and involves creating a new abstract class of Controller called &amp;quot;GlobalController&amp;quot; (or XController, or whateverController you like) and placing the code in there instead of your actual controller.&lt;/p&gt;

&lt;pre&gt;
When you create a controller normally, this is the code you use:
    
public class HomeController : Controller&lt;/pre&gt;

&lt;h2&gt;The Code&lt;/h2&gt;
&lt;script src=&quot;https://gist.github.com/woodss/53aad4a669b8071fc3d2.js&quot;&gt;&lt;/script&gt;

&lt;p&gt;Notice the &amp;quot;abstract&amp;quot; keyword in there, that&amp;#39;s the only difference. The Viewdata is contained within the class Constructor - place your ViewData code in there with any values you need throughout the application.&lt;br /&gt;
Now, in your usual Controllers, you need to make them to inherit this GlobalController abstract class instead of the normal Controller class, so instead of using:&lt;/p&gt;

&lt;pre&gt;
public class HomeController : Controller&lt;/pre&gt;

&lt;p&gt;You need to use:&lt;/p&gt;

&lt;pre&gt;
public class HomeController : GlobalController&lt;/pre&gt;

&lt;p&gt;Now that you&amp;#39;ve done that, all of the ViewData set in GlobalController constructor will be available to your views.&lt;/p&gt;

&lt;p&gt;Simples!&lt;/p&gt;
</description></item></channel></rss>