在Apache环境下成功的运行ASP.NET
一是:在安装Apache HTTP Server的时候,如果我们机器上的80端口已被占用,需要选使用8080端口来安装那个选项,当然这个端口是可以在httpd.conf文件里修改的。只是使用这种安装方式安装好以后需要手动的启动apache2服务,使用cmd命令并进入apache安装目录,如:D:\Program Files\Apache Group\Apache2\bin,运行:apache -k install。二是:在配置aspdotnet_module的时候,我们需要在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 "J:/Working/BIVSS"
# Map all requests for /active to the application files
Alias /active "J:/Working/BIVSS"
# Allow asp.net scripts to be executed in the active example
<Directory "J:/Working/BIVSS">
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> 本来这个配置文件很简单,还有详细的注释。不过一定要注意上面的命令(非#开头的行),都需要写在一行上,如果是从网页上copy要特别的小心,特别是AddHandler和AliasMatch这两句容易被断成两行,那样启动apache服务就会失败,并且提示非常简单,根本不会告诉你配置文件加载错误。
目前,这个mod_aspdotnet模块最大的问题是在认证支持上的不足,比如windows和form都还不能支持,不过开源的东西更新还是很快的。由于使用Microsoft .NET Framework作为CLR,开发更新的压力和Mono不在一个数量级上,相信很快就能有对页面认证的较好支持。
------------------------------->网络转载
页:
[1]