在win2003上IIS部署可能出現的問題的解決方案


一、在IIS上部署運行多個版本的ASP.NET Framework

在瀏覽器中,請求失敗的錯誤提示信息:

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.

注意:

web服務器請求失敗的具體錯誤原因,可以在事件查看器中找到。請檢閱應用程序日志來找出是什么導致了這個錯誤的發生。

1

我們會發現在事件查看器中這個錯誤的 Event ID為1062,下面是錯誤的具體信息:
"在同一 IIS 進程中不可能運行兩個不同的 ASP.NET 版本。請使用 IIS 管理工具重新配置服務器以在一個單獨的進程中運行應用程序。"
2

錯誤原因

假設一台服務器上需要部署.net2.0和.net4寫的不同的Web應用程序,IIS6要求不同版本的Framework的Web應用程序,在其自己的應用程序池。假設有應用程序池1,應用池2,應用池1中可以運行多個Framework為.net2的Web應用程序,但是應用池1中不能有Framework為,net4的Web應用程序,否則會提示上述錯誤。同理,如果應用池2中,已經有.Net4的Web應用程序,這個應用池中就不能放有其他版本的Web應用程序,否則會錯誤。(而在IIS5,暫時沒有發現這個限制)
解決方案:
慶幸的是,解決的辦法也很簡單。只要創建一個應用程序池,然后將.net4的Web應用程序轉移到新的應用池即可。一旦我們將網站或虛擬目錄轉移到新的應用程序池,我們就可以着手將Web應用程序升級到新的.Net Framework版本。請參照下面的操作步驟進行應用池的創建和轉移。

4

5

 

二、.NET 4.0 IIS服務器報錯Unable to find messages file 'cscui.dll

錯誤的提示信息:

Compilation Error 
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. 
Compiler Error Message: CS2018: Unable to find messages file 'cscui.dll'
Source Error:
[No relevant source lines]
Source File: Line: 0
 

 

解決辦法:如下圖所示,進行操作

6

三、在發布ASP.NET網站的時候,出現state server錯誤

錯誤的原因:

ASP.NET State Server 服務關閉了,開啟即可。ASP.NET State Server服務默認是手動開啟的, 所以很多時候在服務器重啟后,ASP.NET State Server 服務其實是停止狀態的,最好將該服務設成自動啟動。

 
 

Server Error in '/' Application.
--------------------------------------------------------------------------------
  Unable to make the session state request to the session state server. Please ensure that the ASP.NET State service is started and that the client and server ports are the same. If the server is on a remote machine, please ensure that it accepts remote requests by checking the value of HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\aspnet_state\Parameters\AllowRemoteConnection.  
  Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.  
  Exception Details: System.Web.HttpException: Unable to make the session state request to the session state server. Please ensure that the ASP.NET State service is started and that the client and server ports are the same. If the server is on a remote machine, please ensure that it accepts remote requests by checking the value of HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\aspnet_state\Parameters\AllowRemoteConnection.

 

解決方法:

在”開始菜單→管理→服務”里面啟動ASP.NET State Server。啟動成功的話,應該能在任務管理器中看到下圖所示

7


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM