View previous topic :: View next topic |
Author |
Message |
Pointeman
Joined: 07 Sep 2010 Posts: 56
|
Posted: Tue Sep 07, 2010 3:16 pm Post subject: RSA key container could not be opened web.config line 4 |
|
|
I receive this error when running the "AuthenticationApp_CS" project.
1. I have installed the license web service using SQL 2008 Express DB. (At least it opens in IE...)
2. I created a product in "License Tracker" using "Sample Project Settings" and changed the "Auth Server URL:" to http://authenticate.ourcompany.com
4. I generated a key in "License Key Generator" using "Sample Project Settings" and changed the "Auth Server URL:" to http://authenticate.ourcompany.com
5. Cut-n-Pasted the "Validation Parameters" into the LICENSE_PARAMETERS in "AuthenticationApp_CS" project.
Help... |
|
Back to top |
|
|
SdB
Joined: 31 Aug 2010 Posts: 35
|
Posted: Tue Sep 07, 2010 3:20 pm Post subject: |
|
|
Did you update the authentication service ? |
|
Back to top |
|
|
Pointeman
Joined: 07 Sep 2010 Posts: 56
|
Posted: Tue Sep 07, 2010 5:54 pm Post subject: |
|
|
Yes, I think so.
I used: 'License Tracker' -> 'Authentication' -> 'Configure Server Settings' and saved: 'AuthenticationServerSettings.xml'
I should probably tell you, we are using the same local SQL 2008 Express database with Licence Tracker 'Infralution' DB for the Authentication Service too. Thought it might be easier. I'm user a seperate dev pc to run VS 2008 project sample(AuthenticatedApp_CS).
Last edited by Pointeman on Tue Sep 07, 2010 6:14 pm; edited 1 time in total |
|
Back to top |
|
|
Pointeman
Joined: 07 Sep 2010 Posts: 56
|
Posted: Tue Sep 07, 2010 6:04 pm Post subject: |
|
|
As well, config has blue squiggly under the following in both appsettings & connectionstrings (configProtectionProvider & EncryptedData)
We have Windows 2003 Server w/ .NET 3.5
<xml>
<configuration>
<appSettings>
<EncryptedData>
<EncryptionMethod>
<KeyInfo>
<EncryptedKey>
<EncryptionMethod>
<KeyInfo>
<KeyName>Rsa Key</KeyName>
</KeyInfo>
<CipherData>
<CipherValue>O4kboN7HQ+UCv9H0fA5wTckMpIxjuOIxyCij2lJJoN7ZOgVI
H/kW/4GlkED0Jmru1AU5rIB8WsLM+yCjjBsTKs3uA5576GsDJwYLxE2frKQA
3JVzKoTXOt5nsy62g4tu0kWpOc4jYRqZxX1wCPfVsY0IFdmk7ehShnHpyfeW
4AY=</CipherValue>
</CipherData>
</EncryptedKey>
</KeyInfo>
<CipherData>
<CipherValue>JtJtzJ4mlqtTrIQYSQ0aaDj8k+1eQqM4G6nZPdf1e0nGB+X17
Gh1vzFpxaPoBTmogCpocNB9Ojai6XxWcCGIP2zEokuDyGCi5YeX4ZaRpk4q
7UUvFqXGuwMybxuT1VTOAOJrMJUJrODcwfTGzNwAb1YnYc/q0p0wBOSuprB
3dBjKpjRNUJMuMQzcl0RTZYMiS2hn1VPfoNNt7vaepGHZdUaOQR6jbBZY2xG
u/4PVlBvuVH0q7od+YzctmrZmkGcbXDIXv2edo8WeWF/5g5Jigu5uISPnffes
qbaQPkWph/jwjMtx13xaZRZbiVD8ofc2VSxwgp9zhDu3yVf5UgrxhWkmf1SF
d0m0VhCdozdB9Dvnzhz/OWb55xJ9RDORrj4lkiPDxy+JIi59Rnf2xWA30iZ83
77XHCs3p37dygGWE34=</CipherValue>
</CipherData>
</EncryptedData>
</appSettings>
<connectionStrings>
<EncryptedData>
<EncryptionMethod>
<KeyInfo>
<EncryptedKey>
<EncryptionMethod>
<KeyInfo>
<KeyName>Rsa Key</KeyName>
</KeyInfo>
<CipherData>
<CipherValue>V7aZWDJGrEWxUemtNHbI7V1gleZf2X9a+bKwfJuu5UHqkD
Qole31YCLBJ2kbwJKqXYZm2VUL2SqXgEAncniDKxxv7H6MG5ZnzMDizWrF1
8IcM23BMZp+t1OnqoksGq9BBJwtz0JtehL8JXR5P9IbCwMQcWtgnCJYAonOg
I/PbDo=</CipherValue>
</CipherData>
</EncryptedKey>
</KeyInfo>
<CipherData>
<CipherValue>P0szBMOfe+bS1xqvp35l2Df2GUiyaSmC1CZT+773keVEQaI
SwhZH7FQ8IEV/cdN/DytXeXdel1R28O98QsrfXtG3oZoLpLmZ8RoKhIpe3Bxq
XdtXLRgS58MkyXg4g3WoX2hUuCSgKZAlSk+hy2wI0cwTD89BcNzyqMEDR7
JVxifRbBTuzBNeEjGjAF1KW0E1s8Dy/YrjKnLkVHCClDTDziL/rmgWk+XW1sE
eqdQL6vYWgUp9kspkxWwiQjvgl/VLiCE/zbo2ir2I74/t7PgcbHCy2Ttwubn4Wx
LIEd5ZGcdIuthcrPUyqg==</CipherValue>
</CipherData>
</EncryptedData>
</connectionStrings>
<system>
<Set>
<compilation>
<!--
The <authentication> section enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.
-->
<authentication>
<!--
The <customErrors> section enables configuration
of what to do if/when an unhandled error occurs
during the execution of a request. Specifically,
it enables developers to configure html error pages
to be displayed in place of a error stack trace.
<customErrors>
<error>
<error>
</customErrors>
-->
</system>
</configuration> |
|
Back to top |
|
|
Pointeman
Joined: 07 Sep 2010 Posts: 56
|
Posted: Tue Sep 07, 2010 6:44 pm Post subject: Should there be AuthenticationService.asmx.cs CodeBehind? |
|
|
<WebService> |
|
Back to top |
|
|
SdB
Joined: 31 Aug 2010 Posts: 35
|
Posted: Tue Sep 07, 2010 8:10 pm Post subject: |
|
|
Updating the authentication server requires you to upload the saved AuthenticationServerSettings.xml to your webspace and restart the authentication server to make the settings change working. |
|
Back to top |
|
|
Pointeman
Joined: 07 Sep 2010 Posts: 56
|
Posted: Tue Sep 07, 2010 10:03 pm Post subject: |
|
|
Still returns same error:
"RSA key container could not be opened web.config line 4"
I've build many Web Service before and have not seen this kind of problem before.
As well, I have uninstalled everything rebooted, reinstalled and still have the same issue.
I have also added permissions (Everyone/All) to the entire inetpub directory and subs and still have same error.
Here's the complete error message:
Error: Server was unable to process the request. ---> The Type initializer for 'AuthenticationServer.Database' threw and exception. --> Failed to decrypt using provider RsaProtectedConfigurationProvider'. Error message from the provider: The RSA key container could not be opened: C:\inetpub\authenticate.ourcompanyname\web.config line 4) ---> The RSA key container could not be opened. |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Tue Sep 07, 2010 11:12 pm Post subject: |
|
|
It looks like your system is having a problem with encrypting/decrypting the appSettings and connectionStrings in the web.config file for some reason. I've not seen this issue before. I've just double checked that using encrypted connectionStrings works correctly under .NET 3.5.
This uses the standard .NET mechanism for encrypting connection strings - so I'm not sure why you are having this problem - but we will do some more research. I can confirm the warning squiggles you are getting when you open the web.config in Visual Studio occur even when the solution is working. A workaround for now would be to re-install the original web.config that comes with ILS and then run the Install.aspx page again. This time don't tick the "Encrypt Connection Details" box. _________________ Infralution Support |
|
Back to top |
|
|
Pointeman
Joined: 07 Sep 2010 Posts: 56
|
Posted: Tue Sep 07, 2010 11:47 pm Post subject: |
|
|
It's working now. The new install web.config has approx 40 fewer lines. I successfully 'licensed' the AuthenticationApp_CS project. The .lic file looks like this; Does this look secure enough?
<AuthenticatedLicense>
<ProductName>My Product</ProductName>
<EncryptedLicenseKey>8EA6-B8FE-5048-A709-8F32-5A05-5CF6-072A</EncryptedLicenseKey>
<ComputerID>DevTower1</ComputerID>
<Signature>VXAzmIBWQR1mpslGQmne+M6K8oxcDeJBipt8hIkv4Wd42/y+cy4jJrqZ/scKYeWfnJVmnZeETHatcdeXDkO7K2JR8p2B8Iks9XGxiUZCzjfcg9KTV6NnK+TOSefbAjnds/vhYpCBEPIGt0skoQfNZpDvqP5usfBvyTCU0kdammo=</Signature>
</AuthenticatedLicense> |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Wed Sep 08, 2010 2:38 am Post subject: |
|
|
Yes that looks normal. _________________ Infralution Support |
|
Back to top |
|
|
Pointeman
Joined: 07 Sep 2010 Posts: 56
|
Posted: Wed Sep 08, 2010 12:22 pm Post subject: |
|
|
Thank you for "Excellent" support. |
|
Back to top |
|
|
|