Great Ideas. Always Flowing.

We are not happy until you are happy. Client satisfaction guaranteed. Whatever your needs and requirements, we have the skills and resources for the job!

Popular Posts

Tags

2008 2008 Express Add AFTER alert Alias Aliases Alter Alternating And ASC Assist BETA Blog Cancel Check ON Checkbox Checkbox Group Color Column Columns Combo Box Composite Confirm Confirm Message Control CREATE CREATE TABLE Data Data Springs Database DDL DELETE Delete Confirm Demo Demonstration DESC Direct Access DNN DotNetNuke Drop Drop Constratint Drop Down Drop Down List DS Dynamic Dynamic Blog Dynamic Forms Dynamic Registration Dynamic Views Edit Event Example Express Fade In Fade Out Field Filters FK Forms Full-Table Scan Generating Generator Generators Great Ideas Group Help HTML Increase Index Indexes Input Integrity jQuery Label Listbox Listener Message Modify My Account MySQL No NULL Often Ok ON Optimization Optimize Option Options Oracle Order By Perform Performance PK Popup PostreSQL Queries Query QuestionOptionValue Radio Button Radio Button Group References referential Round Script Search Search Filters SearchOption SearchOptionValue Select Server Snippet Sort Springs SQL SQL Driven SQL Driven Query SQL Express SQL Server SQL Server 2005 SQL Server 2008 SQL Server 2008 Express SQL Server 2008 R2 SQL Server Express SSMS Stored Stored Procedure TABLE Tables Temporary Tool Tools Tooltip Tooltips Transact-SQL Trials Triggers TSQL T-SQL Unique UPDATE Use Useful Views Widget Widgets Window Yes [userimage] 10 64 bit Ability ABS Action Active Forums Alleviate Alternating Colors Alternating Rows Analytics ARB asp.net asp.net validation AuthARB Authorize.NET Avoid Back Button Basecamp Blog Blog Posts Blogging Browser Browser Back Browser Close Browser History Browser Script Button cascading style sheet Case Char Character CharAt CharAt() Check chip levinson Click client side validation Close Browser Close Window Collection 5.0 Comment Compatibility Compatible Completion completion event Confirm Message Conform Constraints content localization Count Timer Countdown CRM css csv Cursor Custom Custom HTML Custom JavaScript Custom JavaScript File customer feedback Customize Data Data Integrity Data Springs Data Springs Blog Data Springs Collection Data Springs Development Data Springs Planning Data Springs Training Databases DataSprings Date Time JavaScript Debug Info default value Delete Demonstration DF DNN DNN Authentication DNN Blog DNN Core Profile Property dnn html module dnn modules dnn schedule error dnn schedule multiple DNN Store document document.getElementById DotNetNuke dotnetnuke 5.4.4 DotNetNuke Analytics DotNetNuke Forums DotNetNuke JavaScript DotNetNuke Modules dotnetnuke reporting dotnetnuke scheduler dotnetnuke user image Double Double Quotes DR DROP Drop Constraint DropDown Login DS dynamic Dynamic Data dynamic fields Dynamic Form Dynamic Forms dynamic forms silent post Dynamic Forms Tutorial dynamic login Dynamic PDF Form Completion Event dynamic registration dynamic registration silent post dynamic registration user image dynamic user directory dynamic views DynamicRegistration_Question DynamicRegistration_QuestionResponse email email issues Encapsulated Encapsulation Even Event Event Viewer Example Excel Execute Export Export to Excel Facebook Facebook Connect Field FieldID First FirstName Fix Foreign Key Form Form Post Formatting Forms Forum Flow Full Table Scan Fully Function Google Analytics Google Analytics Ecommerce Great Great ideas Grid guides hidden field Hide Show Rows Highrise Highrise API Hourly Services HTML HTTP Post iDeal IE IE 10 Image Image Button Include Inconsistancy Info Information Injection INSERT Integration Interactive User Import Interface internet Internet Explorer iPAD iPAD App for Highrise iPAD Highrise App Items JavaScript JavaScript hide show JS Function Layout Lead Generation Learn Left Left Quote Link LinkedIn list import Live Blog localization Log Logic Login login module login skin object Loop Mandeeps Match Message Microsoft Live Writer module configuration Modules Monthly Services Name Netherlands New News Blog NL NOT NULL oAuth2 Odd OnClick Open Web Studio opt in email OWS Part 1 Part 2 Passed payment gateway paypal Phone Number Placement Post Postback Posts Premium Integration Premium Services Premium Support Primary Key Procedure Products profile Quarterly Services Question question fields Question Loop Question Value QuestionOption Quick Quotes Recommend Recommendation Recurring Billing Redirect Referential Integrity registration Rendered Replace replace html text report views reports Resolution Resource resource files resx Retrieve Retrieving Right Right Quote Rows Ryan Bakerink Sales Force SalesForce Script Scripting Scripts Sequential Access server side validation Silent Post Single Single Quotes Single Sign On skin object Snowcovered Solution sp Springs SQL sql 2005 pivot sql default value SQL Example sql import SQL Injection sql query sql replace statement sql reports SQL Server sql server 2005 SSL SSO stored stored procedure String style sheet stylesheet Submit Submit Button Submit Image Submit Link success story Suggest Suggestion Support Syntax Table technical techwise research Temp test credit card numbers testimonial Text/HTML thumbnail image Time Timer Tip Token Topic Transaction Trial Trigger TSQL T-SQL Tutorial Twitter Types of Constraints Unique Update Highrise user user directory user profile image users online Variable View Web Based Work Around writer writing xls xlsx XML

