ASP.NET發布網站的二個小問題總結

來源:互聯網
上載者:User

今天在一部剛剛好的電腦上發布一個做好的網站(Net 2.0),VS2005 Team suite英文版, 裝了TFS方便團隊開發, 在VS裡面可以運行與調試, 產生也沒提示出錯, 但到發布網站那部總出現一個錯誤, 使用發布過程中斷:Index was outside the bounds of the array。

感覺有點熟悉這個錯誤, 因為好久前我就試過這問題, 後來怎解決怎也想不起,在百度與google裡找了差不多一個小時, 發現原來是差一個補丁, 真暈倒, 這時就想起來原因了。 發現工作中這些小問題還是要記下來, 以方便日後回憶。

這個補丁叫 hotfix補丁, 在Visual Studio SP1中有可能會遇到。 在這裡直接下載。

 

當這個設定完成後, 開始發布到IIS設定的目錄上。 運行發現介面十分簡結, 與我們做的完全不符。 只有一行紅色大字型與幾行小黑字型, 如下:

Server Application Unavailable
    The web application you are attempting to access on this web server is currently unavailable.Please hit the "Refresh" button in your web browser to retry your request.
  Administrator Note: An error message detailing the cause of this specific request failure can be found in the application event log of the web server. Please review this log entry to discover what caused this error to occur.

這時候去看一下日誌, 發現錯誤記錄檔中記錄 aspnet_wp.exe  (PID: 2164) stopped unexpectedly.

原因是這電腦先裝了IIS-->SQL2005-->VS2005-->VS6,因為每一個.net framework都有一個自己的aspnet_regiis版本,可能IIS上面用到的是1.1或其它的, 這裡你發布了2.0的程式來這裡運行, 沒有匹配到2.0的版本。 所以只出現幾句簡結的字型。

那隻有在運行中輸入C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis -i 安裝了aspnet。提示OK後就可以了。

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.