2009-06-22 21 views
0

我正在將文件放到生產服務器上。在我的開發機器上,我目前使用abp文件來生成我的代碼。使用SubSonic的SubCommander工具生成的文件出錯

將網站移動到我的生產服務器上我以爲我會自動生成文件,因爲我正在接收abp文件的錯誤,因爲我沒有在FullTrust下運行它。

我跑到下面的命令行生成文件:

sonic.exe generate /server "serverName" /db "dbName" /generatedNamespace "namespace" /out GeneratedFiles 

所有文件的生成還好,但是當我嘗試運行我得到以下錯誤:

Object reference not set to an instance of an object. 
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object. 

Source Error: 

Line 228:  public static Select Select() 
Line 229:  { 
Line 230:   return Repository.Select(); 
Line 231:  } 
Line 232:  


Source File: ~\AllStructs.cs Line: 230 (*changed to not show full path) 

任何想法是造成這個?我在SubSonics的視線上找不到任何東西,這讓我對發生的事情有一個正確的認識。

回答

0

你有一個app.config或web.config在你的項目文件中的連接字符串引用你的實例?

+0

是的,我有一個連接字符串指向我正在使用的數據庫。我在生產機器上使用了不同的服務器,但改變了web.config以反映這一點。連接字符串是否可以影響錯誤? – Fermin 2009-06-22 18:52:51

相關問題