The Blog

How to use - (dash) in the ASP.NET MVC call?

ActionName attribute can be used:

 

Continue Reading

Undirected Graphs

Data structures capture relationship between the component values such as succession or relative magnitude. Graphs data structure is a very general representation of binary relations recorded as edges between a collection of vertices. There are many variations and extensions of graphs such as labelled vertices, labelled edges, root verities, multi-edges etc. However, in this article

Continue Reading

How to override MongoDB connection details in appsettings.json on Azure

It is actually pretty simple to override the connection settings in Azure. If you manage your connection inside the appsettings.json:

Then in Azure you should define these in Application Settings -> App settings. Seperate the layers by ":" (semi-colon). For example: Key: MongoConnection:ConnectionString Value: mongodb://admin:abc123!@localhost. Similarly, the database (key) MongoConnection:Database value: YourDb

Continue Reading

How to resolve: MongoDB.Driver.MongoAuthenticationException: Unable to authenticate using sasl protocol mechanism SCRAM-SHA-1.

I came across this error today whilst trying to deploy my application on Azure. MongoDB.Driver.MongoConnectionException: An exception occurred while opening a connection to the server. ---> MongoDB.Driver.MongoAuthenticationException: Unable to authenticate using sasl protocol mechanism SCRAM-SHA-1. As it turns out, MongoDB may have separate databases for authentication and data and therefore it is essential to specify

Continue Reading

(Joke) How to force users to provide hard passwords?

Continue Reading

Architecture Quality Attributes

Architecture Quality Attributes (a.k.a. QAs) are used to determine if our architecture is fit for a particular purpose. Qualities must be accommodated in a system's architecture over and above basic functionality. It is too often that functionality takes the front seat, indeed sometimes the only seat. The functionality, however, should be the primary concern of the

Continue Reading

findViewById in a fragment

Not quite as simple as it would seem. You can't use onCreate() method because it is called before onViewCreate(). However, you can used onViewCreate, because you inflate your view: hence you have access to it:

Continue Reading

Attribute-Driven Design Process

Attribute-driven design (ADD) process allows us to use a recursive method for explicitly representing of quality attributes as well as explicitly stating association between architectural decision and quality attributes. To begin the process of ADD, we need a set of functional requirements (e.g. use-cases), quality attributes (ideally expressed through design scenarios) and any further system constraints

Continue Reading

Sets - Purely Functional Data Structures

A set is one of the most fundamental data structure. It allows to keep a unique, unordered enumeration of elements. Ordered Lists We could use an ordered list to implement a set data structure.

The problem: these are still linear. Binary Trees Sets can be implemented using the list as the underlying data structure,

Continue Reading

Extracting Username and Password from Basic Authentication

Basic authentication is one of the most fundamental ways in which authentication can be performed. It does not require multiple calls and is very easy to learn. In this article, I will present how to use C# (usually with WCF) to extract basic authentication credentials from the request. Step 1 - Understanding Basic Authentication Whenever

Continue Reading