让Apache支持ASP.NET
来源:互联网 发布:八毛门事件 知乎 编辑:程序博客网 时间:2024/05/22 03:05
首先,必须要有Windows环境和.NET Framework的支持。此外还建议安装.NET开发工具如.NET Framework SDK或者VisualStudio.NET。需要注意的是Windows的版本应为2000、2003和XP。Win9X系列不能安装.NET Framework。然后需要安装Apache。应该使用Win32平台的Apache,版本2.0以上。推荐使用2.0.51版本。下载地址:http://Apache.freelamp.com/httpd/binaries/win32/Apache_2.0.52-win32-x86-no_ssl.msi具体的安装过程请参阅其他文章,本文不再赘述。
下面要下载并安装Apache环境下的ASP.NET模块。下载地址:http://www.Apache.org/dist/httpd/mod_ASPdotNET/mod_ASPdotNET-2.0.0.msi下载完成后双击打开,一路Next即可安装完成。
为了便于管理,我们在htdocs目录下新建一个active目录,专门存放.ASPx文件。现在需要对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 "D:/Program Files/Apache Group/Apache2/htdocs/active"
# Map all requests for /active to the application files
Alias /active "D:/Program Files/Apache Group/Apache2/htdocs/active"
# Allow ASP.NET scripts to be executed in the active example
<Directory "D:/Program Files/Apache Group/Apache2/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>
其中D:/Program Files/Apache Group/Apache2是Apache的安装目录,应根据实际情况更改。现在可以在active目录下放上ASP.NET探针。重启Apache之后,即可体验Apache下的ASP.NET了。
由于IIS和Apache下的ASP.NET都是运行在Common Language Runtime(CRL)的基础上,因此Apache环境下的ASP.NET程序的运行速度不会比在IIS下慢。
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>- 让Apache支持ASP.NET
- 让Apache支持ASP.NET
- 让Apache支持ASP.NET
- 让Apache支持ASP.NET
- 让Apache支持ASP.NET
- 让Apache支持ASP.NET
- 让Apache支持ASP.NET
- 让Apache支持ASP.NET
- 让Apache支持ASP.NET-Apache,ASP.NET
- 【引用】让Apache支持ASP.NET
- 让Apache也支持ASP.NET
- 让Apache支持ASP
- 让apache支持asp、asp.net和jsp
- 让Apache支持ASP.Net(编辑转载)
- 让Windows下的Apache服务器支持ASP.NET
- 放弃IIS 让Apache也支持ASP.NET
- 彻底放弃IIS让Apache也支持ASP.NET
- 彻底放弃IIS让Apache也支持ASP.NET
- .NET泛型基础
- ASP.NET追捕休整版
- 优秀ASP.NET程序员修炼之路
- 给.net初学者的一些建议(共勉之)
- .Net开发环境配置[OS/IIS/VS...]
- 让Apache支持ASP.NET
- 手把手教你建立ASP.NET开发平台
- 30分钟正则表达式指导
- ASP.NET中Cookie编程的基础知识(6)
- ASP.NET中Cookie编程的基础知识(5)
- ASP.NET中Cookie编程的基础知识(3)
- ASP.NET中Cookie编程的基础知识(4)
- ASP.NET中Cookie编程的基础知识(2)
- ASP.NET中Cookie编程的基础知识(1)