国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 學院 > 開發(fā)設計 > 正文

讓Apache支持ASP.NET

2019-11-18 17:55:55
字體:
來源:轉載
供稿:網友

  Apache是目前廣泛使用的一種網絡服務器程序,不僅在UNIX/linux平臺上被大量使用,而且在Windows平臺上也有許多站點放棄了IIS而轉向Apache。.NET是微軟推出的功能強大的開發(fā)技術,其目標就是與java抗衡。asp.net非常適合于中小企業(yè)的Web應用,其性能較ASP3.0有了極大的提高。下面就介紹讓Apache支持ASP.NET的辦法。

  首先,必須要有Windows環(huán)境和.NET Framework的支持。此外還建議安裝.NET開發(fā)工具如.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環(huán)境下的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環(huán)境下的ASP.NET程序的運行速度不會比在IIS下慢。


發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 松阳县| 历史| 娄烦县| 顺义区| 夏邑县| 太和县| 正宁县| 清新县| 仪征市| 任丘市| 肥城市| 内黄县| 鹤庆县| 吕梁市| 岱山县| 东方市| 龙川县| 马山县| 汉中市| 会理县| 黔江区| 鹤壁市| 房产| 晴隆县| 资阳市| 杭锦后旗| 石渠县| 凌源市| 寿光市| 博客| 秦皇岛市| 周口市| 灵武市| 如皋市| 英山县| 上思县| 木兰县| 新闻| 湖北省| 赤峰市| 营山县|