簡體   English   中英

需要幫助配置 IIS6 以運行 ASP.net 2 應用程序

[英]Need help configuring IIS6 to run ASP.net 2 Application

我有一個 Windows 2003 服務器。

我主要在上面運行 ASP Classic 網站。 我將它們配置為默認 web 站點下的虛擬目錄,因此可以通過http://TheWebServer/TheOnlineApp訪問它們。 我使用 ASP.net 創建了一個新站點,並將其設置為虛擬目錄。

在默認 Web 站點的 ASP.NET 選項卡上,我的版本選擇是 1、2 和 4。因為我在 Oracle 中運行查詢,所以我需要以 ASP.

I cannot run them as ASP.net 4, because the Oracle drivers are not included in 4, I could get the drivers from Oracle, but with old version of Oracle that we are using, the new version of oracle is not that far backwards compatible.

如果我將虛擬目錄的 ASP.net 版本更改為 2,並將默認設置為 4,則會收到 404 錯誤:

The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable.  Please review the following URL and make sure that it is spelled correctly.
Requested URL: /TechCallCenter/eurl.axd/4e68f64d4066d244a27da9fff7bf3f0d/

但是,我可以按名稱訪問特定頁面,而不是依賴於默認文檔。 另外,在我的所有其他虛擬目錄中,我得到:

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."

而且我無法訪問我的任何 ASP 經典虛擬目錄。

如果我在默認站點和我試圖開始工作的虛擬目錄上將版本更改為 2,那么我的所有頁面都可以訪問,但我在嘗試連接到 Oracle 數據庫時遇到錯誤

[Exception: OCIEnvCreate failed with return code -1 but error message text was not available.]
System.Data.OracleClient.OciHandle..ctor(OciHandle parentHandle, HTYPE handleType, MODE ocimode, HANDLEFLAG handleflags) +363
System.Data.OracleClient.OciEnvironmentHandle..ctor(MODE environmentMode, Boolean unicode) +23
System.Data.OracleClient.OracleInternalConnection.OpenOnLocalTransaction(String userName, String password, String serverName, Boolean integratedSecurity, Boolean unicode, Boolean omitOracleConnectionName) +122
System.Data.OracleClient.OracleInternalConnection..ctor(OracleConnectionString connectionOptions) +135
System.Data.OracleClient.OracleConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject) +36
System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +28
System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +424
System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +68
System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +519
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +82
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +104
System.Data.OracleClient.OracleConnection.Open() +37
ScratchPad.Button1_Click(Object sender, EventArgs e) +235
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +105
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +107
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5087

在我的開發機器上一切正常,但是,它是一台 Windows 7 計算機,所以 IIS 的接口是完全不同的。

我的猜測是,您在同一進程中使用了多個版本的 .Net CLR(1.1、2.0 或 4.0),這在 IIS6 中效果不佳。

創建一個僅用於運行 .Net 2.0 應用程序的新應用程序池。 然后通過虛擬目錄屬性對話框中的虛擬目錄->應用程序池設置分配虛擬目錄以使用它。 執行此操作后,您可以將父 Web 站點設置回其使用的設置。

另請記住,虛擬目錄可以從其父級的 web.config 值繼承設置,因此根據需要使用重置(如<connectionStrings><clear /></connectionStrings> )。

我還建議將它移動到它自己的 Web 站點,如果這將在您的環境/網絡中工作,由新的 IP、域名或端口分隔。 沒什么大不了的,因為您應該能夠讓虛擬目錄在您的情況下工作,但它可以為您簡化事情。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM