View previous topic :: View next topic |
Author |
Message |
MaxPower
Joined: 31 May 2012 Posts: 24
|
Posted: Tue Jun 11, 2013 10:41 am Post subject: Cryptographic Exception |
|
|
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 |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Thu Jun 13, 2013 10:49 pm Post subject: |
|
|
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 |
|
|
MaxPower
Joined: 31 May 2012 Posts: 24
|
Posted: Fri Jun 14, 2013 3:01 pm Post subject: |
|
|
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 |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Sat Jun 15, 2013 12:36 am Post subject: |
|
|
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 |
|
|
MaxPower
Joined: 31 May 2012 Posts: 24
|
Posted: Fri Apr 18, 2014 3:55 pm Post subject: |
|
|
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 |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Sat Apr 19, 2014 1:12 am Post subject: |
|
|
Thanks for confirming that. _________________ Infralution Support |
|
Back to top |
|
|
|