+1-888-365-2779
Try Now
More in this section

Forums / Bugs & Issues / Getting error in the Newsletters Module

Getting error in the Newsletters Module

20 posts, 0 answered
  1. Nimit
    Nimit avatar
    90 posts
    Registered:
    27 Mar 2009
    09 Jun 2009
    Link to this post
    Hi,
    I am using Newsletters module for creating notifications, which sends email to a bunch of email addresses and the newsletter is posted on the website,
    But the issue is coming when I create a notification and click on "send this newsletter now"  button it gives me the following error.
      

    Server Error in '/' Application.

    Primary key cannot be null.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: Nolics.ORMapper.Base.NolnetException: Primary key cannot be null.

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace:

    [NolnetException: Primary key cannot be null.]
       Nolics.ORMapper.Base.OdbClassHelper.CreateClass(IOdbClass cl, Transaction tran, OdbDataProvider provider, ObDataCache cache, OdbObjectStates& state, OdbDataProvider& curProvider, ObDataCache& curCache) +520
       Telerik.Notifications.Data.Mailing.ProgressState.Create(Transaction tran, OdbDataProvider provider, ObDataCache cache) +51
       Nolics.ORMapper.Base.Transaction.Create(IOdbClass mem, OdbDataProvider provider) +27
       Telerik.Notifications.Data.DefaultProvider.SaveState(IProgressState state) +137
       Telerik.Notifications.Newsletters.WebControl.NewsletterSendingProgress.StartSending() +2970
       Telerik.Notifications.Newsletters.WebControl.NewsletterSendingProgress.OnPreRender(EventArgs e) +68
       System.Web.UI.Control.PreRenderRecursiveInternal() +80
       System.Web.UI.Control.PreRenderRecursiveInternal() +171
       System.Web.UI.Control.PreRenderRecursiveInternal() +171
       System.Web.UI.Control.PreRenderRecursiveInternal() +171
       System.Web.UI.Control.PreRenderRecursiveInternal() +171
       System.Web.UI.Control.PreRenderRecursiveInternal() +171
       System.Web.UI.Control.PreRenderRecursiveInternal() +171
       System.Web.UI.Control.PreRenderRecursiveInternal() +171
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +842
    


    Version Information: Microsoft .NET Framework Version:2.0.50727.3082; ASP.NET Version:2.0.50727.3082

    I don't know what to do.
    If anyone can help me please.

    Thank you,
    Nimit Verma
  2. Stoyanka Assenova
    Stoyanka Assenova avatar
    113 posts
    Registered:
    01 Dec 2016
    10 Jun 2009
    Link to this post
    Hi Nimit,

    Which Sitefinity version are you using? You can read more about how to check your Sitefinity version in the KB article: How to check your current Sitefinity version?

    Regards,
    Stoyanka Assenova
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. Nimit
    Nimit avatar
    90 posts
    Registered:
    27 Mar 2009
    10 Jun 2009
    Link to this post
    Hi Stoyanka,
    I checked the Sitefinity version and it is 3.2.1598.2.
    so, what should I do now.

    Regards,
    Nimit verma.
  4. Stoyanka Assenova
    Stoyanka Assenova avatar
    113 posts
    Registered:
    01 Dec 2016
    10 Jun 2009
    Link to this post
    Hello Nimit,

    This is a known issue in Sitefinity 3.2 SP2.

    To fix it now, could you try clearing the following tables:
        * sf_Notif_Newsletter
        * sf_Notif_FailedEmail
        * sf_Notif_ProgressState


    Do that and try sending the newsletters again.

    Hope this helps.

    Best wishes,
    Stoyanka Assenova
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  5. Nimit
    Nimit avatar
    90 posts
    Registered:
    27 Mar 2009
    10 Jun 2009
    Link to this post
    Hi Stoyanka,
    I tried to clear the table which you told me to do,
    but it still gives me the same Primary key error.
    One thing more even if before send the Newsletter there is a option of send a test email which is as follows

    Test email

    Send as test mail before send to real subscribers

    when I send a test email it give the following error.

    Test email

    Sending is failed, you can try again after fixing this error. (How to set mail server?)

    So what should I do please help.

    Regards,
    Nimit Verma
  6. Stoyanka Assenova
    Stoyanka Assenova avatar
    113 posts
    Registered:
    01 Dec 2016
    10 Jun 2009
    Link to this post
    Hi Nimit,

    Could you please make sure that you set up correct the correct smtp settings in the web.config file.
    <system.net>
    <mailSettings>
    <smtp from="mailmaster@yourdomain.com">
    <network host="smtp.yourdomain.com" userName="YourUsername" password="YourPassword" port="25" />
    </smtp>
    </mailSettings>
    </system.net>


    Sincerely yours,
    Stoyanka Assenova
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  7. Nimit
    Nimit avatar
    90 posts
    Registered:
    27 Mar 2009
    10 Jun 2009
    Link to this post
    Hi Stoyanka,
    The mail settings already setup, because I amde a user control which simply sends an email and it works fine.
    I don't know why newsletter is not sending the emails.

    Reagrds,
    Nimit Verma.
  8. Nimit
    Nimit avatar
    90 posts
    Registered:
    27 Mar 2009
    10 Jun 2009
    Link to this post
    Hi Stoyanka,
    The mail settings already setup, because I amde a user control which simply sends an email and it works fine.
    I don't know why newsletter is not sending the emails.

    Reagrds,
    Nimit Verma.
  9. Stoyanka Assenova
    Stoyanka Assenova avatar
    113 posts
    Registered:
    01 Dec 2016
    11 Jun 2009
    Link to this post
    Hi Nimit,

    Please, do the following steps:
    You should be working in full trust.

    1. Open the folder ~/Sitefinity/ServiceAssemblies and  delete the assembly there.
    2. Open the database and  clearing the following tables:
        * sf_Notif_Newsletter
        * sf_Notif_FailedEmail
        * sf_Notif_ProgressState
    3. Login in the project
    4. Go to the Newsletters module. Service Assemblies will be recreated automatically
    5. Try to send a newsletter

    If you have the same problem, we would recommend you to upgrade your project to the latest Sitefinity version (Sitefinity 3.6 SP2, version - 1936).

    You can find the upgrade instructions here.

    All the best,
    Stoyanka Assenova
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  10. Nimit
    Nimit avatar
    90 posts
    Registered:
    27 Mar 2009
    11 Jun 2009
    Link to this post
    Hi Stoyanka,

    Thank you very much after deleting the temperary assembly i started to work.
    I really appreciate your help.

    Best Regards,
    Nimit Verma. 
  11. Nimit
    Nimit avatar
    90 posts
    Registered:
    27 Mar 2009
    15 Jun 2009
    Link to this post
    Hi Stoyanka,
    Good morning
    I need help in one more thing in the Newsletter. Today I created a newsletter and added three subsribers.
    1. Subcriber have 21 emails.
    2. Subcriber have 10 emails.
    3. Subscriber have 1 emails.
    After I am done and send the newsletter, it show that it is sending but its been two hours it is still showing the following message.

    Bus service is being sent right now. Sending ( Stop)

    0 %

    Sending may take a considerable amount of time. So, you can proceed with your Sitefinity tasks meanwhile

  12. Stoyanka Assenova
    Stoyanka Assenova avatar
    113 posts
    Registered:
    01 Dec 2016
    16 Jun 2009
    Link to this post
    Hi Nimit,

    If the sending process does not finish, please, could you check the sitefinity.log file for any errors? You can find it in the App_Data folder. Please, send us the errors from it so we could tell you what the exact problem is.

    Best wishes,
    Stoyanka Assenova
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  13. Nimit
    Nimit avatar
    90 posts
    Registered:
    27 Mar 2009
    16 Jun 2009
    Link to this post
    Hi Stoyanka ,
    I am sending you two errors from the log file, please have a look.
    and these errors are:-->

    6/15/2009 7:22:57 AM [UNKNOWN]
    ************************************************************************************
    ID: b338ae03-c477-4434-a39e-470d7cd7d34a; Code: 3005; Occurrence: 1; Sequence: 264
    ------------------------------------------------------------------------------------

    Application information:
     Machine name: WEB6
     OS Version: Microsoft Windows NT 5.2.3790 Service Pack 2
     Product Version: 3.2.1598.2
     Application Path: E:\www.sinton.com\
     Debug: True

    Process information:
     Process ID: 5848
     Process Name: w3wp

    Request information:
     Request URL: /ScriptResource.axd?d=qZg82UNXrmFqEPiDhtbERcwN-4jN5PjKmv,%20document.getElementById('aspnetForm'));Sys.WebForms.PageRequestManager.getInstance()._updateControls(['tctl00$ContentPlaceHolder1$contolPanel$ctl00$ctl00$ctl00$MergedFieldUpdatePanel','tctl00$ContentPlaceHolder1$contolPanel$ctl00$ctl00$ctl00$UpdatePanel1'],%20[],%20['ctl00$ContentPlaceHolder1$ctl00$ctl00$ctl00$newslettersViewButton','ctl00$ContentPlaceHolder1$ctl00$ctl00$ctl00$draftsButton','ctl00$ContentPlaceHolder1$ctl00$ctl00$ctl00$beingSendNewsletterButton','ctl00$ContentPlaceHolder1$ctl00$ctl00$ctl00$sentButton','ctl00$ContentPlaceHolder1$ctl00$ctl00$ctl00$failedAndStoppedButton'],%20600);//]]></script><a%20href=
     Rewrite URL: http://www.sinton.com/ScriptResource.axd?d=qZg82UNXrmFqEPiDhtbERcwN-4jN5PjKmv, document.getElementById('aspnetForm'));Sys.WebForms.PageRequestManager.getInstance()._updateControls(['tctl00$ContentPlaceHolder1$contolPanel$ctl00$ctl00$ctl00$MergedFieldUpdatePanel','tctl00$ContentPlaceHolder1$contolPanel$ctl00$ctl00$ctl00$UpdatePanel1'], [], ['ctl00$ContentPlaceHolder1$ctl00$ctl00$ctl00$newslettersViewButton','ctl00$ContentPlaceHolder1$ctl00$ctl00$ctl00$draftsButton','ctl00$ContentPlaceHolder1$ctl00$ctl00$ctl00$beingSendNewsletterButton','ctl00$ContentPlaceHolder1$ctl00$ctl00$ctl00$sentButton','ctl00$ContentPlaceHolder1$ctl00$ctl00$ctl00$failedAndStoppedButton'], 600);//]]></script><a href=
     Url Referrer: http://www.sinton.com/Sitefinity/Admin/Modules.aspx?module=Newsletters
     Is Authenticated: True
     Authentication Type: Forms
     User: grant
     User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; GTB6; .NET CLR 1.1.4322; OfficeLiveConnector.1.3; OfficeLivePatch.0.0; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; yie8)
     User Address: 208.80.99.59

    Variables:
     AspSessionIDManagerInitializeRequestCalled: True

    - L0 -------------------------------------------------------------------------------

    Exception Type: System.Web.HttpException

    Message: Invalid viewstate.

    Source: System.Web

    Stack Trace:
       at System.Web.UI.Page.DecryptStringWithIV(String s, IVType ivType)
       at System.Web.UI.Page.DecryptString(String s)
    ------------------------------------------------------------------------------------

     

    6/15/2009 7:27:30 AM [UNKNOWN]
    ************************************************************************************
    ID: 7b189236-5553-4beb-b37c-00ac18fba9f4; Code: 3005; Occurrence: 4; Sequence: 357
    ------------------------------------------------------------------------------------

    Application information:
     Machine name: WEB6
     OS Version: Microsoft Windows NT 5.2.3790 Service Pack 2
     Product Version: 3.2.1598.2
     Application Path: E:\www.sinton.com\
     Debug: True

    Process information:
     Process ID: 5848
     Process Name: w3wp

    Request information:
     Request URL: /WebResource.axd?d=Ic9LL5IqSa757YpcUMCsCVVgairO9FSUSpBdzOpxruq5683aGvFLqZUgXbHpP2D0M01NnYZF1RC085h1a3B0JvgERhNNbAgWH-d-NSwOJGcctl00$ContentPlaceHolder1$contolPanel$ctl00$ctl00$GridView$ctl02$groups$ctl01$grpbtn','ctl00$ContentPlaceHolder1$contolPanel$ctl00$ctl00$GridView$ctl02$groups$ctl02$grpbtn','ctl00$ContentPlaceHolder1$contolPanel$ctl00$ctl00$GridView$ctl02$subjectbtn','ctl00$ContentPlaceHolder1$contolPanel$ctl00$ctl00$GridView$ctl02$Deletebtn','ctl00$ContentPlaceHolder1$contolPanel$ctl00$ctl00$GridView$ctl02$Duplicatebtn','ctl00$ContentPlaceHolder1$contolPanel$ctl00$ctl00$GridView$ctl03$stopResumebtn','ctl00$ContentPlaceHolder1$contolPanel$ctl00$ctl00$GridView$ctl03$groups$ctl00$grpbtn','ctl00$ContentPlaceHolder1$contolPanel$ctl00$ctl00$GridView$ctl03$groups$ctl01$grpbtn','ctl00$ContentPlaceHolder1$contolPanel$ctl00$ctl00$GridView$ctl03$groups$ctl02$grpbtn','ctl00$ContentPlaceHolder1$contolPanel$ctl00$ctl00$GridView$ctl03$subjectbtn','ctl00$ContentPlaceHolder1$contolPanel$ctl00$ctl00$GridView$ctl03$Deletebtn','ctl00$ContentPlaceHolder1$contolPanel$ctl00$ctl00$GridView$ctl03$Duplicatebtn','ctl00$ContentPlaceHolder1$ctl00$ctl00$ctl00$newslettersViewButton','ctl00$ContentPlaceHolder1$ctl00$ctl00$ctl00$draftsButton','ctl00$ContentPlaceHolder1$ctl00$ctl00$ctl00$beingSendNewsletterButton','ctl00$ContentPlaceHolder1$ctl00$ctl00$ctl00$sentButton','ctl00$ContentPlaceHolder1$ctl00$ctl00$ctl00$failedAndStoppedButton'],%20600);//]]></script><a%20href=
     Rewrite URL: http://www.sinton.com/WebResource.axd?d=Ic9LL5IqSa757YpcUMCsCVVgairO9FSUSpBdzOpxruq5683aGvFLqZUgXbHpP2D0M01NnYZF1RC085h1a3B0JvgERhNNbAgWH-d-NSwOJGcctl00$ContentPlaceHolder1$contolPanel$ctl00$ctl00$GridView$ctl02$groups$ctl01$grpbtn','ctl00$ContentPlaceHolder1$contolPanel$ctl00$ctl00$GridView$ctl02$groups$ctl02$grpbtn','ctl00$ContentPlaceHolder1$contolPanel$ctl00$ctl00$GridView$ctl02$subjectbtn','ctl00$ContentPlaceHolder1$contolPanel$ctl00$ctl00$GridView$ctl02$Deletebtn','ctl00$ContentPlaceHolder1$contolPanel$ctl00$ctl00$GridView$ctl02$Duplicatebtn','ctl00$ContentPlaceHolder1$contolPanel$ctl00$ctl00$GridView$ctl03$stopResumebtn','ctl00$ContentPlaceHolder1$contolPanel$ctl00$ctl00$GridView$ctl03$groups$ctl00$grpbtn','ctl00$ContentPlaceHolder1$contolPanel$ctl00$ctl00$GridView$ctl03$groups$ctl01$grpbtn','ctl00$ContentPlaceHolder1$contolPanel$ctl00$ctl00$GridView$ctl03$groups$ctl02$grpbtn','ctl00$ContentPlaceHolder1$contolPanel$ctl00$ctl00$GridView$ctl03$subjectbtn','ctl00$ContentPlaceHolder1$contolPanel$ctl00$ctl00$GridView$ctl03$Deletebtn','ctl00$ContentPlaceHolder1$contolPanel$ctl00$ctl00$GridView$ctl03$Duplicatebtn','ctl00$ContentPlaceHolder1$ctl00$ctl00$ctl00$newslettersViewButton','ctl00$ContentPlaceHolder1$ctl00$ctl00$ctl00$draftsButton','ctl00$ContentPlaceHolder1$ctl00$ctl00$ctl00$beingSendNewsletterButton','ctl00$ContentPlaceHolder1$ctl00$ctl00$ctl00$sentButton','ctl00$ContentPlaceHolder1$ctl00$ctl00$ctl00$failedAndStoppedButton'], 600);//]]></script><a href=
     Url Referrer: http://www.sinton.com/Sitefinity/Admin/Modules.aspx?module=Newsletters
     Is Authenticated: True
     Authentication Type: Forms
     User: grant
     User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; GTB6; .NET CLR 1.1.4322; OfficeLiveConnector.1.3; OfficeLivePatch.0.0; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; yie8)
     User Address: 208.80.99.59

    Variables:
     AspSessionIDManagerInitializeRequestCalled: True

    - L0 -------------------------------------------------------------------------------

    Exception Type: System.Web.HttpException

    Message: Invalid viewstate.

    Source: System.Web

    Stack Trace:
       at System.Web.UI.Page.DecryptStringWithIV(String s, IVType ivType)
       at System.Web.Handlers.AssemblyResourceLoader.System.Web.IHttpHandler.ProcessRequest(HttpContext context)
       at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
       at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
    ------------------------------------------------------------------------------------

    Please reply ASAP.

    Best regards,
    Nimit Verma

  14. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    17 Jun 2009
    Link to this post
    Hi Nimit,

    Looking at the stack traces of the errors, I see that the error is Invalid Viewstate.

    Could you please check the following things:
    1. If your web site is running on several web servers (in a webfarm/webgarden), please ensure that both machines have the same MachineKey defined in the machine.config file.
    2. Can you please see if the exception match with the application pool recycling? You can see the time stamp of the two events. If this is the case, please consider to increase the memory or the recycling time of the pool.

    In both exceptions, the requested file is behind the ScriptResource -  there is probably a JavaScript file there. Please let us know what this file is, we will try to reproduce this locally.

    Regards,
    Georgi
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  15. Nimit
    Nimit avatar
    90 posts
    Registered:
    27 Mar 2009
    17 Jun 2009
    Link to this post
    Hi Georgi,

    Thank you for mailing.
    Now,
     Firstly, regarding being on number of machines;--> this application is only on one machine.
    Secondly, the recycle worker processess is 1740 (minutes) 
    Thirdly, I don't know where to find the ScriptResource file and
    I don't know what  to do.

    Best Regards,

    Nimit Verma.
  16. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    19 Jun 2009
    Link to this post
    Hello Nimit,

    Could you please let us know if you have defined any MergedFields different than the default ones (MergedFields="FirstName;LastName")? This is done in the web.config file. Do you have any newsletters created with MergedFields?

    It is possible that this error is thrown by the debug libraries of Asp.Net AJAX framework. Please try to set <compilation debug="false" /> in the web.config file, in order to stop the debugging libraries. I am not sure if this will help, but we might try.

    Kind regards,
    Georgi
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  17. Nimit
    Nimit avatar
    90 posts
    Registered:
    27 Mar 2009
    19 Jun 2009
    Link to this post
    Hi Georgi,
    I don't have any MergedFields but I did set <compilation debug="false" /> in web.config file and it worked.
    Thank you very much for your help I was stuck on this for a long time.

    Thank you for your time,
    Nimit Verma.
  18. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    22 Jun 2009
    Link to this post
    Hi Nimit,

    I am glad it worked. I am still not sure why the debug libraries are failing, but we will check this out.
    Thank you for the follow up though.

    Kind regards,
    Georgi
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  19. Nimit
    Nimit avatar
    90 posts
    Registered:
    27 Mar 2009
    24 Jun 2009
    Link to this post
    Hi Georgi,
    Today again we tried to send the newsletter and once again still trying to send the emails as shown below. There is no error in the sitefinity log file.
    One thing more sending newsletter to one email works fine, but when as in the example below the Subscriber groups below have more than 10 emails and one of them has 21 emails it never sends just stucks.



    I don't know where to start with.
    Please reply ASAP.

    Best Regards,
    Nimit Verma.
  20. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    25 Jun 2009
    Link to this post
    Hi Nimit,

    Can you please make sure that:

    1. There are no special characters in each subscriber First and Last name. These names should contain latin characters only.
    2. There is no e-mail set for the first name or last name fields.
    3. These fields are not empty.

    Best wishes,
    Georgi
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Register for webinar
20 posts, 0 answered