我有一個查詢託管在Windows 2003服務器上的數據庫的應用程序。 IIS似乎正常工作,因爲其他應用程序工作正常。ASP.NET APP僅在服務器執行查詢時纔有效
但是,當我嘗試從遠程機器訪問此應用程序時,出現錯誤。
我意識到,當我從服務器執行查詢時,應用程序開始在遠程PC上工作。然後該應用程序遠程工作。
這是怎麼發生的?這是證書問題嗎?有人有線索嗎?
這裏是例外
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: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace: [NullReferenceException: Object reference not set to an instance of an object.] BH.Sysnet.DBHelper.SetSqlExceptionMessage(StringBuilder msg, Exception ex) +741 BH.Sysnet.DBHelper.CreateDbException(DB db, Exception ex) +68 BH.Sysnet.DB.ExecuteReturnDS(String sql, CommandType statementType, String nombreDataTable, DataSet ds) +206 BH.Sysnet.DB.ExecuteReturnDS(String sql, String nombreDataTable, DataSet ds) +15 BH.Sysnet.DB.ExecuteReturnDS(String sql, String nombreDataTable) +12 BH.Sysnet.DB.ExecuteReturnDS(String sql) +16 BH.GIDEWS.Pages.Log.Buscar() +1717 BH.GIDEWS.Pages.Log.btnBuscar_Click(Object sender, EventArgs e) +35 System.Web.UI.WebControls.Button.OnClick(EventArgs e) +111 System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +110 System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565
你得到的錯誤信息是什麼? – fretje 2011-05-09 14:02:17
當您在本地訪問應用程序時,是否在開發環境中這樣做?在數據庫服務器上運行什麼樣的身份驗證(什麼類型的數據庫服務器?) – 2011-05-09 14:07:20
未將對象引用設置爲對象的實例。這看起來像服務器無法從數據庫中獲取值 – ShinyDarkStone 2011-05-09 14:08:37