gpt4 book ai didi

apache - mod_mono 问题 : Could not resolve the name 'ConfigurationManager'

转载 作者:太空宇宙 更新时间:2023-11-03 17:02:58 24 4
gpt4 key购买 nike

我在 Ubuntu 上运行 mod_mono 2.4.4,我发现我必须检查我的 VB 文件并向所有文件添加“imports System.Configuration”以解决名称错误。这在 Windows 端的 mod_aspdotnet 中不是必需的。

 I have, however, run into one error of which I can't find the source:


System.Web.Compilation.CompilationException: VBNC30451: Could not resolve the name 'ConfigurationManager'
at System.Web.Compilation.AssemblyBuilder.BuildAssembly (System.Web.VirtualPath virtualPath, System.CodeDom.Compiler.CompilerParameters options) [0x00000]
at System.Web.Compilation.AssemblyBuilder.BuildAssembly (System.Web.VirtualPath virtualPath) [0x00000]
at System.Web.Compilation.BuildManager.GenerateAssembly (System.Web.Compilation.AssemblyBuilder abuilder, System.Collections.Generic.List`1 buildItems, System.Web.VirtualPath virtualPath, BuildKind buildKind) [0x00000]
at System.Web.Compilation.BuildManager.BuildAssembly (System.Web.VirtualPath virtualPath) [0x00000]

这是我必须继续添加此导入的错误步骤或配置不正确的结果吗?

最佳答案

某处,可能是/etc/mono/2.0/web.config,有一个默认配置文件。验证它是否包含如下内容:

             <pages>
<namespaces>
<add namespace="System" />
<add namespace="System.Collections" />
<add namespace="System.Collections.Specialized" />
<add namespace="System.Configuration" />
<add namespace="System.Text" />
<add namespace="System.Text.RegularExpressions" />
<add namespace="System.Web" />
<add namespace="System.Web.Caching" />
<add namespace="System.Web.SessionState" />
<add namespace="System.Web.Security" />
<add namespace="System.Web.Profile" />
<add namespace="System.Web.UI" />
<add namespace="System.Web.UI.WebControls" />
<!-- <add namespace="System.Web.UI.WebControls.WebParts" /> -->
<add namespace="System.Web.UI.HtmlControls" />
</namespaces>
</pages>

这是默认值。这应该负责添加默认导入。

顺便说一句,mod_mono 2.4.4 现在有点旧了。尝试获取更新的软件包。

关于apache - mod_mono 问题 : Could not resolve the name 'ConfigurationManager' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3757958/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com