Upload large files to Web API with Javascript

We can upload large files to a REST Web API with JavaScript using FormData. Below JavaScript code snippet uploads the file selected using a standard HTML file input tag. Update the maxAllowedContentLength in web.config as per the requirement. The below snippet shows the maxAllowedContentLength set to accept upto 2GB of data. Below code snippet is…

Debugging Visual Studio Add-Ins

When a new Visual Studio Add-In project is created, it can be easily debugged just like any other project using F5 Key. But there are a few complications in debugging when a few factors change. I was working on a Visual Studio Add-In. Suddenly I was unable to debug the Add-In project. Then after some investigation I…

Calling Async Method Repeatedly in C#

When an async method needs to be called repeatedly, we need to take care of a few things. If all the data members & processing is within one method with all local variables, we could just use it as any other method. But if there are different private members, global within the class, we need…

Finding Duplicate Files in .NET

Finding if two files are exactly same is very easy in .NET. We use hash functions to check if two files are exactly same. Hash functions are algorithms that compute a hash value or checksum or digest. Hash functions always return distinct computed values for different data/parameters and same computed value every time for same…