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

首頁 > 編程 > .NET > 正文

徹底放棄IIS讓Apache也支持ASP.NET

2024-07-10 13:08:34
字體:
來源:轉載
供稿:網友

  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版本。

  下面要下載并安裝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">

  "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的安裝目錄,應根據實際情況更改?,F在可以在active目錄下放上asp.net探針。重啟apache之后,即可體驗apache下的asp.net了。

  由于iis和apache下的asp.net都是運行在common language runtime(crl)的基礎上,因此apache環境下的asp.net程序的運行速度不會比在iis下慢。

  • 本文來源于網頁設計愛好者web開發社區http://www.html.org.cn收集整理,歡迎訪問。
  • 發表評論 共有條評論
    用戶名: 密碼:
    驗證碼: 匿名發表
    主站蜘蛛池模板: 外汇| 丽水市| 台湾省| 白玉县| 昭平县| 丰台区| 新竹市| 贵州省| 呼玛县| 仲巴县| 晋宁县| 宜都市| 察哈| 民乐县| 龙川县| 区。| 太谷县| 韶山市| 昭通市| 郑州市| 景洪市| 安阳市| 五峰| 乡城县| 阜平县| 慈利县| 永寿县| 河北区| 吉林市| 德州市| 馆陶县| 乐亭县| 津南区| 城固县| 抚顺县| 磴口县| 辽阳县| 志丹县| 桦甸市| 怀来县| 宁都县|