简体   繁体   English

需要帮助配置 IIS6 以运行 ASP.net 2 应用程序

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

I have a Windows 2003 server.我有一个 Windows 2003 服务器。

I am mostly running ASP Classic websites on it.我主要在上面运行 ASP Classic 网站。 I have them configured as virtual directories under the default web site, so they are accessible as http://TheWebServer/TheOnlineApp .我将它们配置为默认 web 站点下的虚拟目录,因此可以通过http://TheWebServer/TheOnlineApp访问它们。 I have created a new site using ASP.net and also set that up as a virtual directory.我使用 ASP.net 创建了一个新站点,并将其设置为虚拟目录。

On the ASP.NET tab for the Default Web Site, my version choices are 1, 2 and 4. Because I am running queries in Oracle, I need to run it as ASP.Net 2.在默认 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. 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.

If I change the ASP.net version for the virtual directory to 2, and leave the default as 4 then I get a 404 error:如果我将虚拟目录的 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/

But, I can access specific pages by name rather than depending on the default document.但是,我可以按名称访问特定页面,而不是依赖于默认文档。 Plus, on all my other virtual directories I get:另外,在我的所有其他虚拟目录中,我得到:

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

And I am unable to access any of my ASP classic virtual directories.而且我无法访问我的任何 ASP 经典虚拟目录。

If I change version to 2 on both the default site and the virtual directory that I am trying to get to work, then all my pages are accessible, but I get errors trying to connect to the Oracle database如果我在默认站点和我试图开始工作的虚拟目录上将版本更改为 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

Everything works great on my development machine, but, it is a Windows 7 computer, so the interface for IIS is completely and totally different.在我的开发机器上一切正常,但是,它是一台 Windows 7 计算机,所以 IIS 的接口是完全不同的。

My guess is that you're using multiple versions of the.Net CLR (1.1, 2.0, or 4.0) in the same process, which doesn't work real great in IIS6.我的猜测是,您在同一进程中使用了多个版本的 .Net CLR(1.1、2.0 或 4.0),这在 IIS6 中效果不佳。

Create a new Application Pool that you will only use to run.Net 2.0 apps.创建一个仅用于运行 .Net 2.0 应用程序的新应用程序池。 Then assign the Virtual Directory to use it via the Virtual Directory->Application pool setting in the Virtual Directory Properties dialog.然后通过虚拟目录属性对话框中的虚拟目录->应用程序池设置分配虚拟目录以使用它。 After you do this, you may set the parent Web Site back to the settings it was using.执行此操作后,您可以将父 Web 站点设置回其使用的设置。

Also remember that Virtual Directories can inherit settings from their parent's web.config values, so use resets (like <connectionStrings><clear /></connectionStrings> ) as necessary.另请记住,虚拟目录可以从其父级的 web.config 值继承设置,因此根据需要使用重置(如<connectionStrings><clear /></connectionStrings> )。

I also suggest moving it to it's own Web Site if that will work in your environment/network separated by a new IP, domain name, or port.我还建议将它移动到它自己的 Web 站点,如果这将在您的环境/网络中工作,由新的 IP、域名或端口分隔。 Not a big deal since you should be able to get Virtual Directories to work in your case, but it could simplify things for you.没什么大不了的,因为您应该能够让虚拟目录在您的情况下工作,但它可以为您简化事情。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM