Moq in Asp .Net core

UPDATE on 15th October 2016: Moq for .Net core is now available on Nuget and you can get it via below command: It means the setting mentioned below are not required now. UPDATE on 20th October 2016: Moq Nuget version 4.6.38-alpha worksfor .Net core- but e.g. 4.5.3 doesn't work, that complains that Moq 4.5.3 supports … Continue reading Moq in Asp .Net core

WebCrawler in C# (.Net)

  I have recently wrote code for WebCrawler in C#. You can find code here at Github. This is basically used to crawl on start and it would stop once it is stopped. Please go through readme section for more details Let me know for more details. Happy coding!

Upload file in MVC 6 (ASP.NET Core 1.0)

There are many ways to upload files in MVC 6. Below code is the simplest way I found till now, If I get any other simpler method then I will update this code. view (cshtml) : <form method="post" asp-action="Upload" asp-controller="Home" enctype="multipart/form-data"> <input type="file" name="file" /> <input type="submit" value="upload"/> </form> controller (cs) : [HttpPost] public IActionResult … Continue reading Upload file in MVC 6 (ASP.NET Core 1.0)

2015 in review

The WordPress.com stats helper monkeys prepared a 2015 annual report for this blog. Here's an excerpt: A New York City subway train holds 1,200 people. This blog was viewed about 7,000 times in 2015. If it were a NYC subway train, it would take about 6 trips to carry that many people. Click here to … Continue reading 2015 in review

Getting a Configuration Value in ASP.NET 5 (vNext) and MVC 6

As you might already know that things has been bit changed for reading appSettings in MVC 6 and Asp.Net 5. We will go step by step how to achieve this. First of all as we were used to add Application settings in Web.config till now. But now onwards we need to add these key value … Continue reading Getting a Configuration Value in ASP.NET 5 (vNext) and MVC 6

Github WebHooks handler using Asp .Net

In previous post we have seen WebHooks handler for Instagram here. In this post we will see WebHooks handler for Github. Github gives very powerful support to the developers. Currnetly there are more than 20 events supported by Github which includes Wildcard Event. What is Wildcard Event? When you add the wildcard event, it will be replaced by any … Continue reading Github WebHooks handler using Asp .Net

WebHooks in Asp.Net : A Visual Studio Extension

Before couple of weeks Asp.Net team has announced to support Web Hooks with Visual Studio. First of all let us see What is WebHooks? A WebHooks in web development is a method of augmenting or altering the behavior of a web page, or web application, with custom callbacks. These callbacks may be maintained, modified, and managed … Continue reading WebHooks in Asp.Net : A Visual Studio Extension

Agile with TFS 2015(Team Foundation Server)

Team foundation Server 2015 is out last month with tremendous new features. First of all let us see basic introduction for those who does not know what is TFS or those who did not work with TFS. Team Foundation Server (commonly abbreviated to TFS) is a Microsoft product which provides source code management (either via … Continue reading Agile with TFS 2015(Team Foundation Server)

Unit testing in Asp .Net 5(vNext) and mvc 6 using XUnit

In this post we will see how to create Unit tests for Asp. Net 5 (vNext) projects. We will go step by step. First of all Let us see what is xUnit? xUnit.net is a free, open source, community-focused unit testing tool for the .NET Framework. Written by the original inventor of NUnit v2, xUnit.net … Continue reading Unit testing in Asp .Net 5(vNext) and mvc 6 using XUnit

Enable CORS in Asp .Net 5(vNext) and MVC 6

Before going for the basic question "What is CORS?", Let us take a scenario related to that. Let us start from very basic example. Suppose there are 2 URLs which are as below: http://Alphabet.com/abc.html http://Alphabet.com/xyz.html Here above both URLs looks almost same so let us call it "same origin". Now, after making little twist we … Continue reading Enable CORS in Asp .Net 5(vNext) and MVC 6