2012-11-04 142 views
1

我有一些asp.net,我開發,並在Windows機器上工作得很好,但現在我試圖在運行Ubuntu和Mono 2.4.4和ASP.NET的機器上運行它2.0和獲取錯誤。asp.net找不到類

我在我的App_Code目錄中有一些類,如DatabaseSingleton.cs,Functions.csNotAllowedException.cs。他們都使用命名空間aspapp

無論如何,當試圖運行一個使用DatabaseSingleton類的文件(Login.aspx.cs)時,我得到那個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能夠訪問單聲道這些文件?

回答

0

請確保您指向您的.conf文件中的mod-mono-server2您可以在一個dll中編譯.cs並將其移動到Bin目錄中