|
|
【参加讨论】 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
# 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
options followsymlinks execcgi
order allow,deny
allow from all
directoryindex default.htm default.aspx
# 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"
"c:/windows/microsoft.net/framework/v*/asp.netclientfiles">
options followsymlinks
order allow,deny
allow from all
其中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下慢。
编辑:黑鹰 [发送给好友] [打印本页] [关闭窗口] [返回顶部]
上一篇:ubb的跨站脚本攻击的漏洞
下一篇:漫谈主流操作系统中可信路径安全机制
转载请注明来源:www.iyit.net
特别声明: 本站除部分特别声明禁止转载的专稿外的其他文章可以自由转载,但请务必注明出处和原始作者。文章版权归文章原始作者所有。对于被本站转载文章的个人和网站,我们表示深深的谢意。如果本站转载的文章有版权问题请联系编辑人员,我们尽快予以更正。
|
|
|