In the Flow

rss

Data Springs, Inc. - An online diary and web log from staff and customers for premium DotNetNuke resources, Data Springs Modules, and Data Springs Services.


DotNetNuke 5.4.4 Email Issues w/ Modules (and possible solution)

I wanted to write up a quick blog post related to DotNetNuke 5.4.4 and some issues / bugs that were created as a result of some changes to recent DNN updates within the email functions. First some background information... We started getting some reports from clients that that after they upgraded to DNN 5.4.4 they began having email issues... Specifically the CPU would max out after an email was sent within Dynamic Forms, Dynamic Registration etc...

For the most part the error they would see in the event log would be something like this:

System.Threading.
ThreadAbortException: Thread was being aborted. at System.AppDomain.GetId() at System.Threading.Thread.get_CurrentCulture() at Go1(RegexRunner ) at System.Text.RegularExpressions.CompiledRegexRunner.Go() at System.Text.RegularExpressions.RegexRunner.Scan(Regex regex, String text, Int32 textbeg, Int32 textend, Int32 textstart, Int32 prevlen, Boolean quick) at System.Text.RegularExpressions.Regex.Run(Boolean quick, Int32 prevlen, String input, Int32 beginning, Int32 length, Int32 startat) at System.Text.RegularExpressions.Regex.IsMatch(String input) at DotNetNuke.Common.Utilities.HtmlUtils.IsHtml(String text) 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)

Over the past few weeks we have shared some emails with some DNN Core Team Members as well as reviewed/updated several threads on dotnetnuke.com which ill reference below related to some further history on this issue.

