手頭有幾個網站程式,想搭起來看一下,於是安裝IIS,可系統偏偏是xp home,
按照網上的說明嘗試裝IIS,好歹裝上了可是不好使,看來xp home是不支援IIS,於是轉向Apache。
下載安裝好Apache 2.2.9 http://www.apache.org/,一切正常,又發現不支援asp和.net的程式,暈;
google一番,找到Sun Java System Active Server Pages 4.0 http://www.sun.com/software/chilisoft/,
下載下來安裝好,重啟機器,ok,asp沒問題了;
繼續google,找到Apache下面的一個項目mod_aspdotnet,發現Apache已經不支援此項目了,
此項目改投sourceforge,mod_aspdotnet-2.2.0 http://sourceforge.net/projects/mod-aspdotnet,
下載安裝,修改apache的httpd.conf,在最後添加
#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
<IfModule mod_aspdotnet.cpp>
# Mount the ASP.NET example application
AspNetMount /active "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/active"
# Map all requests for /active to the application files
Alias /active "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/active"
# Allow asp.net scripts to be executed in the active example
<Directory "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/active">
Options FollowSymlinks ExecCGI
Order allow,deny
Allow from all DirectoryIndex Default.htm Default.aspx
</Directory>
# 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
</Directory>
</IfModule>
以上部分代碼,注意不要有空行,相關路徑按照實際情況填寫
又又發現此版本只支援.net framework1.1,於是卸掉2.0重裝1.1,ok了,只是對.net 2.0的文法不支援。
最終測試成功的環境
windows xp home edition
apache 2.2.9
sun one asp 4.0
.net frmawork 1.1
mod_aspdotnet 2.2.0
萬惡的microsoft