EDUDOTNET

Friday, February 14, 2014

SMTP Microsoft Office 365 .Net: The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.1 Client was not authenticated.

Issue/Error with SMTP server of MS Office365
The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.1 Client was not authenticated.

Approach 1. 
When we using SMTP of MS office 365 and we are getting error like below then we need to configure and change setting in Office 365 manage panel. And also need to check Credentials password of associated user account password is expired or account is locked. And also set "Never Expire Password" option office365 exchange account.

Approach 2. 
2.1 Login into office 365 account and go to Admin menu and click on Exchange.

2.2 After that go to "recipient" > "mailboxes"
2.3 Under "mailboxes" > click on "Edit" icon and open a popup

2.4 Inside the popup click on "mailbox delegation"
2.5 Remove display name "NT AUTHORITY\SELF" and Add new display user name click on save button.





Thursday, February 13, 2014

How To Close Popup Window And Redirect To Parent Window

When we click login Facebook redirect to in the popup.But we need to redirect from popup window to parent window after that close popup when user click on login/allow button.

We can use for this ClientScript.RegisterStartupScript function and write java-script code and after that it`ll be close automatically.

Below code we can use where we need to open & close popup from code (C#)

Code:

Function
public void RedirectToParent(string url, Type type)
        {
            string js = "";
            js += "window.opener.location.href='" + url + "';";
            js += "window.close();";
            ClientScript.RegisterStartupScript(type, "redirect", js, true);

        }



Calling Function

Type type = this.GetType();
RedirectToParent("http://www/xyz.co/...", type);