View previous topic :: View next topic |
Author |
Message |
Fishtail
Joined: 29 Sep 2011 Posts: 8
|
Posted: Thu Oct 27, 2011 4:09 pm Post subject: Why do I get SqlException: Invalid column name 'ProductName' |
|
|
We want to generate multiple keys for users of our ASP.NET site, which is hosting AuthenticationService.asmx. Our database is SQL 2005. We want the users to add their keys through a web form, which is sent to this function for validation (we're not storing the keys here, just want to know if they're valid):
Code: | internal static bool AuthenticateTraineeLicense(string licenseKey)
{
AuthenticatedLicenseProvider provider = new AuthenticatedLicenseProvider();
return provider.AuthenticateKey(LICENSE_PARAMETERS, licenseKey) != null;
} |
If I supply a bad key, the function returns false as expected. However, if I supply a valid key from the License Tracker, a SqlException is thrown:
Quote: | Invalid column name 'ProductName'
...
at AuthenticationServer.AuthenticationService.Authenticate(String productName, String sessionKey, Byte[] encryptedArgs) |
AuthenticationServer.dll and Infralution.Licensing.dll both show version 4.7.2.0, but the Schema column in the System table shows 4.6.0 - if that matters.
Did we make a mistake somewhere?
Thanks! |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Thu Oct 27, 2011 10:25 pm Post subject: |
|
|
The authentication server can run in one of two modes. In one mode it connects directly to the License Tracker database in the other it uses its own separate Authentication database and the authentication data can then be imported back into the License Tracker database using the License Tracker Authentication->Import Data menu. This second mode is useful when your authentication service is being hosted remotely.
It looks like the authentication server thinks that it is connected to a standalone but the database is actually the fully License Tracker database. I'm not sure how this could have happened. When you install the Authentication Server it detects the type of database you are connecting to and sets a IsLicenseTrackerDatabase property in the config file. Did you maybe change the database after running the Install page?
If you want the Authentication Server to connect directly to your License Tracker database then you should just upload (if required) and run the Install.aspx page again (as described in the help) and select your database. If you don't encrypt the settings initially you will be able to check the Web.Config to ensure that the correct settings are being saved.
If you actually want Authentication Server to use its own separate database then you need to create an empty Database called "Authentication" then run the Install.aspx page and specify this database. The Install page will create the database schema required. _________________ Infralution Support |
|
Back to top |
|
|
Fishtail
Joined: 29 Sep 2011 Posts: 8
|
Posted: Fri Oct 28, 2011 3:23 pm Post subject: |
|
|
Thanks for the help. I couldn't get the security settings in IIS correct so that install.aspx would save the web.config, so I made a temporary virtual directory in IIS and copied the settings individually. However, I evidently forgot to copy the updated AuthenticationServerSettings.xml as well. It appears that all is good now.
Thanks! |
|
Back to top |
|
|
|