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.asporindex.asp; both are recognised automatically. If you also have anindex.htmorindex.phpthere, IIS may pick that one first, so remove it or set the order inweb.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:
- Save every
.aspfile as UTF-8 in your editor (in VS Code: click the encoding in the status bar → Save with Encoding). - 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" %>
- Add
<meta charset="utf-8">in the HTML<head>. - In MS SQL, store text in
nvarcharcolumns and useN'…'literals in SQL; in MySQL, useutf8mb4.
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
SQLOLEDBconnection 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 inApp_Dataso it can't be downloaded, and open it withServer.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
| Error | Fix |
|---|---|
| The Include file … cannot contain ‘..’ | Use #include virtual with a path from the root |
| Server.CreateObject Failed / Invalid class string | The COM component isn't installed; replace it (see Step 5) |
| Data source name not found | Replace the DSN with a full connection string |
| Variable is undefined | Option Explicit is on; declare the variable with Dim |
| Garbled Bangla text | Save 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.
Categories
Written by
FimuroHost Team
Technical Writer