Exchange development (II): how to integrate an application to log on to OWA directly?

Source: Internet
Author: User

In Exchange Medium, Exchange It includes OWA The client can directly Http: // servername/exchange/Username . The following describes how to integrate the user name and password to log on directly to OWA , Instead Windows Pop-up "Enter network password "Dialog box.

 

  1. configured on the server SSL secure channels to enable secure channels; how to configure SSL secure channels, see http://support.microsoft.com/default.aspx? SCID = KB; en-US; 218445
  2. OWA Windows integrated authentication ", do not set it to form-based authentication. ( usage exchange System Manager);
  3. UseXMLHTTPObject To send access requests, scriptsCodeAs follows:

 

// Jeseeqing 2004.10.28

// Exchangeurl: for example https://VirtualAD.ExchangeTest.Com/Exchange/jeseeqing

// Username:User Name

// Password: User Password

Function redirectexchangeurl (exchangeurl, username, password)

{

VaRXmlrequest= New activexobject ("msxml2.xmlhttp ");;

Xmlrequest. Open ("get", exchangeurl, false, username, password );

Auth. Send ();

 

Switch (Auth. Status)

{

Case 200:

Window. Location. href = exchangeurl;

Break;

Case 401:

Alert ("invalid user or password. ");

Break;

Default:

Alert ("sorry, Exchange Server is busy, please try later! ");

}

}

    1. Add oneAspxPage, inPage_loadThe script is registered in the event, and the specified parameters are passed in, the script will automatically jump to the specifiedExchangePage.

 

However, the above Code is a bit secure. If you directly pass the user name and password into the client script, you can viewSource codeYou can obtain the plaintext user name or password, which can be protected by encrypting the user name and password on the server.

 

 

Possible problems:

    1. If the page requested by the client is not added to the trusted site"Permission denied"Error

Solution: add the accessed page to the trusted site

    1. If the security certificate is not configured, the"Security alert"Dialog box, you must click"Yes"To enter

Solution: refer to my previous articleArticle Http://cnblogs.com/jeseeqing/archive/2004/11/08/61530.html

    1. " invalid syntax error "

Solution fromMicrosoftDownloadXMLSeeMicrosoft supportArticle:Http://support.microsoft.com/default.aspx? Kbid = 832414

At the time of development, I encountered all the above three problems, most of which were security-related issues.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.