Skip to content

Instantly share code, notes, and snippets.

View dphoebus's full-sized avatar
😏

Daniel Phoebus dphoebus

😏
  • CaptiveAire, Inc.
View GitHub Profile
@dphoebus
dphoebus / (aspNetCore + classicASP).md
Created July 25, 2025 18:33 — forked from ktownsend-personal/(aspNetCore + classicASP).md
How to host classic ASP with your ASP.NET Core project

Host classic ASP in an ASP.NET Core 8 project

I have a situation where I need to migrate a very old classic ASP website gradually into an ASP.NET Core 8 website.

In my research I found many people asking how but never found a fully working example, so I want to share this for others.

If you end up using any of this, my only ask is that you link to this gist and give me some credit in your code for the next developer to discover... and of course tell me about how it saved your life in the gist comments ☺

Solution Summary:

  • add ISAPI handler in web.config for each file extension to process as classicASP
  • put classicASP files in wwwroot folder of your aspNetCore project

How to synchronize classicASP session with ASP.NET Core 8

This is related to my other gist where I use both ASP.NET Core 8 and classic ASP in the same website. You'll probably want to read that too if you're needing to do what I describe in this gist.

My original version of this was for MVC 5 several years ago. I have a separate gist of the MVC 5 version here. It worked so well I decided to refactor it for a new project I'm working on.

The code in this gist is fresh out of the oven. Everything I set out to do is working well, but not in production yet so there could be some edge cases I missed. Let me know if you run into something.

I dramatically changed the C# side of it for this new version because the coding strategy differs so dramatically between MVC 5 and ASP.NET Core 8. The classicASP side of it is mostly the same as the prior version asi

@dphoebus
dphoebus / Install-DotnetCliTools.ps1
Created November 7, 2023 15:58 — forked from tillig/Install-DotnetCliTools.ps1
PowerShell script for installing/updating my dotnet CLI global tools
# Tool lists:
# https://github.com/aspnet/AspNetCore/blob/master/src/Tools/
# https://github.com/natemcmaster/dotnet-tools
$tools = @(
'dotnet-counters',
'dotnet-depends',
'dotnet-dump',
'dotnet-format',
'dotnet-guid',
'dotnet-outdated-tool',
@dphoebus
dphoebus / webpack.md
Created July 28, 2023 19:15 — forked from nicolasdao/webpack.md
Basic damn Webpack config for simple transpilation ES6 to ES5

Install

npm install -D acorn babel-loader @babel/core @babel/preset-env babel-polyfill webpack webpack-cli uglifyjs-webpack-plugin --save-dev

webpack-cli and acorn are dependencies that you, unfortunately, have to install if you want to run this god damn thing without any obscure warnings or errors.

Build

Configure Webpack

@dphoebus
dphoebus / base64.inc.asp
Created June 1, 2023 17:47 — forked from matheuseduardo/base64.inc.asp
Base64 encoding / decoding functions in VbScript / Classic ASP
<%
Function Base64Encode(sText)
Dim oXML, oNode
Set oXML = CreateObject("Msxml2.DOMDocument.3.0")
Set oNode = oXML.CreateElement("base64")
oNode.dataType = "bin.base64"
oNode.nodeTypedValue = Stream_StringToBinary(sText)
Base64Encode = oNode.text
Set oNode = Nothing
Set oXML = Nothing

Error

$ sudo apt-get update
Err:1 http://archive.ubuntu.com/ubuntu focal InRelease
Temporary failure in name rerolution

$ host google.com
;; connection timed out; no servers could be reached
@dphoebus
dphoebus / .eslintrc.js
Created August 8, 2022 14:48 — forked from nkbt/.eslintrc.js
Strict ESLint config for React, ES6 (based on Airbnb Code style)
{
"env": {
"browser": true,
"node": true,
"es6": true
},
"plugins": ["react"],
"ecmaFeatures": {
@dphoebus
dphoebus / addvhost.sh
Created July 25, 2022 16:23 — forked from runbrun/addvhost.sh
bash script to create nginx virtual hosts
#!/usr/bin/env bash
#
# Nginx - new server block
# http://rosehosting.com
read -p "Enter username : " username
read -p "Enter domain name : " domain
# Functions
ok() { echo -e '\e[32m'$domain'\e[m'; } # Green
die() { echo -e '\e[1;31m'$domain'\e[m'; exit 1; }
@dphoebus
dphoebus / .NET6Migration.md
Created April 26, 2022 13:07 — forked from davidfowl/.NET6Migration.md
.NET 6 ASP.NET Core Migration
@dphoebus
dphoebus / class_logger.asp
Created March 28, 2022 17:54 — forked from CarlRevell/class_logger.asp
Simple classic ASP log to file class.
<%
'// Usage:
'//
'// dim l : set l = new logger
'// l.log("Hello")("World")
'// l.includeTimetamp = false
'// l("Lorem ipsum")
'// l.setLogFile("c:\temp\log_2.log").log("This is a new log!")
'// set l = nothing