繁体   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