Apache服务器配置运行ASP.NET环境 - Apache - 服务器之家

服务器之家

专注于服务器技术!
当前位置:首页 > Web服务器 > Apache

Apache服务器配置运行ASP.NET环境

发布时间:2013-08-23 来源:服务器之家

1首先用于.net 的部分环境 在这里我不多少了 自己去找找吧
2下载 apache_2.2.9-win32-x86-no_ssl-r2.msi
3下载 ASP.NET模块 mod_aspdotnet-2.2.0.2006-setup-r2 Apache.msi

安装就不多说了
一直next 就ok 装完后

在htdocs 下新建个文件夹 名字为afishman
需要配置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 /afishman "D:/Program Files/Apache Software Foundation/Apache2.2/htdocs/afishman"
# Map all requests for /afishman to the application files
Alias /afishman "D:/Program Files/Apache Software Foundation/Apache2.2/htdocs/afishman"
# Allow asp.net scripts to be executed in the afishman example
<Directory "D:/Program Files/Apache Software Foundation/Apache2.2/htdocs/afishman">
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>

然后重新启动服务 然后再afishman 文件夹子中放入我们的apsx网站 
然后输入http://localhost/afishman/自己的页面.aspx  就ok
红色为注意的地方