Dotcom Support Forums

To post in the forums you need to register and log in .

HomeHomeLicence MasterLicence MasterConfiguration &...Configuration &...Deleting a licence key wonDeleting a licence key won't work if bought through SC
Previous
 
Next
New Post
16/11/2011 16:21
 

Hi Paul,

With the new version we can't delete a key in the main admin area if it's been purchased through SC as the database won't allow it due to FKs:

Error: is currently unavailable. DotNetNuke.Services.Exceptions.ModuleLoadException: The DELETE statement conflicted with the REFERENCE constraint "FK_LicenceMaster_SnowCoveredAdaptor_Licence_LicenceMaster_Licence". The conflict occurred in database "xxxxxxxx", table "dbo.LicenceMaster_SnowCoveredAdaptor_Licence", column 'LicenceID'. The statement has been terminated. ---> System.Data.SqlClient.SqlException: The DELETE statement conflicted with the REFERENCE constraint "FK_LicenceMaster_SnowCoveredAdaptor_Licence_LicenceMaster_Licence". The conflict occurred in database "puresystems_dnn", table "dbo.LicenceMaster_SnowCoveredAdaptor_Licence", column 'LicenceID'. The statement has been terminated. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning() at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(String connectionString, CommandType commandType, String commandText, SqlParameter[] commandParameters) at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(String connectionString, String spName, Object[] parameterValues) at Dotcom.Modules.LicenceMaster.Data.SqlDataProvider.DeleteLicence(Int32 ItemId) at Dotcom.Modules.LicenceMaster.EditLicence.cmdDelete_Click(Object sender, EventArgs e) --- End of inner exception stack trace ---
 
New Post
19/11/2011 08:43
 

Hi Dan,

In what circumstances would you want to delete a licence that has been purchased on SC? I would have thought that once purchased, you need to honour the licence and therefore it shouldn't be deleted.

If you were to delete the licence, it would be necessary to delete the SC order record in the adaptor as well to avoid orphaned order records.

Is this a test scenario, ie. is it a fictional licence that you created as a result of testing the integration?

Cheers,


Dotcom Technical Support
 
New Post
22/11/2011 15:52
 

Hi Paul,

There were 2 instances, 1 was through a test which we wanted to clean up from the main module and the other scenario is that some customers wanted to upgrade to a new version of a module which uses a new licence key - we did it this way so that existing customers from way back couldn't just install the new version. So existing customers request a new key if they want to upgrade, we then revoke their old one once they've upgraded. Maybe there's a better way of handling this situation so any suggestions would be appreciated.

Cheers

Dan

 
New Post
23/11/2011 22:07
 

Hi Dan,

The easiest way to revoke a licence without deleting it is to set its ValidTo property to a past date. I am considering whether it would be a good idea to allow the deletion in any case, putting more power (and responsibility) in the hands of licence administrators. In any case, a friendly error is required and not the SQL one.


Dotcom Technical Support
 
New Post
23/11/2011 22:11
 

 In case of using indefinite license validity there is no option to set up a date.

It would be nice to have such option in case I need to revoke license or issue an extended evaluation license.

 
Previous
 
Next
HomeHomeLicence MasterLicence MasterConfiguration &...Configuration &...Deleting a licence key wonDeleting a licence key won't work if bought through SC



 Search   Home