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 

Cryptographic Exception

 
Post new topic   Reply to topic    Infralution Support Forum Index -> Licensing Support
View previous topic :: View next topic  
Author Message
MaxPower



Joined: 31 May 2012
Posts: 24

PostPosted: Tue Jun 11, 2013 10:41 am    Post subject: Cryptographic Exception Reply with quote

Hello,

I have a customer's application where a CryptographicException is thrown when the AuthenticatedLicenseProvider constructor is called.

The exception message is "The profile for the user is a temporary profile".

Is it a known behavior ?

I know that a temporary profile is created when the user's profile can not be loaded, and so it is considered as an error, but apart from correcting it, is there any workaround ?

Thans in advance
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Thu Jun 13, 2013 10:49 pm    Post subject: Reply with quote

What sort of application are you licensing (Windows Forms, WPF, Windows Service or ASP.NET)?

When is the licensing code being called (at installation, normal execution)?
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
MaxPower



Joined: 31 May 2012
Posts: 24

PostPosted: Fri Jun 14, 2013 3:01 pm    Post subject: Reply with quote

This is a Winform Application built on top of .Net 2.0 with your Licensing System 5.5.3 (modified source code). The computer is running XP SP3

I've managed to add some try catch around the application initialization (when I want to check if the user has a license file so he can use the full application), and this is the exception I get :

Code:

Exception : The type initializer for 'MyApp.LocalLicenseServer' threw an exception.    
   at MyApp.LocalLicenseServer.get_License()    
   at MyApp_.principal.main()     


InnerException : The profile for the user is a temporary profile
at System.Security.Cryptography.CryptographicException.ThrowCryptogaphicException(Int32 hr)    
at System.Security.Cryptography.Utils._CreateCSP(CspParameters param, Boolean randomKeyContainer, SafeProvHandle& hProv)    
at System.Security.Cryptography.Utils.CreateProvHandle(CspParameters parameters, Boolean randomKeyContainer)    
at System.Security.Cryptography.Utils.GetKeyPairHelper(CspAlgorithmType keyType, CspParameters parameters, Boolean randomKeyContainer, Int32 dwKeySize, SafeProvHandle& safeProvHandle, SafeKeyHandle& safeKeyHandle)    
at System.Security.Cryptography.RSACryptoServiceProvider.GetKeyPair()    
at System.Security.Cryptography.RSACryptoServiceProvider.get_KeySize()    
at MyApp.LicenseUtilities.ReadRSAParameters(RSACryptoServiceProvider provider, XmlReader reader, String localName) in C:\...\Infralution\LicenseUtilities.vb:line 439    
at MyApp.EncryptedLicenseParameters.Read(XmlReader reader) in C:\...\Infralution\EncryptedLicenseProvider.vb:line 249    
at MyApp.AuthenticatedLicenseParameters.Read(XmlReader reader) in C:\...\Infralution\AuthenticatedLicenseProvider.vb:line 133    
at MyApp.EncryptedLicenseParameters.ReadFromString(String xmlParameters) in C:\...\Infralution\EncryptedLicenseProvider.vb:line 215    
at MyApp.AuthenticatedLicenseProvider..ctor(String xmlParameters, String licenseFile) in C:\...\Infralution\AuthenticatedLicenseProvider.vb:line 354    
at MyApp.MyAppAuthenticatedLicenseProvider..ctor(String xmlParameters, String licenseFile) in C:\...\Local\MyAppAuthenticatedLicenseProvider.vb:line 8    
at MyApp.LocalLicenseServer..cctor() in C:\...\Local\LocalLicenseServer.vb:line 51    
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Sat Jun 15, 2013 12:36 am    Post subject: Reply with quote

I think that this may be related to an issue that was fixed in Version 5.7.0 of ILS. I suggest you download the latest ILS code (using the original download link you received when you purchased) and use it.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
MaxPower



Joined: 31 May 2012
Posts: 24

PostPosted: Fri Apr 18, 2014 3:55 pm    Post subject: Reply with quote

I've upgraded my application with ILS 5.10.2 and can confirm that the previous cryptographic exceptions are now gone.

Thanks
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Sat Apr 19, 2014 1:12 am    Post subject: Reply with quote

Thanks for confirming that.
_________________
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 -> Licensing 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