View previous topic :: View next topic |
Author |
Message |
ancientOne
Joined: 26 May 2011 Posts: 26
|
Posted: Mon Aug 27, 2012 3:01 am Post subject: Windows 7 & 8: Bootstrap Execution Error |
|
|
After installation of my Windows Forms Application (uses .NET Encryptor) on Windows 7 (Ulitmate) and Windows 8 (beta) machines, I get the following execution error as the application is loaded:
Bootstrap Error: An unhandled exception (Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))) occurred while bootstrapping the application.
The exception dialog pops up after the .Net Encryptor splash screen is displayed and before my initial screen is displayed.
Any ideas? |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Mon Aug 27, 2012 7:04 am Post subject: |
|
|
That error (REGDB_E_CLASSNOTREG) typically occurs when an application is using a COM class (or control) which is not registered on the machine. .NET Encryptor does not use any COM classes so I think it very unlikely that the error is coming from the either the Bootstrap or AssemblyLoader dll. The most likely explanation (especially given when the error is occurring) is that your application is referencing/using a COM class which is not present on Windows 7/8 machines. You can confirm this by running your unencrypted application on a clean Win 7 machine and verify that you get the same error.
Does your application run OK on a clean XP machine? _________________ Infralution Support |
|
Back to top |
|
|
ancientOne
Joined: 26 May 2011 Posts: 26
|
Posted: Mon Aug 27, 2012 2:36 pm Post subject: |
|
|
Yes, it installs and executes fine on XP.
If this does not have anything to do with .NET ENCRYPTOR, my next suspect to check is SQL Server Compact 3.5 SP1 for which I am deploying DLLs in X86/AMD folders rather than installing in GAC.
Thanks. |
|
Back to top |
|
|
ancientOne
Joined: 26 May 2011 Posts: 26
|
Posted: Mon Aug 27, 2012 6:33 pm Post subject: How to produce a more verbose error log |
|
|
I need to determine which dll is throwing the exception, and since the assembly is encrypted along with several DLLs, how do I get a verbose error log and call stack information when using .Net Encryptor?
Thanks. |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Mon Aug 27, 2012 10:21 pm Post subject: |
|
|
You should put a try/catch block around your main entry point method to catch any exceptions then you can show a message box and display the Exception.StackTrace. _________________ Infralution Support |
|
Back to top |
|
|
Javier
Joined: 09 Oct 2009 Posts: 215
|
Posted: Sun Jun 16, 2013 12:13 pm Post subject: |
|
|
Quote: | You should put a try/catch block around your main entry point method to catch any exceptions then you can show a message box and display the Exception.StackTrace. |
Would you mind to post an example code of such a catch block? Since you cannot debug a protected application this becomes very important to track down errors that only show up when the application is protected. Thank you. |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Sun Jun 16, 2013 11:55 pm Post subject: |
|
|
Actually you can debug the "Debug" version of the protected application. This does not call the CheckProcessIntegrity() call which prevents debugging of the Release version. So you can use the debugger and set it to catch exceptions when they are raised.
Below is the sort of exception handler you could put around your main entry point code (in the Main function of your application):
Code: | catch (Exception e)
{
while (e.InnerException != null)
{
e = e.InnerException;
}
string msg = string.Format("Error: {0}\nStack: {1} , e.Message, e.StackTrace);
MessageBox.Show(msg, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
} |
_________________ Infralution Support |
|
Back to top |
|
|
|