Posts

Showing posts from 2015

Self referencing loop detected for property 'xxxx' with type 'System.Data.Entity.DynamicProxies.XXX_XXX'. Newtonsoft.Json.JsonSerializationException

Image
This is a very common serialization exception we see when forget to use loop handling strategies in Web API.

My session on Azure Media Services in C# Corner Delhi Chapter

Image
After I moved to Delhi, first time I got an opportunity to speak with developers in C# Corner Delhi Chapter meeting, Dinesh Beniwal is awesome guy managing community so well in Delhi. He invited me to be a part of Delhi Chapter and engage with developers and help community to grow by sharing and learning.

Sorting in WebAPI - a generic way to apply sorting

Image
In this post you will learn how to implement sorting functionality in WebAPI so that client can ask for sorted data by sending columns names through query string. Client can send more than one short parameters and request for ascending or descending data in response. Sorting functionality should be generic enough so that we can reuse it.

Field level data selection in WebAPI

Image
In this post you will learn how to implement field level data selection functionality in WebAPI so that client can ask for less data by sending individual columns names through query strings variable fields .

How to remove/update default header and footer from PayPal sandbox page

Image
I was updating an old website that uses PayPal as one of the payment gateway option. When I was testing the website I realized default header and footer texts.

Upload video on YouTube in ASP.NET or MVC

Image
I n this post you will learn how to upload video on YouTube from your application. I’ve used ASP.NET Web Forms a s well as MVC bits to implement all functionality easily. You can achieve similar functionality ASP.NET Web Forms or MVC a lone .

Write on Existing Image

Image
In this blog post you will learn all about writing text or image on existing image. I will be developing this in ASP.NET Web Forms, but you can achieve this functionality in MVC or windows forms as well. I’ve posted another blog post which generates QR Code . Actually all this was part of my recent requirement which I would like share with you.

QR Code Generation and Verification

Image
In this blog post you will learn all about QR Code, starting from requirement to generation to verification. I am going to develop this in C# and in ASP.NET Web Forms, but you can use it with MVC, Desktop Apps etc. I will be using MessagingToolkit.QRCode open source library for everything here.

Search in selected file types Visual Studio

Image
This is a very important feature which is worth useful when making necessary changes that may match in multiples file types but you are only supposed to change in selective files types.

Visual Studio 2015 Razor Syntax Highlighting and Intellisense not working

Today i faced this issue in my IDE and resolved with following steps:

Roslyn csc.exe and vbc.exe deployment on shared hosting

Roslyn compilation is now default with .NET 4.5 means if you create any web application either Web Forms or MVC using .NET 4.5 you get this compilations bits pre-installed in your project. Why use Roslyn compilation? In nutshell, this enables many features which is very useful when developing application as well as when application is deployed on server.

Language and Culture/UI Culture or Internationalization in MVC

Image
Setting up Language and UI Culture in efficient way is very important. Also, there are many ways to achieve this today but the best way is always easy to achieve, clean, documented. I can see many posts online about this but they not much useful and end to end discussed, you end up with huge code.

Stop Debugging stops IIS Express hence application stop running in browser in Visual Studio 2015

Image
Note: This was a bug with Visual Studio 2015 Update 2 which is officially mentioned and fixed in Update 3. Read more here . This is not a bug but as a web developer I personally expect when debugging stops browser should keep running through IIS Express instance. Next time, I make change in Visual Studio code then do a build and refresh browser, I’m addicted this way.

The 'System.Web.Security.SqlMembershipProvider' requires a database schema compatible with schema version '1'

Image
Error: The 'System.Web.Security.SqlMembershipProvider' requires a database schema compatible with schema version '1' I received above error on my production machine after deploying new database for a web application. I have SQL Server 2008 R2 installed and to deploy database I created query file (.sql) schema with data. After that I deployed web application properly.

Microsoft MVP: Honored to have received the Microsoft MVP award for the 4th year

