简体   繁体   English

如何在IIS 6.0中将请求从一个应用程序池路由到另一个应用程序池

[英]How to route request from one application pool to another in iis 6.0

I have got two web applications (separate virtual directories) residing in the DefaultAppPool on Windows Server 2003. My first application has got a link and when I click on it, the second application opens up. 我在Windows Server 2003的DefaultAppPool中有两个Web应用程序(单独的虚拟目录)。我的第一个应用程序有一个链接,当我单击它时,第二个应用程序打开。

Now I want to use different .Net framework for both web applications and for that in IIS 6.0, I will have to host them in separate app pools. 现在,我想对Web应用程序和IIS 6.0中的Web应用程序使用不同的.Net框架,我将不得不将它们托管在单独的应用程序池中。

Now the question is - is it possible to host them in different app pools and keep the behavior intact so that if I click on the link in first web application, it can still open the second web application hosted in a different app pool? 现在的问题是-是否可以将它们托管在不同的应用程序池中并保持行为不变,以便如果我单击第一个Web应用程序中的链接,它仍然可以打开托管在其他应用程序池中的第二个Web应用程序?

Thanks in advance, 提前致谢,

D d

I think I've found the solution and it is simpler than what I actually thought. 我想我已经找到了解决方案,它比我实际想的要简单。

Steps I took: 我采取的步骤:

  1. Create another app pool in IIS 6.0 on Windows Server 2003 在Windows Server 2003的IIS 6.0中创建另一个应用程序池

  2. Assign one of the web applications to this pool. 将其中一个Web应用程序分配给该池。 So now I have two web applications in two different app pools. 所以现在我在两个不同的应用程序池中有两个Web应用程序。 Currently both are having ASP.NET version as 2.0.50727 当前两者都具有ASP.NET版本为2.0.50727

  3. Change the ASP.NET version of one of the applications to 4.0.30319. 将应用程序之一的ASP.NET版本更改为4.0.30319。 So interesting fact to understand here is - in IIS 6, you can't set the .NET framework for an app pool. 在这里要了解的一个有趣事实是-在IIS 6中,您无法为应用程序池设置.NET框架。 It actually assumes it from the first application in it and then applies it to all the web applications residing in this app pool 实际上,它从其中的第一个应用程序开始假定它,然后将其应用于此应用程序池中驻留的所有Web应用程序

  4. And it is done!! 完成了!!

  5. It can be checked to list all the sites and which .NET versions they are configured to by using aspnet_iisreg -lk. 通过使用aspnet_iisreg -lk,可以检查它以列出所有站点以及它们配置为哪个.NET版本。 Run this command from your .NET framework directory. 从.NET Framework目录运行此命令。 For ex: C:\\WINDOWS\\Microsoft.NET\\Framework\\v4.0.30319 例如:C:\\ WINDOWS \\ Microsoft.NET \\ Framework \\ v4.0.30319

  6. Both the sites with different .NET framework will be listed .NET框架不同的两个站点都将列出

Hope this helps. 希望这可以帮助。

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

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