Resuming blogging after a few years…

I started my blog in 2009, a decade ago![true 🙂]. But for the past few years, though I’ve been in the tech field, I’ve not been blogging, sometimes intentionally-to make time for other things & sometimes unintentionally.

I regret for not blogging for the past few years.

I started blogging for many reasons, right now when I think of why I need to blog? – I could tell it is primarily for the following reasons:

  1. It helps to motivate my learning, to maintain myself as a truly hands-on person even after I got into Software architect roles and technology leadership roles, also it prevents burnout in terms of keeping up with learning so many new things popping up in the industry. Additionally, the pressure of wanting to write a new blog post makes one seek new tools/tech to explore, this helps to spread your expertise horizontally, as per your liking.
  2. Blogging is a great note-making/learning tool – my blogging philosophy is, you can blog anything you want to make a note for yourself, some/most times those blog posts may end up being useful for someone.
  3. To save time – sharing a link is easier than guiding someone on a topic/issue. Lot of times, I happen to bring up a team of freshers or cross-train developers into a new technology as part of my work and sharing blog posts for them to get started is easier.

I always blogged on my own domain, first on codehappiness.com (2009-2011) (codesmiles.com was not available then 🙂), then found codesmiles.com being available for registration and migrated to it since 2012 – till date

I felt like moving to a new domain name as I am not sure if I am very fond of my old domain(codesmiles.com), and having your name on the domain is the trend now😎. Also, as I am resuming blogging after a few years, thought to have a kind of “refreshed resumption” if that’s a term 😉, hence I am moving to ashokaOn.Tech domain.

ASP.NET MVC security best practice — Add Authorize attribute for controller instead of individual actions when appropriate

(Note: This blog post was originally published under my old domain(codesmiles.com), here. Web Archive link. Recently I was going through an ASP.NET MVC web application’s source and noted that in some of the Controllers all of its Actions required authorization to access them. So Authorize attribute was added to all of the actions in the controller, as shown below . public class AdminSettingsController : Controller { // // GET: /AdminSettings/ [Authorize] public ActionResult Index() { return View(); } // // GET: /AdminSettings/Details/5 [Authorize] public ActionResult Details(int id) { return View(); } // // GET: /AdminSettings/Create [Authorize] public ActionResult Create() { return View(); } // // GET: /AdminSettings/Edit/5 [Authorize] public ActionResult Edit(int id) { return View(); } // // GET: /AdminSettings/Delete/5 [Authorize] public ActionResult Delete(int id) { return View(); } } But if all of the controller’s actions need authorization then you can add [Authorize] attribute to the entire Controller itself. Doing this would avoid room for errors, as you may miss to add the Authorize attribute to individual actions and that could become a security vulnerability. Below you can see I have removed the Authorize attribute from individual actions. [Authorize] public class AdminSettingsController : Controller { // // GET: /AdminSettings/

Visual Studio 2013 New Features of the IDE

(Note: This blog post was originally published under my old domain(codesmiles.com), here. Web Archive link. Update: I posted this article on Aug 10, 2013 on CodeProject and in this blog around the release of Visual Studio 2013 preview version(all the below mentioned features are still present in the final release). Even though I wrote this post for documenting and sharing the visual studio 2013 new features that I identified when I started exploring Visual Studio 2013, I recently noted many people, even Microsoft folks have talked about the new features in various Microsoft sites, I recommend everyone to check them out too (posting all those links will just make people lazy :-)). Visual Studio 2013 Preview has been launched recently. Like I did with Visual Studio 2010 and Visual Studio 2012, I am writing this with several purposes in mind; I thought of documenting these cool new features of Visual Studio 2013 that I found, so that it will serve as an index for me and I could easily refer to this in talks I may give, or, when sharing these with friends. (Note that one of the ultimate purposes of blogging/posting articles for me is that I can easily

Build 2013 – live streaming now.. Windows 8.1 revealed.. Visual Studio 2013 preview & .Net framework 4.5.1 preview released !

(Note: This blog post was originally published under my old domain(codesmiles.com), here. Web Archive link. Build – a Microsoft’s developer conference occurs every year to inform developers around the world about the technologies & tools available for developers in Windows platform.. This year’s event is from Jun 26 to Jun 28 http://channel9.msdn.com/ -live stream http://channel9.msdn.com/Events/Build/2013 event schedule.. http://www.buildwindows.com/announcement http://www.microsoft.com/visualstudio/eng/2013-downloads – Visual Studio 2013 preview Share the info with your friends.. Alchemists turned into chemists when they stopped keeping secrets. –    Eric Raymond Happiness quite unshared can scarcely be called happiness; it has no taste. –    Charlotte Brontë

Launching your ASP.NET web applications on multiple browsers at the same time from Visual Studio

(Note: This blog post was originally published under my old domain(codesmiles.com), here. Web Archive link. Visual Studio 2010 offered option to view a particular .aspx page on multiple browsers when you right-click the file and chose Browse With… but it didn’t provide storing the setting and allowing to launch the web page on multiple browsers at the same time when you execute every time. In this article we will see how this feature is enhanced in Visual Studio 2012; you can set multiple browsers as default and store this setting permanently and when you Debug(F5) you will get a dialog to choose the browser you’d like to debug with or when you Execute without debugging (Ctrl+F5) you will be able to launch the web application in multiple browsers. As you may have noted from my earlier article about Visual Studio 2012 new features, Visual Studio 2012 has a browser drop down that lets you select the browser that will be used to launch your ASP.NET web application when you debug it (F5) as shown below, as I mentioned in my article, this was achievable in earlier Visual Studio versions via other not-so-quick menu/context menu commands.   If you click the

Visual Studio 2012 New Features of the IDE – better late than never :)

(Note: This blog post was originally published under my old domain(codesmiles.com), here. Web Archive link. I am making this post thinking “Better late than never”, as I was supposed to make this post a long time ago, actually in the beta period of Visual Studio 2012, like I did with Visual Studio 2010, unfortunately I was held up with other stuff, personal and work related. This post remained as partially completed in my blog’s drafts for a long time which I took and finished. Note: This post talks about the Visual Studio 2012’s IDE new features. All non-IDE features, new language features, .net framework 4.5 features, new type of app development support like Windows 8 metro app development and specific code editor enhancements will be discussed in future posts. So with that in mind, here are the new features of Visual Studio 2012’s IDE.. Dark Color Theme for code editor and IDE windows Visual Studio 2012 provides out of the box option to have a White on Black color scheme, Dark AKA White on Black color schemes have become choice of many developers as many have realized that they are easy on the eyes. Dark Theme (click to enlarge)  

Easiest way to Generate Insert Script in SQL Server

(Note: This blog post was originally published under my old domain(codesmiles.com), here. Web Archive link. We all know that there is no handy built-in command for generating insert statements for the data present in a table in SQL Server (apart from issuing a Generate Scripts… command on the Database and choosing to Script Data also). There is this tool called SSMS Tools pack which I am using for years that provides a handy way to generate scripts for various purposes including Insert statements when you just right click the table for which you need the scripts. You can get the complete set of features provided by the tool here. I’ll try to post about other cool features of SSMS Tools Pack in future.