Classic asp on linux

Running a classic ASP website on Ubuntu 12.04

I will start the conversion of an old web site programmed on Classic ASP to PHP. I’d like to run and test the ASP scripts locally.

So, how can I run these ASP scripts in my Linux Ubuntu 12.04 (w/ LXDE) system?

I know I can use a VM in Virtual Box and install the stuff there. If this is the only solution, maybe I’ll do that.

Perhaps someone will suggest something on Wine. I don’t know.

But I would prefer if there is something that can run natively, as PHP itself runs. ideally I would configure my NginX HTTP server similarly as I do for the PHP files.

I wonder if such an installable Linux version of classic ASP exists. does it?

1 Answer 1

I know back in the day (and we’re talking about fourteen years ago, when I was using ASP) there were alternative implementations of ASP. The most famous and the only one I’ve ever seen running on not-Windows was ChiliSoft ASP.

But ChiliSoft were gobbled up by Sun. Sun killed off ChiliSoft’s product but imbibed its soul and capabilities into Sun Server One. More time occurred and Sun were eaten by Oracle. Somewhere in that time the product died. Even if it does somehow exist still, I would bet a large pot of money on it not being maintained, let alone compatible with Linux 2.6+.

ASP is ancient.

I shouldn’t need to point that out but I need to highlight that nobody has considered it worthy of promoting in over a decade, let alone waste a ton of time reimplementing such a horribly limited language and framework.

There may be the possibility of getting an alternative implementation running under Wine. Or even a native one — but if your legacy code uses anything like an ODBC database (kids these days won’t have a clue what I’m talking about), you’re going to be stuffed.

The easiest way to deal with this is to just mirror your stack from 10 years ago. Bung a copy of Win2k on Virtualbox, and just host it the way it was designed for. Do your porting and then move all the files onto a flash drive (or Iomega Zip Disk if you hate anachronisms), tape that to a heavy rock and then and drop that baby in the ocean.

Note: Packages like Apache::ASP are red herrings. There are plenty of modules that give ASP-like interpretation. Apache::ASP gives a Perlscript-like spin on the whole thing but it won’t let you run VBScript.

Note 2: ModVB exists but seemingly hasn’t been touched since its inception in 2003. And that is based on mod_gb from 2002 which has had similarly low activity in the past decade. I’m not sure either of these would work with a modern Apache and you’ve still got ancillary issues (eg databases) still.

Note 3: You could also reimplement ASP yourself with a home-made parser written in whatever language you like. Most languages that have been around a while have language parsers. It’d probably be slower and buggier but it might be enough to actually run something. But seriously, if you’re even considering this, you’re very silly. Please just reimplement your site in a current language.

Источник

Читайте также:  Windows 10 не видит ресурсы samba

Is it possible to install ASP on Linux Ubuntu Hardy?

I have recently purchased a VPS from Slicehost with Ubuntu Hardy installed. Is it possible to set up the server to work with ASP? I have no idea if this is possible, but if it is, does anyone have any good tutorials?

3 Answers 3

The answer is a big «it depends».

Are you talking about Classic ASP?
Sun has (had?) a product out called «SunOne ASP» — though the product changed names so many times I couldn’t say what it really is other than the original ChiliSoft ASP product bought and re-named by Sun.

Anyway, the aforementioned product would allow you to run ClassicASP/VBScript code on a *nix server, and for the most part would run it well. It was a little fussier about certain things, and there were certain things that didn’t work quite right, but if you were hell-bent on doing it you could make it work. Having said all that, I think I read somewhere that the project was discontinued. So it may not be available anymore.

There’s also an Apache:ASP module that (in my experience) only works with code written with it in mind. If you’re trying to port an application from a Windows server, its one of those «split your risk» options.

Are you talking about ASP.NET?
If this is the case, you’ve got a better chance. the aforementioned Mono Project would be your best bet. Its come a long way since I last looked at it, but having not had to set anything up with it I really can’t speak to how good/bad it is.

All things being equal.
All things being equal, I would really say that if you’re going to use an MS programming language, run it on an MS server. It may cost a little extra, but it will probably save you more headaches in the long run.

Источник

Running ASP Classic and .NET on Linux

