2011-05-10 29 views
7

我們在我們的生產服務器中安裝了Windows Server 2003 R2標準版。我們在ASP.NET 2.0中編寫的服務器上有更多的活動應用程序。在iis6.0中更改asp.net版本

我們在我們的服務器上安裝了.NET Framework 4.0。

我有一個示例ASP.NET 4.0應用程序,我在IIS 6.0中創建了一個示例網站。現在我想將ASP.NET版本更改爲4.0。

期間更改我收到一個警告消息:

"changing the framework requires restart of w3svc service. alternatively you can change the version with out restarting the w3svc service by running:aspnet_regiis.exe -norestart -s iid-virtual-path. do you want to continue(this will change the framework version and restart the w3svc service)"

我的問題是,如果我改變了版本4.0(僅適用於我的示例網站),是會影響到現有的現場應用程序?這些應用程序正在運行ASP.NET 2.0。

回答

12

如果您只是通過新網站的屬性ASP.NET選項卡更改ASP.NET版本,則更改將僅應用於該網站。

必須確保你不會嘗試在同一個應用程序池中運行ASP.NET 2.0和ASP.NET 4.0應用程序。如果你這樣做,那麼你會遇到這樣的錯誤:

alt text

您還可以看到在應用程序事件日誌本搬弄是非事件:

 
Event Type: Error 
Event Source: ASP.NET 2.0.50727.0 
Event Category: None 
Event ID: 1062 
Date:  12/01/2011 
Time:  12:31:43 
User:  N/A 
Computer: KK-DEBUG 
Description: 
It is not possible to run two different versions of ASP.NET in the same 
IIS process. Please use the IIS Administration Tool to reconfigure your 
server to run the application in a separate process. 

創建一個新的應用程序池您

enter image description here

然後分配新的ASP.NET 4.0應用程序(你可以通過克隆現有池做到這一點)新的ASP.NET Web應用程序這個池在其屬性頁:

enter image description here