SubText 和 IIS 7 的集成管道模式
开箱即用后,SubText 无法在 IIS7 的集成管道模式下运行。 不幸的是,它超出了“迁移” web.config 以匹配所需格式的范围。 例如,将 httpModules 和 httpHandlers 移动到 . 事实证明,当在集成模式下运行时,Request 在 Application_Start 处不可用,这也会导致 SubText 失败。
如果我们不向现有的 GoDaddy 托管 ASP.NET 网站添加博客功能,我们将有两个选择:更新 SubText 代码库以不使用请求上下文(加上修复其他任何表面)或仅运行 SubText在经典模式下。
不幸的是,我们当前的 GoDaddy 帐户受到限制,因为我们只能使用一个应用程序池。 由于主站点配置为集成管道模式,因此我们无法在不影响(即:破坏)主站点的情况下自由更改 IIS 模式。
除了切换到更灵活的主机之外,当前的计划是将主站点修改为以经典模式运行。 这是一个简单的网站,将 web.config 恢复为经典模式格式应该不是什么大问题。 或者,我正在考虑更新 SubText 代码库以不在 Application_Start 处使用请求上下文。 我还没有听说有人在集成模式下运行 SubText,这可能是一个很好解决的问题——假设必要的更新已经结束。
假设还有大约 8 个小时分配给这项工作,最好的方法是什么? 我还缺少其他选择吗?
Out of the box, SubText is unable to run under IIS7's Integrated Pipeline Mode. Unfortunately, it goes beyond "migrating" the web.config to match the required format. For example, moving httpModules and httpHandlers to their new location within . As it turns out, Request is not available at Application_Start when running in Integrated mode and this causes SubText to fail too.
If we weren't adding blog functionality to an existing, GoDaddy-hosted ASP.NET web site, we would be left with two options: Update the SubText codebase to not use the request context (plus fix whatever else surfaces) OR simply run SubText in classic mode.
Unfortunately, our current GoDaddy account is limiting as only a single app pool is available to us. Since the main site is configured for Integrated Pipeline Mode, we don't have the freedom to change the IIS mode without impacting (read: breaking) the main site.
Short of switching to a more flexible host, the current plan is to modify the main site to run in classic mode. It's a simple site and reverting the web.config to the classic mode format should not be a big deal. Alternatively, I'm toying with the idea of updating the SubText codebase to not use the request context at Application_Start. I haven't heard on anyone running SubText in Integrated Mode and it might be a nice problem to solve -- assuming there's an end to the necessary updates.
Assuming there are about 8 more hours allocated to this effort, what's the best approach? Am I missing any other options?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
不幸的是,在部署 Subtext 2.1.2 时,我没有安装 IIS 7 来进行测试。 在即将推出的 Subtext 2.5 中,我们可以很好地使用 IIS 7 集成模式。 不幸的是,2.5 还没有出来。
如果您对前沿技术感到满意,您可以尝试我们主干中的最新版本。 它非常坚固,我们快完成了。 如果您要升级现有博客,这可能会具有挑战性。 如果您要安装新的,这可能是一个值得尝试的好版本。
http://build.subtextproject.com/builds/archive/SubText- 2.5.0.228.zip
Unfortunately I didn't have an IIS 7 installation to test with when deploying Subtext 2.1.2. In the upcoming Subtext 2.5, we work great with IIS 7 integrated mode. Unfortunately, 2.5 is not yet out.
If you're ok with the bleeding edge, you could try the latest build from our trunk. It's pretty solid and we're almost done. If you're upgrading an existing blog, it may be challenging. If you're installing a new one, this might be a good build to try.
http://build.subtextproject.com/builds/archive/SubText-2.5.0.228.zip
作为后续工作,我们快速注释掉了引用 Request 上下文的 Application_Start 代码。 这个实验导致了更多的例外。 我们现在正在对主站点进行修改,以在经典模式下运行。
As a follow up, we quickly commented out the Application_Start code which referenced the Request context. This experiment resulted in further exceptions. We're now moving forward with modifications to the main site to run in classic mode.