Forum Threads
DotNetNuke Forum Thread Related to 5.4.4 with another vendors module (Onyak's Draconis)

DotNetNuke Forum Thread Related to 5.4.4 with core Newsletter module

DotNetNuke Forum Thread with Email Causing CPU to Hang - Fix could be to upgrade to .NET Framework 4.0?

DotNetNuke Forum Threads Related to 5.4.4 and Email Issues

DotNetNuke 5.5 - Might fix email issues?

Gemini References
http://support.dotnetnuke.com/issue/ViewIssue.aspx?ID=12826&PROJID=2
http://support.dotnetnuke.com/issue/ViewIssue.aspx?ID=12939&PROJID=2


So... where is this error coming from?  From what I can tell some new code was added into either 4.3 or 4.4 under the mail.vb file and then HtmlUtils.vb file. This code changes to see if the email message is HTML by running a RegEx.Match check. A few areas of code this is in within 5.4.4 include mail.vb:

If HtmlUtils.IsHtml(Body) Then
     Dim HTMLView As System.Net.Mail.AlternateView = System.Net.Mail.AlternateView.CreateAlternateViewFromString(Body, Nothing, "text/html")
                objMail.AlternateViews.Add(HTMLView)
End If

Which then calls this function within the HTMLUtils.vb file:
Public Shared Function IsHtml(ByVal text As String) As Boolean

            If (String.IsNullOrEmpty(text)) Then
                Return False
            End If
            Return True

         Return HtmlDetectionRegex.IsMatch(text)

        End Function

This runs a RegEx match from this code / regular expression.
Private Shared HtmlDetectionRegex As New Regex("^\s*<\w*(.*\s*)*\w?>\s*$", RegexOptions.Compiled Or RegexOptions.IgnoreCase)


So... At least for some environments and platforms this can cause your CPU to max out or at least cause the error above for the 'Thread was being aborted'. 

The fix? Well with the most recent beta release of the 5.5 version I can still see the exact same code within the 5.5 code as exists within the 5.4.4 code. I did receive this email / comments from Shaun Walker directly though.
" In 5.5 we made a change so that the IsHtml function is NOT called if you pass in a BodyFormat parameter of MailFormat.Html…

Before:

                'if body contains html, add html part

                If HtmlUtils.IsHtml(Body) Then

                    Dim HTMLView As System.Net.Mail.AlternateView = System.Net.Mail.AlternateView.CreateAlternateViewFromString(Body, Nothing, "text/html")

                    objMail.AlternateViews.Add(HTMLView)

                End If

After:

                'if body contains html, add html part

                If objMail.IsBodyHtml Then

                    Dim HTMLView As System.Net.Mail.AlternateView = System.Net.Mail.AlternateView.CreateAlternateViewFromString(Body, Nothing, "text/html")

                    objMail.AlternateViews.Add(HTMLView)

                End If

"

So - It does appear that this will be fixed in the 5.5 release even if the code isn't the most recent code avaliable for the beta.

What about customers of ours or others running on 5.4.4 Community Edition and having this issue? We have created a separate build of the 5.4.4 version which basically will return true and treat the emails as HTML emails. We are testing this build and reviewing the code changes... Once its ready we will be able to provide it to customers (should be within the next two weeks). This might not work for your situation (almost all emails that go through our site are already HTML so its ok). We might also change this to be the same change the Shaun recommended and posted for the 5.5 release.

Note: We cannot support any code changes and do not support the DotNetNuke Framework directly, so please use this updated DLL at your own risk and make a full backup of your web site beforehand. The code changes were some minor tweaks to the Mail.vb file to avoid the IsHTML call. Also note if you add or update any forum threads on this issue that you have updated the DLL as you will be running on a modified version of 5.4.4 and not the actual release of DotNetNuke Corp.

You should already be running on 5.4.4 Community Edition BEFORE placing this file here. You can download the file by contacting us under www.datasprings.com, Contact Us. Currently the file will be avaliable for existing customers of our starting around the last week of August.


Thanks,

Chad
www.datasprings.com



Comments are closed.
Showing 3 Comments
Avatar  Ibrahim 14 years ago

Is anyone paying attention?

the IsHtml() function never tests the string fir a Regex match. the code line before it exits thje function returning true regardless of whether it is an html string or not.

Avatar  Ibrahim 14 years ago

What kind of coding is that?

Return HtmlDetectionRegex.IsMatch(text)
should never happen with the return True before it

Avatar  Dennis Kyle 14 years ago

Chad,

Thanks for your consideration. While it is not your obligation to fix an error in the core DNN it is much appreciated. Thanks for your good work.

Recent Comments

 
 

Join our mailing list...

Get current news and events the easy way
 
 
   
Subscribe Me

Recent Blogs...

 
Copyright 2005 - 2011 by Data Springs, Inc.
 
  • film izle
  • 720 izle
  • film
  • sinema izle
  • film makinesi
  • T�rk�e dublaj film
  • film izle
  • film izle
  • baglan film izle
  • sinema izle
  • 1080 film izle
  • film mercegi