DNN Forums

Ask questions about your website to get help learning DNN and help resolve issues.

Errors in Logs

Sort:
You are not authorized to post a reply.
Page 1 of 212 > >>





New Around Here





    We are receiving some errors and specifically when submitting a form, the form does not send an email:

    Message:Padding is invalid and cannot be removed.

    StackTrace:

    
     

     

    InnerMessage:Padding is invalid and cannot be removed.

    InnerStackTrace:

       at System.Security.Cryptography.CapiSymmetricAlgorithm.DepadBlock(Byte[] block, Int32 offset, Int32 count)
       at System.Security.Cryptography.CapiSymmetricAlgorithm.TransformFinalBlock(Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount)
       at System.Security.Cryptography.CryptoStream.FlushFinalBlock()
       at System.Security.Cryptography.CryptoStream.Dispose(Boolean disposing)
       at System.IO.Stream.Close()
       at DotNetNuke.Security.FIPSCompliant.DecryptAES(String encryptedText, String passPhrase, String salt, Int32 iterations)
       at DotNetNuke.Services.Mail.CoreMailProvider.GetDefaultSmtpInfo(SmtpInfo smtpInfo)
       at DotNetNuke.Services.Mail.CoreMailProvider.ParseSmtpServer(SmtpInfo& smtpInfo)
       at DotNetNuke.Services.Mail.CoreMailProvider.SendMail(MailInfo mailInfo, SmtpInfo smtpInfo)
       at DotNetNuke.Services.Mail.Mail.SendMail(String mailFrom, String mailTo, String cc, String bcc, String replyTo, MailPriority priority, String subject, MailFormat bodyFormat, Encoding bodyEncoding, String body, List`1 attachments, String smtpServer, String smtpAuthentication, String smtpUsername, String smtpPassword, Boolean smtpEnableSSL)
       at DotNetNuke.Modules.UserDefinedTable.Components.TrackingController.SendMail(String from, String mailTo, String cc, String bcc, String replyto, String subject, String data, String message, String trigger, String script)
       at DotNetNuke.Modules.UserDefinedTable.Components.TrackingController.HandleAction(Trigger trigger, DataSet data, UserDefinedTableController udtC)
       at DotNetNuke.Modules.UserDefinedTable.Components.TrackingController.OnAction(Trigger trigger, Int32 rowId, UserDefinedTableController udtC)
       at DotNetNuke.Modules.UserDefinedTable.EditForm.cmdUpdate_Click(Object sender, EventArgs e)

     

    Source:

    FileName:

    FileLineNumber:0

    FileColumnNumber:0

     

    Looking the SMTP portion (because it's referenced in the log), I went to check our STMP settings. If I try to update them, I get the following:






    Veteran Member





      Hello Dave... Welcome to the forums! What module/feature are you using to send email? Is it only the SMTP feature where you've tried it?

      Is the error you posted directly a result of the SMTP view you've highlighted, or from a module? Are there any other related errors in the logs?

      What SMTP service are you trying to use? Does that also have any logging that you can look into?





      New Around Here





        I believe the module is called Forms and Lists. However, no mail seems to work. As an example, when adding a user to a role in the DNN settings, we receive errors as well. This leads me to believe the root cause is the SMTP setup.

        The SMTP page you see there is in Settings - Servers - Server Settings. I am unable to enter any SMTP information because that last screenshot comes up every time I leave that screen and come back (even if I try to save, it is blank when I come back).

        When I look at the logs immedately after going to that page, it appears it's once again related to some padding issue:

        2023-12-08 11:28:29.405-08:00 [SERVERNAME][D:3][T:56][ERROR] Dnn.PersonaBar.Servers.Services.ServerSettingsSmtpHostController - System.Security.Cryptography.CryptographicException: Padding is invalid and cannot be removed.
        at System.Security.Cryptography.CapiSymmetricAlgorithm.DepadBlock(Byte[] block, Int32 offset, Int32 count)
        at System.Security.Cryptography.CapiSymmetricAlgorithm.TransformFinalBlock(Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount)
        at System.Security.Cryptography.CryptoStream.FlushFinalBlock()
        at System.Security.Cryptography.CryptoStream.Dispose(Boolean disposing)
        at System.IO.Stream.Close()
        at DotNetNuke.Security.FIPSCompliant.DecryptAES(String encryptedText, String passPhrase, String salt, Int32 iterations)
        at Dnn.PersonaBar.Servers.Services.ServerSettingsSmtpHostController.GetSmtpPassword(Int32 portalId, Boolean obfuscate)
        at Dnn.PersonaBar.Servers.Services.ServerSettingsSmtpHostController.GetSmtpSettings()





        Veteran Member





          What version of DNN are you using?  

          Are you able to see the SMTP settings at all before you attempt to update them?  What SMTP provider are you trying to use? 

          If you're not able to see those values, you can run the query below against the database to see what they are.  

          SELECT * 
          FROM [dbo].[HostSettings] 
          WHERE [SettingName] LIKE '%SMTP%' 
          ORDER BY [SettingName];
          
          SELECT * 
          FROM [dbo].[PortalSettings] 
          WHERE [SettingName] LIKE '%SMTP%' 
          ORDER BY [PortalId], [SettingName];





          New Around Here





            Good morning,

            DNN V 9.12
            No, the settings aren't in the UI at all. I immediately get the error at the bottom of my first post.
            The data is in the database.
            The provider is an internal SMTP address (I think that's what you're asking).

            One additional piece of information is that we migrated to a new server in the fall. The odd part is that everything else works except the email piece.






            Growing Member





              Make sure you have a row for SettingName = 'SMTPmode' in PortalSettings for the primary portal, and the SettingValue = 'h'. That setting is the one that sets the 'global' option. If you don't have that, you will get the error you see about not being able to load the SMTP settings.





              Growing Member





                Also, post your 'SMTP*' settings from HostSettings and PortalSettings tables, obscuring the credential/server values, of course :)





                New Around Here





                  Updated that (was a p) but same result (also did an iisreset to make sure the app reloaded)






                  New Around Here





                    Through all this back and forth, you guys helped me narrow down the issue. I think I figured it out. I basically used SQL to update all of the SMTP settings back to blank. Now I am able to load the SMTP settings page and a test email worked!

                    Thank you very much





                    New Around Here





                      Now....how do I mark this solved? :)
                      You are not authorized to post a reply.
                      Page 1 of 212 > >>

                      These Forums are dedicated to the discussion of DNN Platform.

                      For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

                      1. If you have (suspected) security issues, please DO NOT post them in the forums but instead follow the official DNN security policy
                      2. No Advertising. This includes the promotion of commercial and non-commercial products or services which are not directly related to DNN.
                      3. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
                      4. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
                      5. No Flaming or Trolling.
                      6. No Profanity, Racism, or Prejudice.
                      7. Site Moderators have the final word on approving / removing a thread or post or comment.
                      8. English language posting only, please.

                      Would you like to help us?

                      Awesome! Simply post in the forums using the link below and we'll get you started.

                      Get Involved