Ajax file upload with ASP.NET5

Posted by Anuraj on Thursday, October 15, 2015 Reading time :1 minute

aspnet5 jquery codeproject

This post is about uploading files to ASP.NET 5 web application using HTML5 file API. Most of the HTML5 File upload examples are using the “HttpContext.Current.Request.Files” which is not implemented in the ASP.NET5. The alternative is to use IFormFile, it is working fine, if you are using the normal Form - File upload combination. But in case of Ajax file upload it is not working. Later I found a SO post, which talks about File upload in ASP.NET5. It is mentioned like you need to read the body contents and save it using file stream. But when I did that, it was also not working. Later I found that the body contains the filename and content type information as well like this.

Minimal ASP.NET MVC 6 Application

Posted by Anuraj on Friday, October 2, 2015 Reading time :1 minute

aspnet5 mvc6

Today in ASP.NET forums someone asked a question like a minimal MVC 6 application, where the controller method returns a simple string. For an ASP.NET 5 project, you require minimum two files, project.json, references required for the project and startup.cs, entry point and services configuration. Since it is MVC6 application you require one controller as well.

Using Typescript in aspnet5

Posted by Anuraj on Friday, October 2, 2015 Reading time :1 minute

aspnet5 Typescript

This post is about using Typescrit in ASP.NET 5. TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. Any browser. Any host. Any OS. Open Source. Since ASP.NET can run on any platform, this post is not using Visual Studio, but using Visual Studio code, you can do this using command line as well.

Generic repository in aspnet5

Posted by Anuraj on Thursday, October 1, 2015 Reading time :3 minutes

aspnet5 design pattern C# CodeProject

In this post, I am explaining generic repository pattern using EF7. The Repository Pattern is a common construct to avoid duplication of data access logic throughout our application. The purpose of the repository is to hide the details of accessing the data. We can easily query the repository for data objects, without having to know how to provide things like a connection string. The Repository pattern adds a layer between the data and domain layers of an application. It also makes the data access parts of an application better testable.

Bye bye Wordpress, welcome Jekyll

Posted by Anuraj on Sunday, September 27, 2015 Reading time :1 minute

jekyll wordpress

Due to some technical issues, I am migrating my blog from WordPress to Jekyll. I am trying to migrate old posts as well, but I am not sure. I sincerely apologize for the inconvenience. Initially I thought of creating the blog again in Azure, but I am using MSDN subscription from my company, so I thought of using some other and I found github pages, where I created my page long back.

How to implement reCaptcha for ASP.NET 5

Posted by Anuraj on Sunday, September 13, 2015 Reading time :2 minutes

.Net ASP.Net ASP.Net MVC Javascript

This is post is about integrating Google reCaptcha for ASP.NET 5. To use reCaptcha in your website, you need to register in the reCaptcha website. You need to provide the label, domain name and email address of the owners.

Implementing basic Captcha in ASP.NET 5 MVC 6

Posted by Anuraj on Wednesday, September 2, 2015 Reading time :1 minute

.Net ASP.Net ASP.Net MVC HTML5 Javascript

Long back I wrote some posts about implementing captcha in ASP.NET MVC. This post is about implementing captcha in ASP.NET5 MVC 6.
BMC logoBuy me a coffee

Copyright © 2020 - Anuraj P. Blog content licensed under the Creative Commons CC BY 2.5 | Unless otherwise stated or granted, code samples licensed under the MIT license. This is a personal blog. The opinions expressed here represent my own and not those of my employer. Hosted with ❤ by GitHub