C#

Preventing XSRF in AngularJS Apps with ASP.NET CORE Anti-Forgery Middleware

What is Cross Site Request Forgery (XSRF/CSRF) Cross Site Request Forgery (XSRF/CSRF) is a type of a security breech where a hacker can trick the user into making unwanted requests to a web application where he/she is already authenticated. When a user is authenticated, his/her authentication cookie is stored in the browser’s storage. Since the cookie stays active unless the browser is closed and reopened, an authenticated user can be forced to make requests to the application from other unsafe applications too. For example, assume…

Keep reading

AngularJS and ASP.net Core 1.0 JumpStart (Part – III)

Creating the ASP.net Core 1.0 MVC project Okay, this part of the series will be pretty much big. So take time and read all the stuffs that I’ve done here. We will create a ASP.net Core 1.0 MVC project first. If you don’t have it installed already, please visit this link and follow the instructions to install it in your favorite operating system, https://docs.asp.net/en/latest/getting-started/index.html After installing, open up your Visual Studio 2015 and create a new…

Keep reading

AngularJS and ASP.net Core 1.0 JumpStart (Part – I)

Building the “Answer It!” app “Answer It!” is an app more like the famous TV show “Who wants to be a millionaire” but a bit different. Here a user will be presented with some predefined question sets. User will have to answer all the questions in limited amount of time and grab the glorious prize of “NOTHING”. I’ll build the app from scratch following some patterns and practices in both server and client side. In the end of this series you will have a good understanding on how to…

Keep reading

Handsfree with Cortana!

Intro (Skip if you already know who Cortana is) Getting your works done by not launching the desired app is more common these days. Since every platform has its own personal assistant to get your works done as quickly as possible, why not leverage it. If you are not sure yet about what kind of personal assistant I’m talking about. Well they are Cortana, Siri and Google Now. They are available in Windows, iOS and Android devices respectively. Let me talk about Cortana today and show you how you…

Keep reading

Building Android Apps with C# (Intro to Xamarin.Forms)

What is Xamarin? We can’t just create an android project and start writing C# in it. That would be crazy! Right? We need some kind of wrapper or framework for that. You may have heard of a javascript framework called Cordova which allows you to write cross platform mobile apps using the web stacks (HTML, CSS, Javascript). Likewise, now we can also make cross platform apps with C# using Xamarin framework. Xamarin provides three solution templates to build mobile apps, Xamarin.iOS ( Only for making iOS apps. Use storyboard…

Keep reading

ASP.NET Session State Management with Redis (Local Server Farm Testing)

What is Redis? Redis is an open source key value data structure store. keys can be strings, hashes, lists, sets, sorted sets etc. This in memory data store is broadly used in session state storing and caching. Why Redis for session state storing? If you are developing web applications for big companies, possibilities are your application is hosted on multiple servers. To be frank that is actually true. In some cases, for example, you may want to provide a backup server if your main server fails. In other cases, for…

Keep reading

Building web apps with ASP.net 5 MVC and Entity Framework 7

Intro to ASP.Net 5  Everyone likes the technology that comes with an “open source” tag along with it. And yes! The new ASP.net 5 is an open source project and cross platform framework. I guess, you are already feeling excited to learn some ASP.net 5 now! Well I’m a big fan of Node.js, so when I heard about ASP.net 5 and its modularity like Node.js, I thought why not give it a try. Believe me guys! I’m…

Keep reading

Exception filtering in C# 6.0

Those of you who read my previous post on What's new in C# 6.0 may have noticed that I forget to discuss an important feature of C# 6.0. Well that is exception filtering. I thought about updating the previous post with this feature explained but again felt that it deserves a post of its own. So let's start. Exception Filtering Exception filtering is nothing but some condition attached to the catch block. Execution of the catch block depends on this condition. Let me give you a simple example.…

Keep reading

What's New in C# 6.0

What's New In C# from Fiyaz Hasan on Vimeo. static types as using So, we are all quite familiar with this notion of accessing static class members using the qualification first. It is not required now. Importing static using can save the day. For example, before C# 6.0, we had to access ReadKey(), WriteLine() methods of the Console class by explicitely define the static class qualifier. using System; namespace NewInCSharp { class Program { static void Main(string[] args) { MySelf.WhoAmI(); Console.ReadKey(); } } static class MySelf { public static void…

Keep reading

Interacting With Outlook Calendar Using Live SDK

Hi geeks, so you've been trying to interact with the outlook calendar programmatically but can't get around with it. Tell you what, No fear cause super fizz is here. In this post I'm going to show you how you can interact with the outlook calendar using Live SDK. We will also build a simple calendar app for windows phone. So let's get started. Fire up visual studio and quick create a WinRT (Not the Silverlight one) windows phone blank project, name it and hit ok. Now right click on the…

Keep reading