具有不同 .net 框架的虚拟目录

发布于 2024-07-08 03:02:43 字数 138 浏览 6 评论 0原文

是否可以在 IIS 中的同一网站下拥有两个虚拟目录,但虚拟目录使用不同版本的 .net 框架?

例如,在默认网站下,我可以有一个针对2.0框架的虚拟目录和第二个针对1.1框架的虚拟目录吗?

这是针对 IIS 6 的,谢谢!

Is it possible to have two virtual directories under the same website in IIS but have the virtual directories be using different versions of the .net framework?

For example, under the default website, can I have one virtual directory targeting the 2.0 framework and a second virtual directory targeting the 1.1 framework?

This is for IIS 6, thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

淡淡の花香 2024-07-15 03:02:43

您并不是说您正在使用哪个版本的 IIS,而是对于 6.0 及更高版本,只需将它们分配到不同的应用程序池,并将池设置为使用正确的 .Net 版本。

You are not saying which version of IIS you are using, but for 6.0 and up, just assign them to different application pools, and set the pools to use the right version of .Net.

计㈡愣 2024-07-15 03:02:43

您必须为这两个虚拟目录创建一个“应用程序”,然后使用网站属性下的 ASP.NET 选项卡分配它们的 ASP.NET 版本。

另外,正如 @sunny 提到的,您需要有两个不同的应用程序池,并且每个虚拟目录必须指向不同的应用程序池。 因为不同版本的ASP.NET不能在同一个应用程序池中运行。

You have to create an "application" for both of the virtual directories, and then you'd assign their ASP.NET version using the ASP.NET tab under web site properties.

Also, as @sunny mentioned, you'd need to have two different application pools, and each virtual directory would have to be pointed to a different application pool. Because different versions of ASP.NET cannot run within the same application pool.

静赏你的温柔 2024-07-15 03:02:43

这取决于您是否将它们标记为“应用程序”。 应用程序虚拟目录可以使用不同的框架。 确保将它们关联到不同的应用程序池。 切勿在一个应用程序池中混合使用两个 .NET Framework 版本。

一个重要注意事项:如果您将虚拟目录创建为应用程序,则不会共享会话状态和其他与应用程序相关的对象。 此外,Server.MapPath("~") 和其他与 ServerURL 相关的方法的属性将指向虚拟目录的物理目录,而不是主根。

It depends if you mark them as "applications". Application virtual directories can use different framework. Make sure you associate them to different application pools. Never mix two .NET framework versions in one application pool.

One important note: if you create a virtual directory as an application, you don't share session state and other application related objects. Also Server.MapPath("~") and other ServerURL related methods an properties will point to the physical directory of the virtual directory and not to the main root.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文