Posts

Storing Objects in Session in Asp.Net Core

Since you are here, you already know the challenges of not being able to use Session in the same way as was possible in the days of .Net Framework. Hence I will get straight to the point of how to do this - without trying to tell you why you shouldn't store object in the session, because if you have a use case for storing session, then you need to know how to do it right - and how not to do it as well. However my approach should be either taken as an interim while you are migrating your old apps from Asp.Net Framework to Asp.Net Core - with a long term plan to move away from session objects all together, or you should use my recommended approach only if you are providing a single server solution or a box solution. First: How not to do this. Microsoft's official page recommends storing objects in a session as a serialised object - they are assuming we all need multiple servers for our projects. But whether we use multiple server or single server the solution for serial

Real Issues in Cryptocurrencies

Brief History of Coins Driven Economy Remember those young care-free days when we were collecting stamps, currency notes and coins of various countries? What interested me most were the coins of various Kings of India. Each king had their own coin imprinted on some form of metal or stone. While barter system (before coins were introduced) was perfect on many grounds, it was rigid and limited, it forced us to have a transaction only when both parties had what other didn’t have but wanted it. There is more to this but in nutshell coins (currency) became a great engine to fill the gaps in the barter system — giving birth to a much flexible economy. Currencies, however also gave rise to an issue. Currencies were essentially a printed resource. There are regulations around printing currencies, however it is always subjective and at the mercy of the “expert”, there are also various forms of pressure from stakeholders and not more than often the resources are exploited and more cu

How to give correct file ownerships and permissions to secure your app server

Linux is such a powerful Operating System and the permissions it provides are powerful and simple and yet most widely misunderstood. I have gone through so many forums and one common observation was there is lack of understanding on how permissions work. Most people give standard answers like put 644 or some ignorant ones even suggest 777, not knowing the underlying architecture of the system at all. I thought it is time to put a blog that clearly outlines what are these permissions and how they really work behind the scenes. There are many who know the underlying principles - i invite all of them to share their feedback to help expand this blog and serve newcomers even better. This blog is not about how to set permissions or how to improve security. How part has been covered by many bloggers, hence we will not be discussing any commands. I am only going to focus on What permissions to give and Why. Let's start Most common scenario is there is a website or an applicat