为什么此 ASP.NET 配置文件部分可能无法动态编译?

发布于 2024-07-30 18:34:31 字数 1024 浏览 5 评论 0原文

当以下配置文件部分位于我的 web.config 中时,第一页请求失败,并出现 FileNotFoundException 和来自编译器的一堆错误(从堆栈跟踪的外观来看)。 当属性部分被删除时,一切都会恢复正常(当然,直到我尝试引用配置文件中的某些内容)。 网站的其余部分是预编译的,每页汇编,不可更新。

该问题仅在一台机器上重现 - 相同的构建在其他高度相似的机器上运行。

我错过了什么明显的事情吗?

<profile>
  <providers>
    <clear />
    <add name="AspNetSqlProfileProvider"
         connectionStringName="ConnectionString"
         applicationName="OIWebApps"
         type="System.Web.Profile.SqlProfileProvider"/>
  </providers>
  <properties>
    <group name="UI">
      <add name="MasterPage" defaultValue="Horizontal.master"/>
      <add name="Theme" defaultValue="Default"/>
      <add name="IsSessionWarningEnabled" defaultValue="True" type="System.Boolean"/>
      <add name="UseTelerikMultilineTextBoxes" defaultValue="True" type="System.Boolean"/>
      <add name="FontSize" defaultValue="Smaller" type="System.String"/>
    </group>
  </properties>
</profile>

When the following profile section is in my web.config, the first page request fail with FileNotFoundException and a bunch of error coming from the compiler (from the look of the stack trace). When the properties section is removed, everything works again (until I try to reference something from the Profile of course). The rest of the website is pre-compiled, assembly per page, not-updatable.

The problem has only been reproduced on one machine-- the same build worked on other highly similar machines.

Am I missing anything obvious?

<profile>
  <providers>
    <clear />
    <add name="AspNetSqlProfileProvider"
         connectionStringName="ConnectionString"
         applicationName="OIWebApps"
         type="System.Web.Profile.SqlProfileProvider"/>
  </providers>
  <properties>
    <group name="UI">
      <add name="MasterPage" defaultValue="Horizontal.master"/>
      <add name="Theme" defaultValue="Default"/>
      <add name="IsSessionWarningEnabled" defaultValue="True" type="System.Boolean"/>
      <add name="UseTelerikMultilineTextBoxes" defaultValue="True" type="System.Boolean"/>
      <add name="FontSize" defaultValue="Smaller" type="System.String"/>
    </group>
  </properties>
</profile>

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

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

发布评论

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

评论(2

残月升风 2024-08-06 18:34:31

我看到“UseTelereikMultilineTextBoxes”。 难道是这台机器上缺少 Telerik 所需的文件吗?

I see "UseTelereikMultilineTextBoxes". Could it be that a file needed for Telerik is missing on this machine?

撑一把青伞 2024-08-06 18:34:31

由于缺少本机 .dll,它无法编译 由于正在执行的页面没有直接使用依赖于缺少本机 .dll 的 .net dll,因此很难识别,更令人困惑的是,只有一些页面引发了编译错误而不是在所有页面上引发。

It failed to compile because of a missing native .dll It was extremely hard to identify because the page that was executing didn't directly use the .net dll that depended on the missing native .dll, and even more confusingly, only some pages raised the compile error instead of being raised on all pages.

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