Image
MVP Again J 1st July has a very special meaning to me, this day starts with full of expectations and fast heartbeats which lasts until the moment of receiving email from Microsoft. Once again Microsoft awarded me with the MVP (Most Valuable Professional) award for the 4th time in a row in the ASP.NET/IIS category. I'm honored to be the part of Microsoft MVP Program, this is one of the most prestigious award to me. Here is the body of the mail that I received: I'd like to thanks to my family, all friends, Microsoft Indian MVP Group, Biplab Paul (India MVP Program Lead), Gandharv Rawat and my blog readers and followers. A very-very special thanks to 👩  who is supporting me every day. Thanks.

MVC client side validation not working with modal or Bootstrap model

Recently in my one of the MVC Project, dynamically loaded content on Bootstrap modal client side validation was not working. By any chance if you face same issue this post is important for you.

An error occurred when trying to create a controller of type 'AlbumsController'. Make sure that the controller has a parameterless public constructor.

By any chance if you see below error, please use below resolving  instruction  to overcome. An error occurred when trying to create a controller of type 'AlbumsController'. Make sure that the controller has a parameterless public constructor.

LINQ to Entities does not recognize the method 'Int32 ToInt32(System.String)' method, and this method cannot be translated into a store expression

Image
LINQ to Entities does not recognize the method 'Int32 ToInt32(System.String)' method, and this method cannot be translated into a store expression First of all look at the screenshot of the error page

Export table data into excel file

Exporting table data (DOM data) on the HTML page to excel file is a very common requirement. The simplest approach or say the completely client side approach to achieve this is to export the DOM data using client side scripts.

'CompareAttribute' is an ambiguous reference between 'System.ComponentModel.DataAnnotations.CompareAttribute' and 'System.Web.Mvc.CompareAttribute'

Image
'CompareAttribute' is an ambiguous reference between 'System.ComponentModel.DataAnnotations.CompareAttribute' and 'System.Web.Mvc.CompareAttribute'

Remove Header & Footer from Print Preview in Google Chrome

Image
Recently I had a requirement when one printing the web page should not display header and footer, basically they are automatically inserted by the browsers. Here is what this looks like:

The field Date must be a date error in MVC Application

Image
When I working on a project one of dev in my team asked me that scaffolded views in MVC is not accepting date when using jQuery date validation plugin which is default shipped with MVC template.

Blog Post not visible in BlogEngine

These days I’m using .NET Open Sources software at my best level. You won’t believe I’ve used BlogEngine implementations for 3 clients this month. Not exact the BlogEngine but its implementations in some other implementation.

Blank/White Home Page in BlogEngine.NET

Image
I download latest BlogEngine.NET source code and opened it in Visual Studio built it successfully and then it was running as expected.

Flip or Rotate Image using CSS

In this quick code you will learn how to flip or rotate image with transition effect using CSS. We will have opportunity to trigger the flip or rotate action on mouse hover or click, for this we will be using jQuery.

Create Expandable or Toggle Drop Down using jQuery

In this quick code you will learn how to create expandable or toggle drop down menu with little icon which shows menu is opened or not. Let's straight look at working example below.

How to run Node.js on IIS

Image
In this post you will learn how to run Node.js applications on IIS Server. As you know, Node.js is an open source, cross-platform runtime environment for server-side and networking applications. This is mostly written in JavaScript, and can be run within the Node.js runtime itself installed on Windows, Linux etc. Node.js was originally invented in 2009 by Ryan Dahl, and other developers working at Joyent .

Open .NET Discussion in Jubli Park Jamshedpur on 05/04/2015 Executed

Image
So this was another good time discussing about .NET with developers down the tree in Jubli Park, Jamshedpur.

Open .NET Discussion in Jubli Park Jamshedpur on 05/04/2015 (Sunday)

Being as a part of Jharkhand Geeks community, we are very happy to announce open .NET discussion in open place :) in Jubli Park, Jamshedpur on 05/04/2015 (Sunday). Address Jubli Park Jamshedpur Mobile Number: 08603371937 (call us when you reach location) Date and Time 05 April 2015, 02:45 PM to 05:00 PM About Meeting This meeting is going to be very pleasing, because first time we are inviting developers to discuss on .NET Platform in open place, you will love this. You can select any topic you want and discuss on that. Let's meet and be the part of open discussion open place. A great opportunity to learn, contribute and collaborate yourself with fellow developers. We look forward to seeing you there!

Disable Browser Back Button

