简体   繁体   English

IIS6上Web.config中的pageBaseType

[英]pageBaseType in Web.config on IIS6

I am currently defining a base class for my views which itself inherits System.Web.UI.Page. 我目前正在为自己的视图定义基类,该基类本身继承System.Web.UI.Page。 This new class exposes new properties to be defined through the @Page directives. 这个新类提供了通过@Page指令定义的新属性。

On IIS 7 (.NET 4), registering this new base class in web.config as 在IIS 7(.NET 4)上,将新的基类在web.config中注册为

<page pageBaseType="newPageClass">

works very well, though on IIS 5.1 (XP, .NET 3.5) it fails, forcing me to revert to also specifying 效果很好,尽管在IIS 5.1(XP,.NET 3.5)上它失败了,迫使我恢复为同时指定

CodeFileBaseClass="newPageClass"

directly in each view. 直接在每个视图中。

The target server will eventually be IIS 6, which I cannot test right now. 目标服务器最终将是IIS 6,我现在无法对其进行测试。 So I have a couple of questions: 所以我有几个问题:

1) Is this related to the IIS version, and if so will it work on IIS 6? 1)这是否与IIS版本有关,如果可以,则可以在IIS 6上使用吗?

2) Is this related to the .NET version, and if so, at what version does this web.config override become available? 2)这与.NET版本有关,如果是,则此web.config替代版本在什么版本上可用?

3) Is it something completely unrelated to these two possibilities. 3)这是否与这两种可能性完全无关。

Much Appreciated! 非常感激!

This is an addition to .NET 2.0 so nothing to do with IIS itself. 这是.NET 2.0的补充,因此与IIS本身无关。 I would verify that the target framework on IIS 5.1 is indeed set to 2.0 and not 1 我将验证IIS 5.1上的目标框架确实设置为2.0而不是1

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

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