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 

Using sdf files and external dll

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



Joined: 12 Jun 2014
Posts: 3

PostPosted: Thu Jun 12, 2014 7:26 am    Post subject: Using sdf files and external dll Reply with quote

I have developed a C# windows forms application (in microsoft visual studio 2013), and wanted to encrypt this with .Net Encryptor. Now I run into several problems with the SQL CE database and several external dll files (e.g. SAP connector, PDF creation).
- When I build my solution without .Net encryptor (and without bootstrap) the SDF (SQLCE) file can be accessed and written by the normal windows user (as it should be). But when I build the solution with a bootstrap project, the file is suddenly secured after install. What is the problem here?
- As mentioned, I use several dll files in the project. When I build the solution without bootstrap, the solution works straigth away. But when I add the bootstrap project, some dll's do not work any more (external reference not found.). Some of these dll's have a strong name (which I don't know/have), some don't have a strong name. I tried to copy them manually, through the pre-build script and add them as encrypted assemblies. I also tried to add my own strong name to these dll's via developer command scripts and via the [/strongname:] option in the pre build script. None of these options work for me.

Does anyone recognize these problems and can anybody give me a solution for both problems.
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 4870

PostPosted: Thu Jun 12, 2014 10:59 pm    Post subject: Reply with quote

What do you mean by "the file is suddenly secured after install"? Are you getting an error message? If so could you post the exact error message. If you are using external 3rd party DLLs these do not have to be encrypted and included in the bootstrap resources. Instead you can just distribute them and ensure that they are installed in the same directory as the bootstrap executable. It is possible to encrypt third party DLLs (by using the /strongname option to specify the key to encrypt them with) and include them in your bootstrap resources - however this is only possible for pure managed DLLs (not mixed mode DLLs that contain both managed and native code).
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
szuijderwijk



Joined: 12 Jun 2014
Posts: 3

PostPosted: Sat Jun 21, 2014 1:40 pm    Post subject: Reply with quote

What I do mean with "the file is secured after install", is that I get the following error message:
"An unhandled exception (Access to the database file is not allowed [1914, File name = xxxxxxxx (SDF file location and name)]) occured while bootstrapping the application."
I can solve this by changing the sdf-file properties (security tab) and set all permissions of the users to full control. The default when I use .Net encryptor is only read access. When I do not use the encryptor, the default is full control, so then it works.

Hope you can help me with this.
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 4870

PostPosted: Sun Jun 22, 2014 11:22 pm    Post subject: Reply with quote

It is possible that the anti-debugging features in .NET Encryptor are interfering in some way with SQLCE. You can try changing the INTEGRITY_LEVEL constant in the bootstrapper program to a lower number (eg 1 or 2).

You also said:
Quote:
some dll's do not work any more (external reference not found.)

Is this still the case? When was this issue occurring - at compile time or when you run the application.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
szuijderwijk



Joined: 12 Jun 2014
Posts: 3

PostPosted: Sat Jul 12, 2014 2:36 pm    Post subject: Solved! Reply with quote

Hi,

The issue with the SDF file has been solved by changing the INTEGRITY_LEVEL. The application now only has to be installed and run as administrator, but that is not an issue currently.

Also the issue with the dll files is solved. This was not an issue with Infralution, but of different versions of some dll's which linked to each other. Due to my testing methods (on different machines with different authorization levels), I thought it was a problem with the Encryptor.

So thanks for the feedback and hints.
Back to top
View user's profile Send private message
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