Custom ASHX File Handler for CKEditor

Migrate website

I recently discovered a vulnerability in some old .NET 4.8 web forms code that was used to provide basic file management within CKEditor (https://github.com/simogeo/Filemanager).  Since I don’t have the ability to rebuild the entire system at this time, I decided to implement a newer file manager instead (https://github.com/psolom/RichFilemanager/).  However, the ashx connector provided therein (https://github.com/psolom/RichFilemanager/blob/master/connectors/ashx/filemanager.ashx) … Read more

Get iCal Feed Using Web Service and Adjust Event Times

Migrate website

Here’s some example code to fetch a token and then an iCal feed from a 3rd party service.  Unfortunately the times are in UTC and the plugin we are using doesn’t respect the VTIMEZONE attribute, so I have to use regex to individually adjust all event times. private readonly static string tokenUrl = "https://domain:8445/token"; private … Read more

Using an External Web Service to Deliver WordPress E-mail

Migrate website

We recently discovered that Gmail doesn’t play nicely with emails that are sent from our Azure instance (which is hosting our WordPress sites).  More specifically, Gmail users don’t receive the emails sent to them. Because of this, we have developed an API that resides on a local, on-campus server, wsnet2 to send out WordPress emails. … Read more

Using ASP.NET C# to Read Data from Google Sheets

Google Sheets

In the following tutorial, we’ll be reading a Google Sheet (https://docs.google.com/spreadsheets/d/1-6XeX59-zgqi_z5Bm8dqYyO1z37tfi8Ur7o5mxmmVKo/edit?usp=sharing), porting it into an ASP.NET web site. Create a new Visual Studio ASP.NET C# project (Ctrl + Shift + N) Create a new empty web site Create a new master page, naming it site.master, and a new content page, default.aspx Visit https://developers.google.com/sheets/api/quickstart/dotnet and enable … Read more

ASP.NET security configuration tips

ASP.Net Security

67% of ASP.NET websites have serious configuration related security vulnerabilities https://www.troyhunt.com/67-of-aspnet-websites-have-serious/ Issue Description Many web developers believe that newer Microsoft development frameworks such as ASP.NET (aka .NET) including MVC, Web Forms, or .NET Core protect them from many of the security vulnerabilities present in classic ASP and other older technologies. However, this is a false … Read more