I’m looking at a product that was coded in a mix of .NET and ASP Classic. I’m wondering if it’s possible to get this running in Linux? I’ve heard of Mono (which can supposedly run .NET on Linux) and Sun Java Web Server (which can supposedly run ASP Classic on Linux). Are there any other technologies that you would recommend?

Also, are there any major pitfalls that I should be aware of?

3 Answers 3

Mono works great for ASP.NET. They have an entire site dedicated to ASP.NET on Mono.

Probably the best resource for things to watch for is the Guide to Portion ASP.NET to Mono page. It walks through the changes required (if any) to get an ASP.NET project to run on Mono.

Mono does not, however, support ASP Classic. The best option I’ve heard for that is Apache::ASP, although it does have limitations, such as not handling VBScript or JScript without 3rd party, commercial tools.

Getting it running on Windows is going to be tough enough, when you consider that the version of Windows / IIS it was developed on are probably no longer supported.

Does your application have extensive auto tests? I’d hazard a guess at probably not.

The best bet for getting it working is to (If your ops team will permit it) buy licences for the ancient version of windows it was built for, and run that on VMs on whatever OS you want to use on your hardware.

The old version of Windows your app was written for (e.g. Windows 2000 server) probably won’t work on modern hardware, or at best will be unsupported by your hardware vendor. Therefore you have no option but to either run the app on a newer Windows (Bad; this will introduce subtle bugs that you cannot test) or run it on a legacy Windows in a VM.

Читайте также:  Minecraft windows 10 logo

If the application is to be exposed to the internet, running an old version of Windows (even fully patched) is not really a good idea.

Rather than trying to put a round peg into a square hole, try to work out the minimum-risk way of continuing to run the legacy app while your development team fix it, develop auto-tests etc.

Источник

Is it possible to run asp on linux with Apache?

The production environment is now LAMP,

I don’t know whether it’s possible to serve asp requests on it.

3 Answers 3

Whether or not a specific ASP program will run is a different story.

Same as a previous question: The answer is a big «it depends».

Are you talking about Classic ASP?
Sun has (had?) a product out called «SunOne ASP» — though the product changed names so many times I couldn’t say what it really is other than the original ChiliSoft ASP product bought and re-named by Sun.

Anyway, the aforementioned product would allow you to run ClassicASP/VBScript code on a *nix server, and for the most part would run it well. It was a little fussier about certain things, and there were certain things that didn’t work quite right, but if you were hell-bent on doing it you could make it work. Having said all that, I think I read somewhere that the project was discontinued. So it may not be available anymore.

There’s also an Apache:ASP module that (in my experience) only works with code written with it in mind. If you’re trying to port an application from a Windows server, its one of those «split your risk» options.

Are you talking about ASP.NET?
If this is the case, you’ve got a better chance. the aforementioned Mono Project would be your best bet. Its come a long way since I last looked at it, but having not had to set anything up with it I really can’t speak to how good/bad it is.

All things being equal.
All things being equal, I would really say that if you’re going to use an MS programming language, run it on an MS server. It may cost a little extra, but it will probably save you more headaches in the long run.

Источник

Установка Asp.Net на Linux (nginx+mono+xsp)

В этой статье я покажу, как настроить простую связку nginx + Asp.Net. Под простой надо понимать, что какие-то специфические особенности проектов, разграничение прав пользователей, высокие нагрузки и т.п. нужно настраивать отдельно (особенно это касается Asp.Net). Статья написана по просьбе хабраюзера mace.

В свое время озадачившись проблемой хостинга маленьких Asp.Net-проектов я осознал одну простую вещь: покупать лицензию на Windows Server, а потом и арендовывать достаточно мощный выделенный/виртуальный сервер для каких-то домашних поделок/экспериментов — крайне неразумно. Решение как-то сразу всплыло в моей лысой голове: есть же Mono! Непродолжительный поиск по mono-project.com вывел на FAQ об Asp.Net. Фактически, документация показала мне три возможных варианта:

You need the Mono runtime and use one of Apache with mod_mono, a CGI or FastCGI-aware web server with Mono’s FastCGI support or the xsp standalone server (all available from our downloads page).

Быстрый анализ интернета, для выбора одного из этих способов, привел меня к статье Максима Крентовского (mkrentovskiy), это достаточно забавно, т.к. спросить у Максима в аське я почему-то не догадался.

