4 min read Sep 26, 2026

Running a Classic ASP Website on Windows Hosting

Get an old Classic ASP (.asp) site working on Windows Hosting: includes, UTF-8 and Bangla text, sessions, databases, email and fixing common VBScript errors.

FimuroHost Team

FimuroHost Team

Technical Writer

Share Article

Classic ASP (.asp pages written in VBScript) still powers many older business sites, and it runs on FimuroHost Windows Hosting without any setup. It doesn't use the .NET runtime, so the app pool's .NET version doesn't affect it.

Moving an old site from an ageing server usually needs a few small changes. This guide walks through them.

Step 1: Upload the site

  • Upload everything to your web root (normally public_html) with FTP, keeping the folder structure. See Uploading Files to Windows Hosting.
  • The home page can be Default.asp or index.asp; both are recognised automatically. If you also have an index.htm or index.php there, IIS may pick that one first, so remove it or set the order in web.config.

Step 2: Fix includes that use ../

Parent paths are disabled, so <!--#include file="../inc/header.asp"--> fails with an error about “..”. Change these to virtual includes that start from the site root:

<!--#include virtual="/inc/header.asp"-->

Details and a quick search-and-replace approach: Classic ASP: Parent Paths and Showing Detailed Errors. Code that calls Server.MapPath("../data") needs the same fix: use Server.MapPath("/data").

Step 3: Get UTF-8 and Bangla text right

Old sites often use Windows-1252 encoding, which turns Bangla and other non-English text into question marks or garbled characters. To use UTF-8 throughout:

  1. Save every .asp file as UTF-8 in your editor (in VS Code: click the encoding in the status bar → Save with Encoding).
  2. Put this on the first line of each page (or of a shared include that runs first):
<%@ Language="VBScript" CodePage="65001" %>
<%
Option Explicit
Response.CodePage = 65001
Response.CharSet = "UTF-8"
%>
  1. Add <meta charset="utf-8"> in the HTML <head>.
  2. In MS SQL, store text in nvarchar columns and use N'…' literals in SQL; in MySQL, use utf8mb4.

Option Explicit makes VBScript complain about undeclared variables, which catches typos that would otherwise fail silently. Add it to new code; on an old site, turn it on page by page as you fix each one.

Step 4: Connect the database

  • MS SQL: use an SQLOLEDB connection string with the server name from StackCP; see Create an MS SQL Database and Connection Strings.
  • MySQL: use the MySQL ODBC driver; see Using MySQL on Windows Hosting.
  • Microsoft Access (.mdb): keep the file in App_Data so it can't be downloaded, and open it with Server.MapPath("/App_Data/site.mdb"). Access is fine for small, low-traffic sites, but it struggles with several visitors writing at once. If your connection fails with a provider or driver error, ask support which Access driver is available, and consider moving the data to MS SQL or MySQL.

Replace old DSN-based connections (DSN=mysite) with full connection strings; DSNs set up on your old server don't exist here.

Step 5: Sending email

Components such as CDONTS, ASPEmail or JMail from old servers usually aren't available. Rewrite mail code to use the built-in CDOSYS (CDO.Message) with authenticated SMTP; there is a complete example in How to Send Email from ASP.NET and Classic ASP.

The same applies to other third-party COM components (upload components, image resizers): you can't install your own on shared hosting. Ask support whether a component you rely on is available before migrating, or replace it with pure-VBScript code or a small ASP.NET page.

Step 6: Sessions

Classic ASP sessions are kept in the memory of the app pool, with a default timeout of 20 minutes. You can change it per page with Session.Timeout = 30. Sessions are lost if the app pool recycles (for example when you change web.config), so don't use them for anything that must survive, such as a shopping basket; store that in the database instead.

Step 7: Seeing errors while you test

By default, visitors see “An error occurred on the server when processing the URL”. While you test, turn on detailed errors (as described in the parent paths article) to see the file and line number, and turn them off again when you finish.

Common errors

ErrorFix
The Include file … cannot contain ‘..’Use #include virtual with a path from the root
Server.CreateObject Failed / Invalid class stringThe COM component isn't installed; replace it (see Step 5)
Data source name not foundReplace the DSN with a full connection string
Variable is undefinedOption Explicit is on; declare the variable with Dim
Garbled Bangla textSave files as UTF-8 and set CodePage 65001 (Step 3)

Need help?

If something doesn't work as described, open a support ticket from your client area or message us on WhatsApp at 01818160926. Tell us the page URL and the error text, and which components your old server used if you know.

FimuroHost Team

Written by

FimuroHost Team

Technical Writer