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

首頁 > 編程 > .NET > 正文

讓Apache支持ASP.NET-Apache,ASP.NET

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

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

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

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 库尔勒市| 大英县| 常山县| 台中县| 宁远县| 朔州市| 杭锦旗| 望奎县| 博乐市| 阳东县| 应用必备| 临邑县| 温宿县| 灵璧县| 惠州市| 泰兴市| 贵溪市| 襄樊市| 延津县| 五河县| 盖州市| 澎湖县| 台北市| 博野县| 岳西县| 湖南省| 司法| 江安县| 广宁县| 府谷县| 松阳县| 乐至县| 辽宁省| 安义县| 娄底市| 瑞安市| 澎湖县| 光泽县| 凉山| 南丹县| 衡水市|