Infralution Support Forum Index Infralution Support
Support groups for Infralution products
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Windows 7 & 8: Bootstrap Execution Error

 
Post new topic   Reply to topic    Infralution Support Forum Index -> .NET Encryptor Support
View previous topic :: View next topic  
Author Message
ancientOne



Joined: 26 May 2011
Posts: 26

PostPosted: Mon Aug 27, 2012 3:01 am    Post subject: Windows 7 & 8: Bootstrap Execution Error Reply with quote

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
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Mon Aug 27, 2012 7:04 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
ancientOne



Joined: 26 May 2011
Posts: 26

PostPosted: Mon Aug 27, 2012 2:36 pm    Post subject: Reply with quote

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
View user's profile Send private message
ancientOne



Joined: 26 May 2011
Posts: 26

PostPosted: Mon Aug 27, 2012 6:33 pm    Post subject: How to produce a more verbose error log Reply with quote

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
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Mon Aug 27, 2012 10:21 pm    Post subject: Reply with 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.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
Javier



Joined: 09 Oct 2009
Posts: 215

PostPosted: Sun Jun 16, 2013 12:13 pm    Post subject: Reply with quote

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
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Sun Jun 16, 2013 11:55 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Infralution Support Forum Index -> .NET Encryptor Support All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group