Читайте также:  Удаление windows с вирусами

Выводы Максима показались мне достаточно убедительными. Я не стал проводить какие-то дополнительные тесты или искать другие источники, для моей задачи ответ был уже очевиден: nginx + xsp. Учтите, в wiki Mono сказано, что xsp надо использовать для отладки и разработки!

Установка nginx

Итак, мы имеем свежеустановленный Debian Squeeze x64 Minimal. Самый простой вариант установки последних версий nginx — установка из репозиториев dotdeb.org. Кстати, очень хороший репозиторий: в нем, помимо nginx , всегда последние версии php , mysql (percona) и redis . Чуть сложнее установить из исходников — об этом чуть ниже.

Добавим в sources.list новый репозиторий, пропишем GnuPG-ключ и обновим источники:

Если все сделано правильно, то на команду apt-cache policy nginx мы увидим следующее:

Существует три разных пакета, собранных с разными наборами модулей: nginx-lite, nginx-full (пакет nginx как раз его алиас) и nginx-extras. Какой устанавливать — решать вам, нам бы хватило и lite версии (Proxy есть и ладно), но на момент написания статьи я уже установил full, поэтому будем устанавливать его:

Вот и все шаги для установки из пакетов.

Если вы устанавливаете nginx из исходников, то ./configure надо запускать с такими параметрами:

Это будет практически соответствовать пакету nginx-full , за исключением отсутствия сторонних модулей Upstream Fair Queue и Echo.

Установка Mono

Для Mono таких удобств с репозиториями нет, придется сразу компилировать последние исходники.

upd. Как справедливо заметил Net_Rat, я немного слукавил: можно подключить экспериментальный репозиторий и через pining настроить установку mono и xsp оттуда.

Качаем последние исходники mono и xsp (на момент написания 2.10.2):

Теперь распакуем архивы:

Если tar ругнется на отсутствие bzip2 (в minimal точно ругнется), его нужно поставить:

Для компиляции mono и xsp нам понадобится следующее:

Приступим к конфигурированию и компиляции (процесс непосредственно компиляции может занять продолжительное время, до 20-30 минут):

Если установка прошла успешно, то запуск команды mono —version покажет нам заветное и долгожданное:

Теперь установим xsp:

Весь xsp написан на C#, компиляция должна пройти очень быстро. Проверим, что оно нам выдаст:

Похоже, все схватилось. Пора переходить к настройке.

Настройка Xsp

Создадим директорию нашей будущей странички Hello World:

Сразу создадим классический «Hello World» для пробы:

В файле напишем следующие строки:

Поскольку xsp изначально задумывался как тестовый сервер, скриптов запуска демона там нет. Будем исправлять такую ситуацию. Создадим файл /etc/default/xsp , и запишем в него переменные по-умолчанию:

Создадим файл /etc/init.d/xsp , дадим ему права на выполнение ( chmod +x /etc/init.d/xsp ) и в него напишем:

В скрипте запуска так же имеется закомментированная строка для папки с тестами из дистрибутива xsp , для более полноценной картины.

Добавим его в автозапуск с дефолтными уровнями запуска (поправить по надобности) и запустим наш новый демон:

По-умолчанию, сервер слушает на всех интерфейсах, проверить легко:

Если перейти по http://serveraddr:8080/ можно увидеть долгожданное «Hello World»:

А если вы переключите на тестовую страницу xsp, то:

Настройка nginx

Суть настройки nginx в проксировании обращений только для asp-файлов. Остальные статические файлы должен раздавать nginx . Не мудрствуя особо сильно, возьмем конфигурацию, которую предложил Максим Крентовский в своей статье и чуть-чуть изменим под наш случай:

Как управлять виртуальными хостами nginx лучше всего знает гугл.

Открыв http://serveraddr.ru/ получаем долгожданное «Hello World»:

Или, для тестовых настроек:

Вот и все. Повторюсь, что в wiki Mono ясно указано, что xsp лучше использовать для тестов!

Это мой первый пост на хабре, прошу не кидать в меня кирпичи и другие булыжники… Буду очень рад любой критике, как по содержанию статьи, так и по орфографии с пунктуацией. И да, я мог ошибиться с выбором блога. Если так — скажите куда лучше поместить.

Источник

Оцените статью