【发布时间】:2014-10-01 11:18:00
【问题描述】:
问题:
这里的问题是,当我以管理权限运行我的项目的 .exe filefrom C:\Program Files (x86)\Atoz\My Product Name 时,它工作正常,没有错误。但是当我在没有管理权限或管理员权限的情况下从desktop or start menu 运行我的项目的.exe file 时,我收到如下错误。
错误:
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
at Authentication.IsValidUser(String Login_Id, String Pwd) in c:\Users\Administrator\Desktop\CarServiceNew\CarServiceNew\Authentication.cs:line 29
at CarServiceNew.Login.btnLogin_Click(Object sender, EventArgs e) in c:\Users\Administrator\Desktop\CarServiceNew\CarServiceNew\Login.cs:line 25
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.PerformClick()
at System.Windows.Forms.Form.ProcessDialogKey(Keys keyData)
at System.Windows.Forms.Control.ProcessDialogKey(Keys keyData)
at System.Windows.Forms.TextBoxBase.ProcessDialogKey(Keys keyData)
at System.Windows.Forms.Control.PreProcessMessage(Message& msg)
at System.Windows.Forms.Control.PreProcessControlMessageInternal(Control target, Message& msg)
at System.Windows.Forms.Application.ThreadContext.PreTranslateMessage(MSG& msg)
我对此一无所知。因此,如果有人对此问题有任何建议或解决方案,那将是可以预期的。提前致谢。
注意
Here i have tried to give support for framework 4 on windows 7 os 这个项目是在框架 4.5 中制作的
【问题讨论】:
-
那么堆栈跟踪中指示行周围的代码是什么?
-
我用我的项目跟踪它,但当时我没有收到任何错误。
标签: c# .net installation exe