In this quick code you will learn how to disable browser back button. As this is a client side solution, I would never suggest to use when it comes to confidential websites like banking sector.

Initialize var with null or empty in C# - learn workarounds

In this quick code you will learn how to initialize var so that it works like null or empty. Technically, this is not possible.

Query string values in JavaScript

Image
In this quick code you will learn how to get query string (browser address bar's variable) values using JavaScript.

Substring in jQuery or using substring(from, to) or substr(start, length) functions

In this quick code you will learn how to get substring from a string in jQuery. A substring is a string which part of another string, we need such functions when some part of string needs to be remove or escape out. We can use either substring(from, to) or substr(start, length) .

Cookies in jQuery with jQuery.Cookie library

Image
In this quick code you will learn how to read, write and delete session cookies using jQuery. Remember to use jquery.cookie library on the page.

Contact Number or Mobile validation in jQuery

In this quick code you will learn how to validate Contact Number or Mobile client side using jQuery. We will be validating only number here because for different countries and providers length may vary. Find the running code below.

Email Validation in jQuery

In this quick code you will learn how to validate Email IDs client side using jQuery. Find the running code below.

Change Button Text using jQuery

I have started sharing "Quick Code Snippet" and this is very first post of the series starting today 27 March 2015.

CSS Based Multi-Branch Tree View Menu for Website

Recently I had a requirement to create a multi-branch tree view menu for website which should be completely CSS based and no single line of JS code.

SQLServerGeeks Annual Summit 2015 - Asia's first and the only SQL Server Conference

Image
If you are in Bangalore or around or SQL Server enthusiast, here is something for you. SQLServerGeeks guys announced Annual Summit 2015 on August 27, 28, 29, 2015 in Bangalore at NIMHANS Convention Center.

String Replace by ignoring case C#

Image
This is a quick blog post about replacing string by ignoring case in C#. We land in some situations where we get string and we have no control over case. In such cases to replace string by ignoring its case we can use Regex.Replace method.

Crop image maintaining aspect ratio in ASP.NET, C#

Image
Sometimes we need to decrease size of the images by maintaining aspect image ratio. The code give below will produce a new image from source image and new image will look exactly like source image.

Attended Microsoft MVPs Open Day 2015 in Bangalore

Image
It was another year I attended Microsoft MVPs Open Day event in Bangalore, last time it was in Goa. ||For those who don’t know what MVPs Open Day is Every year Microsoft MVP Award Program organizes an event dedicated for MVPs only. In such event MVPs gathered together from different cities (South Asia MVP region includes India, Nepal, Bangladesh etc countries). Such events feature technical sessions designed to enhance the community's understanding of new Microsoft products, existing tools and new techniques. But MVPs like me don't come to learn just from Microsoft teams, we present during Open Days, which allows MVPs to    i) share real-world knowledge of Microsoft technologies aka "MVP to MVP" sessions    ii) network with fellow MVPs in person and this helps understand community more closely    iii) enjoy with fellow MVPs I had a great time with MVPs and Lead. I would like to thank Biplab and Gandharv for organizing this event  beautifull

Hidden Input HTML control with jQuery, ASP.NET and C#

In this post you will learn use of Hidden Input HTML control < input type ="hidden"....> with jQuery, also using this from ASP.NET and C#.

Jharkhand Geeks - Microsoft .NET Developer's Meed, 21 December 2014

Image
Being as a Jharkhand Geeks, Microsoft .NET User Group member I got an opportunity to take a session on Glimpse of ASP.NET MVC topic. This event was very first event ever organized in Jharkhand from developers working on Microsoft .NET platforms.

Technical reviewer of Microsoft TypeScript

Image
The very nice people at PACKT Publication recently asked me to technical review one of the upcoming new book   TypeScript , and you know I never miss such opportunities to review book and become its part. Greedily, to get reviewer name printed on book gives great feel.

Fluid Header/Footer problem when windows resized or opened on mobile (desktop view)

Image
This is a very common issue I have seen on various websites, generally in websites which is not responsive. Look at this image to understand this issue quickly.

Popular posts from this blog

Migrating database from ASP.NET Identity to ASP.NET Core Identity

Customize User's Profile in ASP.NET Identity System