Wenn es tatsächlich unvermeidlich ist und der Apache das Interpretieren von ASP-Dateien lernen muss, gibt es folgende Möglichkeit:
- Download von Mod_AspDotNet
- Download vom MS .NET Framework
Installation auf Apache 2.0.54:
Falls der Server gestartet ist, bitte beenden.
Bei der XAMPP-Installation befindet sich unter apache im conf-Verzeichnis die Datei "httpd.conf", z.B. kann der Pfad so lauten : "D:\webserver\xampp\apache\conf\httpd.conf."
Diese Datei muss in einer Texteditor ergänzt werden. Folgenden Code am Ende anfügen und anschliessend abspeichern:
#asp.net
LoadModule aspdotnet_module "modules/mod_aspdotnet.so"
AddHandler asp.net asax ascx ashx asmx aspx axd config cs csproj licx rem resources resx soap vb vbproj vsdisco webinfo
# Mount the ASP.NET /asp application
AspNetMount /SampleASP "c:/SampleASP"
#/SampleASP is the alias name for asp.net to execute
#"c:/SampleASP" is the actual execution of files/folders in that location
# Map all requests for /asp to the application files
Alias /SampleASP "c:/SampleASP"
#maps /SampleASP request to "c:/SampleASP"
#now to get to the /SampleASP type http://localhost/SampleASP
#It'll redirect http://localhost/SampleASP to "c:/SampleASP"
# Allow asp.net scripts to be executed in the /SampleASP example
Options FollowSymlinks ExecCGI
Order allow,deny
Allow from all
DirectoryIndex index.htm index.aspx
#default the index page to .htm and .aspx
# For all virtual ASP.NET webs, we need the aspnet_client files
# to serve the client-side helper scripts.
AliasMatch /aspnet_client/system_web/(\d+)_(\d+)_(\d+)_(\d+)/(.*) "C:/Windows/Microsoft.NET/Framework/v$1.$2.$3/ASP.NETClientFiles/$4"
Directory "C:/Windows/Microsoft.NET/Framework/v*/ASP.NETClientFiles">
Options FollowSymlinks
Order allow,deny
Allow from all
#asp.net
Wichtig
Der Pfad c:/SampleASP muss existieren, d.h. entweder einen entsprechenden Ordner unter "c" anlegen oder im o.g. Code die Pfade ändern, wenn der Ordner woanders liegen und/oder anders heissen soll.
Jetzt kann der Apache wieder neu gestartet werden. Als Test kann man die angehängte Datei namens "index.aspx" unter localhost/SampleASP/index.aspx im Browser ansehen.