网络编程 | 站长之家 | 网页制作 | 图形图象 | 操作系统 | 冲浪宝典 | 软件教学 | 网络办公 | 邮件系统 | 网络安全 | 认证考试 | 系统进程
Firefox | IE | Maxthon | 迅雷 | 电驴 | BitComet | FlashGet | QQ | QQ空间 | Vista | 输入法 | Ghost | Word | Excel | wps | Powerpoint
asp | .net | php | jsp | Sql | c# | Ajax | xml | Dreamweaver | FrontPages | Javascript | css | photoshop | fireworks | Flash | Cad | Discuz!
当前位置 > 网站建设学院 > 网络编程 > ASP.NET教程
Tag:注入,存储过程,分页,安全,优化,xmlhttp,fso,jmail,application,session,防盗链,stream,无组件,组件,md5,乱码,缓存,加密,验证码,算法,cookies,ubb,正则表达式,水印,索引,日志,压缩,base64,url重写,上传,控件,Web.config,JDBC,函数,内存,PDF,迁移,结构,破解,编译,配置,进程,分词,IIS,Apache,Tomcat,phpmyadmin,Gzip,触发器,socket
网络编程:ASP教程,ASP.NET教程,PHP教程,JSP教程,C#教程,数据库,XML教程,Ajax,Java,Perl,Shell,VB教程,Delphi,C/C++教程,软件工程,J2EE/J2ME,移动开发
本月文章推荐
.[视频]Visual Studio 2005入门之.
.[视频]Visual Studio 2005入门之.
.[视频]Visual Studio 2005入门之.
.[视频]Visual Studio 2005入门之.
.[视频]Visual Studio 2005入门之.
.[视频]vs2005入门之第一章小结考.
.ASP.NET讲座(6)-ASP.NET的几种主.
.IIS5 IIS6 IIS7的ASP.net 请求处.
.[视频]Visual Studio 2005入门之.
.[视频]Visual Studio 2005入门之.
.ASP.NET中Cookie编程的基础知识(.
.ASP.NET讲座(5)-数据库的操作ADO.
.[视频]vs2005入门之数据类型转换.
.学习掌握.NET的第一步.
.[视频]Visual Studio 2005入门之.
..Net开发环境配置[OS/IIS/VS...].
.[视频]Visual Studio 2005入门之.
.[视频]Visual Studio 2005入门之.
.十天学会ASP.net之第三天.
.ASP.NET中Cookie编程的基础知识.

让Apache支持ASP.NET

发表日期:2006-2-23


  Apache是目前广泛使用的一种网络服务器程序,不仅在UNIX/LINUX平台上被大量使用,而且在Windows平台上也有许多站点放弃了IIS而转向Apache。.NET是微软推出的功能强大的开发技术,其目标就是与Java抗衡。ASP.NET非常适合于中小企业的Web应用,其性能较ASP3.0有了极大的提高。下面就介绍让Apache支持ASP.NET的办法。

  首先,必须要有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下慢。

上一篇:30分钟正则表达式指导 人气:19251
下一篇:.Net开发环境配置[OS/IIS/VS...] 人气:13370
浏览全部ASP.NET的内容 Dreamweaver插件下载 网页广告代码 祝你圣诞节快乐 2009年新年快乐