我有一些我开发的 asp.net,并且在 Windows 机器上运行良好,但现在我试图在运行 Ubuntu 和 Mono 2.4.4 和 ASP.NET 2.0 的机器上运行它并出现错误。
我的 App_Code 目录中有一些类,例如DatabaseSingleton.cs,Functions.cs和NotAllowedException.cs. 他们都在使用命名空间aspapp。
无论如何,当尝试运行Login.aspx.cs使用该类的文件 () 时DatabaseSingleton,我得到了CS0103: The name 'DatabaseSingleton' does not exist in the current context. 但是,在另一个未使用DatabaseSingleton但正在使用的文件中NotAllowedException,我得到一个类似但不同的错误CS0246: The type or namespace name 'NotAllowedException' could not be found. Are you missing a using directive or an assembly reference?:所有文件都在命名空间中aspapp,并且using aspapp在文件中。
我需要在 web.config 中添加什么才能在单声道上访问这些文件吗?