XAMPP und ASP.NET

In meinem Studium bin ich ja – trotz gegenteiliger Meinung einiger Dozenten – fast zu 90 % auf Windows-Programme angewiesen. Deshalb habe ich mir ja vor einigen Monaten ein Thinkpad angeschafft.

Ich bin allerdings meinem Macbook Pro treu geblieben und habe nun die neueste Version der Virtualisierungssoftware «Parallels Desktop 6» installiert. Hier habe ich mir nun eine kleine Entwicklungsumgebung inkl. «XAMPP» eingerichtet, die es mir nun erlaubt, schulische Projekte auch auf meinem heimischen Rechner zu realisieren.

Als Webserver (inkl. MySQL) habe ich mich für das «XAMPP»-Package entschieden. Eine «One-Click-Lösung», die relativ leicht zu installieren ist.

Diese Lösung kann standardmässig allerdings keine ASPX bzw. «.net-Applikationen» ausführen. Hierzu sind noch folgende Schritte notwendig:

  • Den «Apache»-Server von XAMPP zuerst einmal deaktivieren
  • Download und Installation von «mod_aspdotnet» auf «SourceForge.net»
  • In die Datei «httpd.conf», welche man mit einem x-beliebigen Editor öffnen kann, schreibt man noch folgende Zeilen (Achtung, die fettgedruckten Zeilen müssen an die eigene Installation angepasst werden):


LoadModule aspdotnet_module modules/mod_aspdotnet.so
# Use the asp.net handler for all common ASP.NET file types
AddHandler asp.net asax ascx ashx asmx aspx axd config cs csproj \
licx rem resources resx soap vb vbproj vsdisco webinfo
<IfModule mod_aspdotnet.cpp>
# Mount the sampleapp example application
AspNetMount /sampleapp "C:/www/webroot/sampleapp"
# Map all requests for /sampleapp to the sampleapp application files
Alias /sampleapp "C:/www/webroot/sampleapp"
# Allow asp.net scripts to be executed in the sampleapp example
<Directory "C:/www/webroot/sampleapp">
Options FollowSymlinks ExecCGI
Order allow,deny
Allow from all
DirectoryIndex Default.htm Default.html Default.aspx
</Directory>
# For all virtual ASP.NET webs, we need the aspnet_client files
# to serve the client-side helper scripts.
# NOTICE "C:/Windows/" -- change to %systemroot%
# "C:/Windows/" for WinXP, "C:/WINNT/" for Win2k
AliasMatch /aspnet_client/system_web/(\d+)_(\d+)_(\d+)_(\d+)/(.*) \
"C:/Windows/Microsoft.NET/Framework/v$1.$2.$3/ASP.NETClientFiles/$4"
# NOTICE "C:/Windows/" -- change to %systemroot%
# "C:/Windows/" for WinXP, "C:/WINNT/" for Win2k
<Directory "C:/Windows/Microsoft.NET/Framework/v*/ASP.NETClientFiles">
Options FollowSymlinks
Order allow,deny
Allow from all
</Directory>
</IfModule>

  • Danach kann man den Server wieder starten und eine Test-ASPX-Datei aufrufen. Das ganze müsste dann laufen.

Falls es nicht laufen sollte, hilft ein Neustart des Systems bzw. von «XAMPP».