While trying to set up a dynamic subscription provider I encouter following error. My best guess is that property DataProviderKey is casted to int, but failed because of its value.
What is the purpose of DataProviderKey. Should it be unique ?
Thanks for your answer,
This newsletter has the status error, something probably went wrong during the send out
Error message:
NewsletterStudio, SendNewsletterService: Conversion failed when converting the nvarchar value '6648f79b-9f17-4e07-9350-8528e8ce5e94' to data type int. : at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData() at System.Data.SqlClient.SqlDataReader.get_MetaData() at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) at System.Data.SqlClient.SqlCommand.ExecuteScalar() at NewsletterStudio.Infrastucture.Data.PetaPoco.Database.Insert(String tableName, String primaryKeyName, Boolean autoIncrement, Object poco) at NewsletterStudio.Infrastucture.Data.PPDatabaseAdaptor.Insert(String tableName, String primaryKeyName, Object obj) at NewsletterStudio.Infrastucture.Data.EmailTrackingItemRepository.Save(EmailTrackingItem emailTrackingItem) at NewsletterStudio.Services.EmailTrackingItemService.CreateTrackingItems() at NewsletterStudio.Services.SendNewsletterService.SendEmails()
You can try to continue to send the newsletter by going to the "Send options" and follow the instructions.
The "data provider key" is used to locate a mailing list within the Subscription Provider. The two providers that we ship with the package are both storing int's but after looking at this it turns out that all the code works with string but when a letter is about to be sent the "EmaiTrackingItems" are created, during this it tries to store the DataProviderKey as a INT in the table ns_EmaiTrackingItems.
You could try to just change the datatype of that column to string - it might "just work". I will post this as a bug that will be fixed in upcoming releases.
First test went well. SubscriberId received correct value and mail got sent. Unsubsription and links cliked all followed. To me no problems in changing the column type.
Thanks for you help.
NewsletterStudio, SendNewsletterService: Conversion failed
While trying to set up a dynamic subscription provider I encouter following error. My best guess is that property DataProviderKey is casted to int, but failed because of its value.
What is the purpose of DataProviderKey. Should it be unique ?
Thanks for your answer,
Hi!
The "data provider key" is used to locate a mailing list within the Subscription Provider. The two providers that we ship with the package are both storing int's but after looking at this it turns out that all the code works with string but when a letter is about to be sent the "EmaiTrackingItems" are created, during this it tries to store the DataProviderKey as a INT in the table ns_EmaiTrackingItems.
You could try to just change the datatype of that column to string - it might "just work". I will post this as a bug that will be fixed in upcoming releases.
// m
Thanks for this anwser. I'll try to change the column type as explained.
Great! Let me know how that works =D
First test went well. SubscriberId received correct value and mail got sent. Unsubsription and links cliked all followed. To me no problems in changing the column type. Thanks for you help.
Nice!
Thanks for sharing your experiance - I'll give it some testing as well and change this in upcoming releases.
is working on a reply...