Skip to main content

Posts

Hangfire with In-Memory Storage (ASP.Net MVC 4/5)

This is in continuation to my previous post: Hangfire with ASP.Net MVC : Simplest Code To Start with.

In this post we will see how Hangfire can be configured without the SQL Server as its backend for job scheduling, instead, manage all in-memory

1) Create ASP.Net MVC 4/5 Projects
2) in web.config file
3) Run Install-Package HangFire -Version 1.6.17 or visit here for latest version: https://www.nuget.org/packages/Hangfire/1.6.17
3) Run Install-Package Hangfire.MemoryStorage -Version 1.5.2 or visit here for latest version https://www.nuget.org/packages/Hangfire.MemoryStorage/
4) I am simply updating a table with a primary key (auto incremented), and string field "StampTime" with current date and time.
5) Open Global.asax.cs and paste below shown code.
6) Run the app and check the database.


using Hangfire; using Hangfire.Common; using Hangfire.MemoryStorage; using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using System.Web; using…
Recent posts

Hangfire with ASP.Net MVC : Simplest Code To Start with

It seems many are looking for using Hangfire with ASP.Net MVC 4 / 5+ SQL Server here is the simplest code example for you to start quick.

I am using Visual Studio 2017 Community Edition

1) Create ASP.Net MVC 4/5 Projects
2) <add key="owin:AutomaticAppStartup" value="false" /> in web.config file
3)Run Install-Package HangFire -Version 1.6.17 or visit here for latest version: https://www.nuget.org/packages/Hangfire/1.6.17
4) From the sample code, make sure you create database in SQL Server DB and update the connection string.
5) I am simply updating a table with a primary key (auto incremented), and string field "StampTime" with current date and time.
6) Open Global.asax.cs and put this code.
7) Run the app and check the database.

The example code also showcase a hack on how to run jobs with few seconds interval.

namespace HangFireDemo { publicstaticclassMyTasks { publicstaticasync Task<int> MinuteTick() { awa…

Installing MySQL on Windows using a noninstall zip archive

At-least for me, configuring MySQL zip archive on server by reading MySQL team's unfriendly, multi-navigational document has been quite a challenging task.

Here is my simplified version:
Download mysql noninstall zip from here: http://dev.mysql.com/downloads/mysql/Extract do C:\mysql folderUnder c:\mysql folder you will find my-default.ini file, make a copy of it and rename it to my.iniOpen my.ini in notepad, You will find basedir and datadir as commented statements, just uncomment them (by removing # from the starting position of each line) and do the changes shown belowbasedir = c:\\mysql #installatin directorydatadir = c:\\data   #data directory, it can be in some other drive too!Open cmd.exe as administrator and type below commands one after the otherGo to bin folder where mysqld.exe file is presentcd c:\mysql\binBelow command will initialize the data directory, by reading my.ini file (in our case its in c:\mysql folder)mysqld --initializeInstall mysql as background running se…

How a university is saving 2.5 tons of paper every year?

Considering the current environmental imbalances, many non-profit organizations (like The Nature Conservity, SayTree…and many others) around the world working desperately to save plant and trees. It is our responsibility too. We felt starting with universities is the better place to spread the awareness. With this, we also made universities administrative work more manageable and effective.


The story I am going to share tells you how a university quietly worked and stands as a role model by saving tons of paper and millions of rupees of its own and its students.
In the year 2012, VT University (Visvesvaraya Technological University also popularly known as “VTU”) Belgavi (India), has moved its thesis evaluations to online to effectively reduce its use of paper and streamline the process online. University’s this decision made it save several Lakhs of rupees (~ tens of thousands of dollars) every year in paper cost while giving faculty and administrators more direct access to evaluation …

Hosting your website? Know the Darkside of Big Brands

Please note, Below mentioned hosting providers are reputed organizations with well established infrastructure. This post is for your information and only intended to keep you informed about their 'policies' that turn evil when you have cut throat challenges.


Hostgator We heard a lot about Hostgator and we registered one of our customers website with them without giving a second thought. Few months later, during our support phase on our customer's website, we encountered Hostgator feature and support challenges which I think not many experience unless they do some hardcore technical activities with their website.
Many said hostgator has good support track. For us it was always waiting for 20 or more minutes to connect Hostgator support executive for online chat. This can be excused if it is ones in a while, but that was not the case for us.If you are running an e-commerce kind of website or offering online services every minute, then 20 minutes wait time feels like 20 hours.T…

Startup Notes: Software Sales and Product Quality

When I visited a potential customer (their minimum monthly business transaction is more than 10 Lakhs) to discuss about our software products and services, they showed interest to spend only 12K for the product worth 70K. I denied to sell our software solution to him. Few days later they succeeded to get one for 10K (from some other startup) for their business. Few months later the same business owner called me back and told me that the software he purchased for low cost, is with many defects and support from vendor is not up to the mark. He also expressed that “I started hating software startup companies. Are you a startup?” For next few days we had several exhaustive discussions and finally we managed to deploy our software solution to the customer with our previously offered price. Now, he is our happy customer.

When I checked, the software vendor who sold software for 10K is a 2 years old startup and he is struggling to get more customers bothering least about his software qualit…

So, That's it!

2 months back
If you are like me, then there is a list prepared by your mother or wife sitting in your pocket reminding you to purchase some items on your way back home in the evening :) I slightly deviate from my regular walking route and reach the shop where I buy most of the household items. By the time I finish shopping and reach home I am almost dead tiered and never dare to imagine to sit and document how much money I spent few hours back.

1 month back
When Srushti's lab released a private beta version of Expense management application, ServeEase and suggested me to use. I am reluctant to use it until I explored the following feature.

Today
I always suggest my wife to include purchase items to "Expense" section of ServeEase. She does add items marking their price as zero.

So, everyday evening on my way back home, I make sure to check expense section on my mobile and get all items that are with zero price tag. That clearly hints me these are the items to be purchased …