Wednesday, November 4, 2020

Authentication failed because remote party has closed the transport stream

This error message generally receive when you are try to send emails through TLS 1.2 or higher. To solve this add this line before send emails. 

ServicePointManager.SecurityProtocol = (SecurityProtocolType)3072;

Sunday, October 25, 2020

How to use CKEditor in a Bootstrap Modal

 I used CKEditor inside html and it worked fine, but when I use it inside bootstrap modal some features won't work correctly. Specially image resizing not working properly. 

Here how I solved this with this work around. Place this inside $(document).ready block. 

$.fn.modal.Constructor.prototype.enforceFocus = function () {
    var $modalElement = this.$element;
    $(document).on('focusin.modal', function (e) {
        var $parent = $(e.target.parentNode);
        if ($modalElement[0] !== e.target && !$modalElement.has(e.target).length
            // add whatever conditions you need here:
            &&
            !$parent.hasClass('cke_dialog_ui_input_select') && !$parent.hasClass('cke_dialog_ui_input_text')) {
            $modalElement.focus()
        }
    })
};

Thursday, October 22, 2020

SendGrid emails not working after disabled TLS 1.0

 Last month one of our client wanted to disable TLS 1.0 in server and they wanted to go with latest TLS 1.2.

After disabled this, the email wasn't working. To solve this I had to call this single line before call call send function.

ServicePointManager.SecurityProtocol = (SecurityProtocolType)3072;


  



TinyMCE Insert/Edit link not editable

 To fix this add  e.stopImmediatePropagation()  as below. $(document).on('focusin', function (e) {             if ($(e.target).close...