Le Café Central de

                    ... Deva blogs!!

  • Le Café Central de DeVa

    Tutorial : Free/Busy data - Series # 1


    Publishing Free/Busy data:

    Free/busy data is published information that contains a user's personal availability data based on the user's schedule. Microsoft Exchange Server uses the information extensively when users schedule meetings.

    • Exchange Server 2003 stores free/busy information in a dedicated public folder that is named SCHEDULE+ FREE BUSY. This folder contains a separate subfolder for each administrative group in your Exchange organization. When a user publishes free/busy data, Exchange Server 2003 posts the information in a message in the appropriate free/busy subfolder. The free/busy folders are system folders and function in a manner that is similar to offline address book folders.
    • Exchange Server 2007 uses the availability service.

    Free/Busy data & different versions of Outlook and Exchange Server :

    • The process of publishing free/busy data from the user's client application to the appropriate free/busy folder depends in part on the client that the user has.
    • Outlook and other MAPI-based clients function somewhat differently in this respect from Web-based clients such as Microsoft Office Outlook Web Access for Exchange Server 2003 and Microsoft Outlook Mobile Access.
    • The Availability service for Microsoft Exchange Server 2007 provides calendar information for your users. This information is known as free/busy information.

    How Outlook publishes free/busy data?

    By default, Outlook publishes the free/busy data for a user one time every 15 minutes, and again when Outlook shuts down. When publishing, Outlook updates the entire free/busy message instead of just adding changes to the existing message. The message includes free/busy data that ranges from the current month to two months in the future.

    How to customize with Outlook?

    Outlook users can customize the free/busy settings, including the following:

      • Publishing interval, which can be as short as one minute.
      • Number of months in the future to publish, which can be as long as 36 months.

    Outlook 2007 with different Exchange Servers:

    As we know that Microsoft Office Outlook 2007 works well with a variety of e-mail servers, and you can take advantage of an even richer feature set by using Outlook with the latest version of Microsoft Exchange Server. Some features of Office Outlook 2007 require or work better with Microsoft Exchange Server 2003 or later.

    • Free/Busy information is always up-to-date for users with Exchange 2007 Availability service. But it’s not the case with Exchange 2003.
    • Tentative calendar booking is managed on the Exchange Server. Users do not need to run Outlook for others to see their Free/Busy status. This feature is only available in Exchange Server 2007, not with Exchange Server 2003.

    MadFB, Autodiscover & Outlook clients:

    • The Autodiscover service provides information for the Availability service by locating and providing the external and internal URLs for the Outlook 2007 client.
    • If your Microsoft Office Outlook 2007 users cannot view calendar information for other Outlook 2007 users in your Exchange 2007 environment, the problem may involve a failure in either the Autodiscover service or the Availability service.
    • Microsoft Entourage for the Macintosh also relies on this MadFB(MSExchangeFBPublish) process to publish free/busy data.
    • Outlook Web Access and Outlook Mobile Access do not publish free/busy data directly to the public folder store.
    • Instead, they rely on a free/busy publishing agent that is named MadFB (also known as MSExchangeFBPublish), which runs as part of the Microsoft Exchange System Attendant service (MSExchangeSA).
    • MadFB has two functions.
      • It publishes free/busy messages for Outlook Web Access and Outlook Mobile Access
      • It deletes duplicate free/busy messages

    Note: Because most of the processing is handled by the Exchange servers instead of the client, using Outlook Web Access and Outlook Mobile Access can provide performance and reliability advantages over Outlook.

    There are various other issues happens with respect to Free/Busy data when we do with programming as well as with the Outlook clients. I tried to catch up some of them and summarize for your view….

    1. Troubleshooting the Free/Busy information for Outlook 2007 by reading this technet article or you can check it through the error codes available. Some of them are,

    • 0x80072EE7 – ERROR_INTERNET_NAME_NOT_RESOLVED - This error is usually caused by a missing host record for the Autodiscover service in the Domain Naming service.
    • 0X80072F17 – ERROR_INTERNET_SEC_CERT_ERRORS - This error is usually caused by an incorrect certificate configuration on the Exchange 2007 computer that has the Client Access server role installed.
    • 0X80072EFD – ERROR_INTERNET_CANNOT_CONNECT - This error is usually caused by issues that are related to Domain Naming service.
    • 0X800C820A – E_AC_NO_SUPPORTED_SCHEMES - This error is usually caused by incorrect security settings in Outlook 2007.

    2. If you use Exchange Server 2007, you can determine whether the Availability service is not functioning properly or not:
    (i) using Event log (ii) using Test-OutlookWebServices cmdlet

    Using Event log:

    When we try to review the application event log on the Exchange 2007 Client Access server and check for events that are generated by the Availability service. There are common events that are associated with the availability service as described. Some of them are,

  • 4001 The Availability service could not discover an Availability service in the remote forest   If you see this event, verify that the Autodiscover service in the remote forest is functioning correctly.
  • 4003 PublicFolderRequestFailed   This event usually indicates a failure to look up free/busy information for legacy mailboxes. Typically, this information comes from public folders. This error might be caused if the public folders are configured incorrectly or if the Availability service has not been configured to look up public folders for the legacy mailboxes. The description of this event will usually include the URL to the target public folder and one of the following HTTP errors:
    • 401   If you see this HTTP error, Integrated Windows authentication is probably disabled on the /public virtual directory.
    • 403   If you see this HTTP error, the Client Access server may be offline or it does not contain a replica. This might occur if Secure Sockets Layer (SSL) is not enabled on the /public virtual directory.
    • 404   This HTTP error can occur if the /public virtual directory could not be found.
  • 4005 Could not find information in Active Directory to allow cross-forest requests   If you see this event, you must configure the Availability service across forests.
  • 4011 Cross-forestRequestFailed   This usually indicates a failure to locate an AvailabilityAddressSpace object that is required to proxy the Availability service request to a different forest.
  • In this case, we will see how to find and troubleshoot the issue using the Event log. A 4003 event indicates a failure to look up free/busy information for legacy mailboxes. Typically, this information comes from public folders. The following is an example of a 4003 event.

    Event ID : 4003

    Raw Event ID : 4003

    Category : Availability Service

    Source : MSExchange Availability

    Type : Error

    Message : Process 4664[w3wp.exe:/LM/W3SVC/1/ROOT/EWS-1-128114978363374212]: Microsoft.Exchange.InfoWorker.Common.Availability.PublicFolderRequest failed. The exception returned is Microsoft.Exchange.InfoWorker.Common.Availability.PublicFolderRequestProcessingException

    This may be due to Exchange 2007 users are unable to see the free/busy information for users whose mailboxes reside on the Exchange 2003 server. The free/busy information displays as hash marks for these users in the Outlook Scheduling Assistant page.

    Using Test-OutlookWebServices cmdlet:

    When you try to test through cmdlet test the service using, 
                            Test-OutlookWebServices -id:user1@contoso.com -TargetAddress: user2@contoso.com

    • The Test-OutlookWebServices cmdlet uses a specified e-mail address to verify that the Outlook provider is configured correctly.
    • The optional MonitoringLogFile parameter indicates whether the results are written to the log file for Microsoft Operations Manager (MOM).
    • Using the Test-OutlookWebServices cmdlet to verify the Autodiscover service settings for Microsoft Outlook on a computer that is running Microsoft Exchange Server 2007 that has the Client Access server role installed.
    • This will provide the error details about the Availability service.

    For example, as specified in the following article and code example verifies the service information that is returned to the Outlook 2007 client from the Autodiscover service for a user who is named monika@contoso.com. The code example verifies information for the following services:

    • Availability service
    • Outlook Anywhere
    • Offline Address Book
    • Unified Messaging
    test-OutlookWebServices -identity:monika@contoso.com

    This code example tests for a connection to each service. This example also submits a request to the Availability service for the user monika@contoso.com to determine whether the user's free/busy information is being returned correctly from the Client Access server to the Outlook 2007 client.

    3. Free/Busy Options Not Unique to Each Profile:

    On a computer that contains multiple profiles, the Free/Busy options will be the same for every profile. This information is defined in the KB article. The Free/Busy information is stored on a per-user basis rather than a per-profile basis. If the user who is logged on to the computer defines multiple profiles, each profile will contain the same Free/Busy information.

    To set the calendar Free/Busy information, follow these steps:

    1. On the Tools menu, click Options.

    2. On the Preferences tab, click Calendar Options.

    3. Click Free/Busy Options. In the Free/Busy Options dialog box you can set the following items:

    • How many months of Free/Busy information to publish.

    • How frequently the information should be updated.

    • Whether the information should be published on the Internet.

    • The Internet URL address for storing and searching for the information.

    4. Conditions that affect the display of Free/Busy time in Outlook:

    After you make an appointment in your active Calendar in Microsoft Outlook, other people may not immediately see that time as busy. This condition may also occur when someone attempts to invite you to a meeting.

    There are three possible causes for this behavior:

    • By default, Outlook updates your Free/Busy time every 15 minutes. If the update is not complete, others will not see your appointment as busy time.

    • Outlook publishes your Free/Busy time for only the next two months. If your appointment is beyond the published limit, others will not see your appointment as busy time.

    • If the appointment Show Time As property is set to Free, others will not see your appointment as busy time.

    The unavailability of Free/Busy information appears as black hatched lines in the Attendee Availability dialog box.


    • If the cause is how often Outlook updates Free/Busy time, follow these steps as described in the support KB.
    • If the cause is how far ahead Outlook publishes Free/Busy time, follow these steps as described in the support KB
    • If the cause is that the Appointment Show Time As property is not set to Free, follow these steps as described in the support KB

    5. Legacy free/busy information no longer appears for appointments that are booked against a mailbox in Exchange Server 2007:

    In a Microsoft Exchange Server 2007 environment, you configure a room mailbox to have the AllBookInPolicy attribute set to "false." When you do this, the legacy free/busy information no longer appears for the appointments that are booked against the mailbox. For example, when you examine the free/busy information by using the Scheduling Assistant, the room mailbox shows a status of No Information.

    This issue occurs because the default permission is changed to "None" when the AllBookInPolicy attribute is set to "false." This situation prevents the Exchange System Attendant from publishing the legacy free/busy information. By default, when any mailbox is created, the free/busy permissions are set as follows:

    Default: Read: Free/Busy time
    Anonymous: None

    This condition is also true for resource mailboxes.

    To go through the following article to resolve this problem in Exchange Server 2007 Service Pack 1.

    6. Resolving problems in Outlook for delegated Exchange Server 2003 mailbox users :

    As stated above, we need to perform this procedure if delegated users are receiving error messages such as "Unable to open the free/busy message" when they try to modify the mailbox owner's calendar.

    1. Request that all delegate users and the mailbox owner shut down Outlook.

    2. Request that the mailbox owner start Outlook with the /cleanfreebusy switch. The mailbox owner can do this from the command prompt by typing: outlook/cleanfreebusy

      Outlook will re-create the LocalFreeBusy message and synchronize the other mailbox folders to use it.

    3. Resume using Outlook. Delegates should now be able to use the mailbox as expected.

    7. Cleaning Mailbox stores using MadFB:

    As stated above, and in the over time, the free/busy folders may accumulate duplicate free/busy messages. In addition, Outlook and the free/busy folders may become unsynchronized, especially for mailboxes that have multiple delegate users. This section provides information about how Exchange Server 2003 automatically maintains free/busy data according to a configurable schedule, and about how you can repair synchronization problems.

    The cleanup process includes:

    • Deleting duplicate free/busy data messages.
      These are messages with an appended –x in the URL, where x is the number of the duplicate message. For each set of duplicates, MadFB keeps the oldest message and deletes the rest.
    • Repairing the URLs of free/busy messages.
      The URL of a free/busy message must be in canonical format, ending with subject(based on legacyExchangeDN).EML.
      Messages that are duplicates of existing free/busy messages have non-canonical URLs because of the appended -x. Messages that have been upgraded or replicated from Microsoft Exchange Server version 5.5 have URLs that contain GUIDs. These messages are also considered non-canonical.

    8. Calendar support in an Exchange and Non-exchange environment:

    As stated in the following article regarding the calendar support in an Exchange and Non-exchange environment (for ex. using the Microsoft Exchange Connector for Lotus Notes and the Microsoft Exchange Connector for Novell GroupWise) perform several functions to support calendaring capabilities between the foreign system and Exchange Server 2003:

    • Replicate directory information so that both Exchange users and foreign system users have access to calendaring data.
    • Convert meeting request items from Exchange format to the foreign format and from the foreign format to the Exchange format.
    • Detect Exchange Server 2003 free/busy requests and look up the appropriate free/busy data in the foreign system. This free/busy lookup is bidirectional.
  • Le Café Central de DeVa

    Out of Scope : How To Programmatically Cause the Creation of a User's Profile - Windows ?


    Hi, this is a new series called “Out of scope”, where i am trying to add non-Messaging Dev technologies. This won’t be supported by me nor by my team, just added based on my programming interest. So, “Out of Scope” tag is meant for general audience.

    Many a times i thought how to programmatically cause a user's profile to be created without requiring an interactive logon? First of all, whether this will be possible in the Windows?

    Please go through the following article. The remainder of this article demonstrates how to work with the User Profile structures and functions on Windows NT 4.0. For complete information on these structures and functions, refer to the Platform SDK documentation in the latest release of the MSDN Library.

    By default, a new user's profile is not created until the user logs on to the computer interactively. An interactive logon occurs when a user logs on to the computer by pressing CTRL+ALT+DEL to gain access through the WinLogon dialog box.

    It is possible to programmatically cause a user's profile to be created without requiring an interactive logon by calling the LoadUserProfile() API. In Windows 2000 and Windows XP, this function is exposed within the Platform SDK header files and documented in the MSDN Library. On Windows NT 4.0, the LoadUserProfile() API is not exposed, but it can still be called by dynamically loading the Userenv.dll library and obtaining a pointer to the function.

    Calling LoadUserProfile() on Windows NT 4.0

    This article has a code snippet which demonstrates how to programmatically create a new user account, force a profile to be created for the new user, and retrieve the new profile directory.

  • Le Café Central de DeVa

    Gotcha : PowerShell questions


    I composed couple of Windows PowerShell questions:

    Can you create your own PowerShell object?

    We can write a Cmdlet, but we have to do that with a .NET Framework language such as C# or VB.NET.

    Can we create a.BAT file using PowerShell?

    No. But we can create PowerShell scripts, which have a .PS1 file extension

    Can we run a .VBS file natively run in PowerShell?

    No, we can't.

    Can we work PowerShell against remote systems? If so how?

    PS 1.0 will not work against remote systems. However, we can call WMI or .NET Framework and use them to run against remote machines.

    How can we sign a script?

    Same as signing any code

    Can you run more than one copy of PowerShell at the same time?


    Will I need to know PowerShell to administer Exchange 2007?

    Yes we can manage Exchange from the command prompt or by using scripts. Also we can still do it by using the GUI-based management of Exchange without knowing PowerShell.

    How do you find all the namespaces available in PowerShell?

    Get-PSProvider will list all the PowerShell providers and Get-PSDrive will list all the drives currently mapped to the namespaces surfaced by those providers.

  • Le Café Central de DeVa

    Monitoring event sink # 25 - Recipients modified mail (using event sink) sent from PICKUP folder and lands in the DROP folder ?


    Recipients modified email messages (using event sink) sent from PICKUP folder and lands in the DROP folder ?

    The Pickup folder processes outgoing messages that are created as text files and then copied to the Pickup folder. When Request for Comments (RFC) 822 messages that are correctly formatted are copied to the Pickup folder, the SMTP service initiates delivery. In this replay method, the X-Sender envelope field and the X-Receiver envelope field are written to the e-mail message when the SMTP service puts the e-mail message into the Drop folder.

    The SMTP service puts the e-mail message into the Drop folder for local delivery on a computer where Exchange is not installed.

    In this scenario, the Pickup operation honors the envelope fields that are written to the e-mail message

    In detail

    This is because, we will have an default domain entry in the SMTP mail area of IIS. This is the process that handles all mail that comes into your SMTP system that is not otherwise specified. This mail would be delivered based on the settings you make in the properties area of that default setting. This includes the name of the server that the mail claims to be from.

    In addition to this default entry, you can also create an Alias Domain for any other domains you might own. Each one can have its own name. So where your default might say mail is coming from Mydomain.com, you can set up alias domains for domain.com and minedomain.com. Once you have those aliases set up, each alias then sends its mail to the DROP folder associated with that alias. The mail will sit there in the DROP folder, waiting for further processing. It assumes that another system is going to poll that DROP folder and do something with the mail.

    If you end up with mail messages in your DROP folder because you created an alias domain by accident, simply delete that alias and then stop and restart the mail server. Now drag all the messages from the DROP area back into the PICKUP area. They will process through the default queue, following your normal rules and get out to your recipients.


  • Le Café Central de DeVa

    Microsoft Windows : I'm a PC, aren't you?


    Many people started murmuring what is this new stuff, "I'm a PC"? what is this all about.

    Even i got the following excerpts:

    "... if you're a PC, you belong to one of the world's most diverse communities, connecting across countries, cultures and technologies. Explore this PC Gallery and see what individuality looks like on your screen. You can also record and upload yourself, becoming part of this site and appearing in online ads across the world wide web.

    Where you connect to a global community of more than a billion people and nothing comes between you and a world of ideas and opportunities. With Windows on your mobile phone, PC, or the Web, walls begin to disappear—at home, at the office, and anywhere in between. You can balance work and life as well as fun and functionality. And with a wide range of software, services, and devices to choose from, your technology can be as unique as you are. That's Windows. Life without walls..."

    Later I found that Microsoft launched the next phase of a long-term Windows marketing effort, with the tagline “Life Without Walls.” Key to the new initiative are TV and online spots called “I’m a PC”, which feature both real people celebrating their connection to the community of one billion Windows users worldwide. Windows users can join the community by uploading their own “I’m a PC” videos on windows.com and some user videos will be show on digital billboards in New York’s Time Square.

    The “Life Without Walls” theme was introduced via a set of print and out of home ads which show how multiple Windows devices connect seamlessly, across PCs, phones, TVs and other devices. See the Image Gallery for sample print ads.

  • Le Café Central de DeVa

    Video: Microsoft Office Outlook Web Access online training


    Have a look at Online training/demo how to work with Microsoft Office Outlook Web Access 2007 online training.


    It starts from the Introduction, Mail, Calendar, Contacts, Tasks, Documents, options and about OWA light. Just need to go and select the appropriate options in order to see how to make use of the features available with Outlook Web Access.

    Happy training !!

  • Le Café Central de DeVa

    Outlook Web Access and Exchange 2007, Exchange 2003, and Exchange 2000 Coexistence


    Please find this article which explains how Microsoft Outlook Web Access works in Exchange organizations that include computers that are running one or more versions of Microsoft Exchange that were released earlier than Microsoft Exchange Server 2007. These earlier versions can include Microsoft Exchange Server 2003 and Microsoft Exchange 2000 Server. You can use this information to plan a successful coexistence strategy. You can also use it to complete a successful migration to Exchange 2007.

  • Le Café Central de DeVa

    Exchange Server 2007 & Domain Security


    Exchange 2007 includes a new feature set that is named "Domain Security." Domain Security refers to the set of functionality in Exchange 2007 and Outlook 2007 that provides a relatively low-cost alternative to S/MIME or other message-level security solutions.

    The purpose of the Domain Security feature set is to provide administrators a way to manage secured message paths over the Internet with business partners. After these secured message paths are configured, messages that have successfully traveled over the secured path from an authenticated sender are displayed to users as "Domain Secured" in the Outlook and Outlook Web Access interface.

    Domain Security uses Transport Layer Security (TLS) with mutual authentication to provide session-based authentication and encryption. TLS with mutual authentication differs from TLS as it is usually implemented. Typically, when TLS is implemented, the client verifies that the connection securely connects to the intended server by validating the server’s certificate. This is received as part of TLS negotiation. In this scenario, the client authenticates the server before the client transmits data. However, the server doesn't authenticate the session with the client.

    With mutual TLS authentication, each server verifies the connection with the other server by validating a certificate that is provided by that other server. In this scenario, where messages are received from external domains over verified connections in an Exchange 2007 environment, Outlook 2007 will display a "Domain Secured" icon.

    For more information about how to plan for and deploy Domain Security in your organization, see White Paper: Domain Security in Exchange 2007


  • Le Café Central de DeVa

    Outlook Errors : Send and receive e-mail errors - Part # 1


    Outlook Send and receive e-mail errors:

    When you try to send and receive e-mail, you may receive an error message that is similar to one of the following:

    No connection could be made because the target machine actively refused it.

    The server could not be found. (Account:account name, POPserver:'mail', Error Number: 0x800ccc0d)

    Task 'server name - Sending and Receiving' reported error (0x800ccc0f): 'The connection to the server was interrupted. If this problem continues, contact the server administrator or Internet service provider (ISP). The server responded: ? K'

    Your server has unexpectedly terminated the connection. Possible causes of this include server problems, network problems, or a long period of inactivity. Account. account name, Server: 'server name', Protocol: POP3, Server Response: '+OK', Port: 110, Secure(SSL): No, Error Number: 0x800ccc0f

    Task 'SMTP server name - Sending and Receiving' reported error (0x80042109): 'Outlook is unable to connect to your outgoing (SMTP) e-mail server. If you continue to receive this message, contact the server administrator or Internet service provider (ISP).'

    The operation timed out waiting for a response from the receiving (POP) server 0x8004210a

    A time-out occurred while communicating with the server 0x800ccc19

    You may also receive an error message that includes one or more of the following error codes:


    • 0x80042108

    • 0x800ccc0e

    • 0x8004210b

    • 0x800ccc0b

    • 0x800ccc79

    • 0x800ccc67

    • 0x80040900

    • 0x800ccc81

    These error messages may occur if Microsoft Outlook or if Microsoft Outlook Express cannot establish a connection with your e-mail server. These error messages are frequently caused by one of the following:

    • You are not connected to the Internet or a network

    • Incorrect account settings

    • Your user profile in Outlook is damaged

    • An e-mail item on your POP3 server is damaged

    • Incorrect configuration of your AV software

    • Outlook Express has been removed from the computer or the installation is damaged

    • Incorrect configuration of personal firewall software

    The most common causes of these error messages are problems with Internet connectivity and incorrectly configured account settings in Outlook or Outlook Express.

    Please find the following article which talks about the following possible resolution methods available for the various Outlook or Outlook Express and its versions.

  • Le Café Central de DeVa

    Outlook Programming Series # 13 : Programmatic equivalent for Outlook UI's Send/Receive


    Whenever we work with Outlook 2007 UI, we click either "Send/Receive button" or press "F9" to send and receive emails. In couple of our cases we use to do programmatically you can make use of Outlook Object Model's (OOM) SendAndReceive method. You need to know that calling the SendAndReceive method is synchronous only.

    Syntax: expression.SendAndReceive(showProgressDialog)

    Here, showProgressDialog - Indicates whether the Outlook Send/Receive Progress dialog box should be displayed, regardless of user settings


    • SendAndReceive provides the programmatic equivalent to the Send/Receive All command that is available when you click Tools and then Send/Receive.
    • If you do not need to synchronize all objects, you can use the SyncObjects collection object to select specific objects. For more information, see NameSpace.SyncObjects.
    • All accounts defined in the current profile are used in Send/Receive All.
    • If an online connection is required to perform the Send/Receive All, then the connection is made according to user preferences.

    Using with Outlook Object Model & Visual Basic 6:

    Use NameSpace.SendAndReceive Method. Initiates immediate delivery of all undelivered messages submitted in the current session, and immediate receipt of mail for all accounts in the current profile.

    Using in .Net environment & Outlook interop:

    Use NameSpaceClass.SendAndReceive Method (Microsoft.Office.Interop.Outlook). The types and members of the Microsoft.Office.Interop.Outlook namespace provide support for interoperability between the COM object model of Microsoft Office Outlook 2007 and managed applications that automate Outlook.

    This is a .NET class or a member of a .NET class created when processing a COM coclass that is required by managed code for interoperability with the corresponding COM object. Use this class only when you have to access an earlier event in this class that has been subsequently extended in a later version of Outlook. Otherwise, use the .NET interface derived from the COM coclass.

    Code snippet (used in the add-in):


       1:  public virtual void _NameSpace.SendAndReceive (
       2:      [InAttribute] bool showProgressDialog
       3:  )

    then we need to use the SyncObject,

       1:  //trap the SyncObject.SyncStart Event 
       2:    this.Application.Session.SyncObjects[1].SyncStart += new Microsoft.Office.Interop.Outlook.SyncObjectEvents_SyncStartEventHandler(ThisAddIn_SyncStart);
       4:  //finally don't forget to trap the SyncObject.SyncEnd Event 
       5:  this.Application.Session.SyncObjects[1].SyncEnd += new Microsoft.Office.Interop.Outlook.SyncObjectEvents_SyncEndEventHandler(ThisAddIn_SyncEnd);

    Visual Basic:

       1:  Dim instance As NameSpaceClass
       2:  Dim showProgressDialog As Boolean
       4:  CType(instance, _NameSpace).SendAndReceive(showProgressDialog)



  • Le Café Central de DeVa

    Outlook Programming Series # 14 : How to - Create a Rule to Move Specific E-mails to a Folder programmatically ?


    The code sample uses the RuleAction and RuleCondition objects to specify a rule that moves messages from a specific sender to a specific folder, unless the message contains certain terms in the subject. Note that the code sample assumes that there already exists a folder named "Outlook" under the Inbox.

    Code snippet:

       1:  Sub CreateRule()
       2:      Dim colRules As Outlook.Rules
       3:      Dim oRule As Outlook.Rule
       4:      Dim colRuleActions As Outlook.RuleActions
       5:      Dim oMoveRuleAction As Outlook.MoveOrCopyRuleAction
       6:      Dim oFromCondition As Outlook.ToOrFromRuleCondition
       7:      Dim oExceptSubject As Outlook.TextRuleCondition
       8:      Dim oInbox As Outlook.Folder
       9:      Dim oMoveTarget As Outlook.Folder
      11:      'Specify target folder for rule move action
      12:      Set oInbox = Application.Session.GetDefaultFolder(olFolderInbox)
      13:      'Assume that target folder already exists
      14:      Set oMoveTarget = oInbox.Folders("Outlook")
      16:      'Get Rules from Session.DefaultStore object
      17:      Set colRules = Application.Session.DefaultStore.GetRules()
      19:      'Create the rule by adding a Receive Rule to Rules collection
      20:      Set oRule = colRules.Create("Sample_rule", olRuleReceive)
      22:      'Specify the condition in a ToOrFromRuleCondition object
      23:      'Condition is if the message is from "<alias>"
      24:      Set oFromCondition = oRule.Conditions.From
      25:      With oFromCondition
      26:          .Enabled = True
      27:          .Recipients.Add ("<alias>")
      28:          .Recipients.ResolveAll
      29:      End With
      31:      'Specify the action in a MoveOrCopyRuleAction object
      32:      'Action is to move the message to the target folder
      33:      Set oMoveRuleAction = oRule.Actions.MoveToFolder
      34:      With oMoveRuleAction
      35:          .Enabled = True
      36:          .Folder = oMoveTarget
      37:      End With
      39:      'Specify the exception condition for the subject in a TextRuleCondition object
      40:      'Exception condition is if the subject contains "spam" or "text"
      41:      Set oExceptSubject = _
      42:          oRule.Exceptions.Subject
      43:      With oExceptSubject
      44:          .Enabled = True
      45:          .Text = Array("spam", "text")
      46:      End With
      48:      'Update the server and display progress dialog
      49:      colRules.Save
      50:  End Sub
    Reference: For more detailed information, please go through this article.
  • Le Café Central de DeVa

    Troubleshooting: Exchange environment with Event viewer


    There are quite number of tools available to find the issues with Exchange Server environment. Here we’re going to view about “Event Viewer”. Interestingly Event viewer is it’s not directly meant nor designed for Exchange server, its designed for Windows OS environment.

    So what can we get in the Event viewer?

    Using the event logs in Event Viewer, we can gather information about hardware, software, and system problems, and you can monitor Windows operating system security events. In Event Viewer, both the application log and the system log contain errors, warnings, and informational events that are related to the operation of Exchange Server, the SMTP service, and other applications.

    What else we can get?

    You can use Event Viewer to obtain information about service failures, replication errors in the Active Directory directory service, and warnings about system resources such as virtual memory and disk space. Use Event Viewer to view and manage event logs; obtain information about hardware, software, and system problems that must be resolved; and identify trends that require future action.

    Event Viewer maintains logs about application, security, and system events on your computer. Both Microsoft Exchange Server and Microsoft Windows report warnings and error conditions to the event logs. Therefore, make sure that you review event logs daily.

    How to identify the issues in Event Viewer?

    To identify the cause of message flow issues, carefully review the data that is contained in the application log and system log. Use the following procedure to view errors, warnings, and informational events in the application log.

    Types of Logs Found in Event Viewer

    Microsoft Windows Server 2003, Windows XP, Windows 2000 Server, and Windows NT record events in three kinds of logs:

    • Application log   The Application log contains events logged by applications or programs. For example, a database program might record a file error in the Application log. The program developer decides which events to record.
    • System log   The System log contains events logged by the Windows operating system components. For example, the failure of a driver or other system component to load during startup is recorded in the System log. The event types logged by system components are predetermined by the Windows operating system.
    • Security log   The Security log can record security events such as valid and invalid logon attempts as well as events related to resource use, such as creating, opening, or deleting files. An administrator can specify what events are recorded in the Security log. For example, if you have enabled logon auditing, attempts to log on to the system are recorded in the Security log.

    Servers running Windows Server 2003 and Windows 2000 Server that are domain controllers might have the following additional logs in Event Viewer:

    • Directory Service log   Windows Server 2003 and Windows 2000 Server directory service logs events in the Directory Service log. This includes any information regarding the Active Directory® directory service and Active Directory database maintenance.
    • File Replication Service log   File Replication Service (FRS) logs its events in this log. This service is used for replication of files, such as domain policies, between domain controllers.
    • DNS Server service log   This log includes events related to the Domain Name System (DNS) Server service running on Windows Server 2003 and Windows 2000 Server. This will show only on DNS servers running Windows Server 2003 and Windows 2000 Server.

    Types of Events Logged

    The icon on the left side of the Event Viewer screen describes the classification of the event by the Windows operating system. Event Viewer displays these types of events:

    • Error   A significant problem, such as loss of data or loss of functionality. For example, if a service fails to load during startup, an error will be logged.
    • Warning   An event that is not necessarily significant, but may indicate a possible future problem. For example, when disk space is low, a warning will be logged.
    • Information   An event that describes the successful operation of an application, driver, or service. For example, when a network driver loads successfully, an information event will be logged.
    • Success Audit   An audited security access attempt that succeeds. For example, a user's successful attempt to log on to the system will be logged as a Success Audit event.
    • Failure Audit   An audited security access attempt that fails. For example, if a user tries to access a network drive and fails, the attempt will be logged as a Failure Audit event.

    What are the main event components of the Event viewer?

    The main event components are as follows:

    • Source   The software that logged the event, which can be either an application name, such as Microsoft SQL Server™, or a component of the system or of a large application, such as MSExchangeIS, which is the Microsoft Exchange Information Store service.
    • Category   A classification of the event by the event source. For example, the security categories include Logon and Logoff, Policy Change, Privilege Use, System Event, Object Access, Detailed Tracking, and Account Management.
    • Event ID   A unique number for each source to identify the event.
    • User   The user name for the user who was logged on and working when the event occurred. N/A indicates that the entry did not specify a user.
    • Computer   The computer name for the computer where the event occurred.
    • Description   This field provides the actual text of the event, or how the application that logged the event explains what has happened.
    • Data   Displays binary data generated by the event in hexadecimal (bytes) or DWORDS (words) format. Not all events generate binary data. Programmers and support professionals familiar with source application can interpret this information.

    Couple of samples available in the event viewer (exchange specific):

    How to view the application log in the event viewer?

    1. Click Start, point to Programs, point to Administrative Tools, and then click Event Viewer.

    2. In the console tree, click Application Log.

    3. To sort the log alphabetically and quickly locate an entry for an Exchange service, in the details pane, click Source.

    4. Double-click a log entry to open an event's properties page.

    5. To filter the log to list entries for a specific type of Exchange-related event, from the View menu, click Filter.

    6. In Application Log Properties, use the Event source list to select an Exchange-related event source. For example:

      • MSExchangeTransport   Events that are recorded when SMTP is used to route messages.
      • IMAP4Svc   Events that are related to the service that allows users to access mailboxes and public folders through IMAP4.
      • MSExchangeAL   Events that are related to the service that addresses e-mail messages through address lists.
      • MSExchangeIS   Events that are related to the service that allows access to the Exchange Information Store service.
      • MSExchangeMTA   Events that are related to the service that allows X.400 connectors to use the message transfer agent (MTA).
      • MSExchangeMU   Events that are related to the metabase update service, a component that reads information from Active Directory and transposes it to the local IIS metabase.
      • MSExchangeSA   Events that are recorded when Exchange uses Active Directory to store and share directory information.
      • MSExchangeSRS   Events that are recorded when Site Replication Service (SRS) is used to replicate computers running Exchange 2003 with computers running Exchange 5.5.
      • POP3Svc   Events that are recorded whenever Post Office Protocol version 3 (POP3) is used to access e-mail.
    7. In the Category list, select a specific set of events or, to view all events for that event source, leave the default setting at All.

    8. Click OK.

    How to view the System log in event viewer?

    Use the following procedure to view errors, warnings, and informational events in the system log for SMTP service.

    1. Click Start, point to Programs, point to Administrative Tools, and then click Event Viewer.

    2. In the console tree, click System Log.

    3. To sort the log alphabetically and quickly locate an entry for an Exchange service, in the details pane, click Source.

    4. Double-click a log entry to open an event's properties page.

    5. To filter the log to list entries for a specific type of SMTP service events, from the View menu, click Filter.

    6. In System Log Properties, in the Event source list, select SMTPSVC.

    7. In the Category list, select a specific set of events or, to view all events for the SMTP service, leave the default setting at All.

    8. Click OK.

    Troubleshooting with Event viewer and Exchange Server:

    Within each Event Viewer log, Exchange Server records informational, warning, and error events. Monitor these logs closely to track the types of transactions being conducted on your Exchange servers. You should periodically archive the logs or use automatic rollover to avoid running out of space. Because log files can occupy a finite amount of space, increase the log size (for example, to 50 MB) and set it to overwrite, so that Exchange Server can continue to write new events.

    You can also automate event log administration by using tools and technologies such as the following:

    • Event Comb   The Event Comb tool lets you gathers specific events from the event logs of several computers to one central location. It also lets you report on only the event IDs or event sources you specify. For more information about Event Comb, see the Account Lockout and Management Tools Web site.
    • Eventtriggers   You can also use command-line tools to create and query event logs and associate programs with particular logged events. By using Eventtriggers.exe, you can create event triggers that will run programs when specific events occur. For more information about Eventtriggers, see the Windows Server 2003 topic New command-line tools and the Windows XP topic Managing event logs from the Command Line.
    • Microsoft Operations Manager   You can use Microsoft Operations Manager (MOM) to monitor the health and use of Exchange servers. Exchange 2007 Management Pack extends Microsoft Operations Manager by providing specialized monitoring for servers that are running Exchange 2007. This management pack includes a definition of health for an Exchange 2007 server and will raise an alert message to the administrator if it detects a state that requires intervention. For more information about Exchange 2007 Management Pack, see the Microsoft Operations Manager Web site.

    Reference MSDN articles:


  • Le Café Central de DeVa

    Synchronization : Exchange Server & Outlook


    Exchange Server 2003 and later versions of Exchange Server provide support for certain Outlook features, and Office Outlook 2007 works better with Exchange Server 2003 or later in several ways for other features. Several of these features were introduced in Outlook 2003—most notably for synchronization processing, user synchronization status reports, and junk e-mail filtering. Instant Search and automatic Exchange server discoverability are new in Office Outlook 2007.

    Synchronization between Outlook & Exchange Server:

    Synchronization processing between Outlook and Exchange is enhanced in a number of ways, starting in Outlook 2003. For example, data exchanged between the Outlook client and Exchange Server 2003 servers is compressed, and the data buffer size is larger. In addition, the buffers are packed, so more compressed data is included in each buffer. With these features, more data can be transferred with fewer server calls. This is especially beneficial when users are synchronizing across networks that charge by the byte of data that is transmitted. When large information sets are downloaded—for example, when users update their mailboxes after they have been on vacation—cost can be significantly lowered and the transaction can be shortened with these improvements.

    Better status information about Cached Exchange Mode:

    Another feature that users will notice is better status information about Cached Exchange Mode synchronization. With Exchange Server 2003 or later, the Outlook status bar shows detailed information about synchronization, such as:

    • How many bytes have not been downloaded for the current folder

    • How many items have not been downloaded in the current folder

    • Approximately how long it will be until the current folder is synchronized

    • Folder status, such as Up to Date and Last updated at date and time.

    When used with latest Exchange Server:

    When it is used with Exchange Server 2003 or later, the Headers Only mode in Outlook provides a 256-byte plain text preview that includes part of the message body, rather than showing just the message header information. This message preview can help remote users to make better decisions about whether to download a whole message—which, for example, might include a large attachment.

    When used with latest Outlook & Exchange Server:

    Using Outlook with Exchange Server 2003 or later also helps to provide a better experience for users in filtering junk e-mail messages. The Junk E-mail Filter in Outlook provides some support for Outlook users with Cached Exchange Mode on versions of Exchange Server earlier than Exchange Server 2003. The experience is much improved with Exchange Server 2003 or later.

    New features of Outlook 2007 & Exchange Server 2007:
    Several features that are new in Office Outlook 2007 also work better with Exchange 2007.

    • Instant Search works better with Exchange 2007 when you use Outlook in Online mode with a mailbox server, because Outlook can use the index on Exchange Server 2007 for searching. To enable Instant Search when you use Outlook with earlier versions of Exchange, you must configure Outlook to index user mailboxes for each Exchange client. This extra step is required because indexing in Outlook on the user's computer cannot be fully optimized, unlike the server indexing service that is implemented for Exchange Server 2007.
    • If users are configured to use Cached Exchange Mode, Office Outlook 2007 indexes the search locally, regardless of the Exchange server version.
    • In addition, Office Outlook 2007 automatically detects the user's Exchange server with Exchange Server 2007.
    • Automatic detection is also enabled under the following circumstances for earlier versions of Exchange: when the user's computer is joined to a domain and when Exchange is in the same domain as the user account.
  • Le Café Central de DeVa

    Outlook Errors : General Errors - Part # 2


    Receive error when you press F9 to send and receive e-mail in Outlook 2007 & Cached Exchange Mode:

    You use Cached Exchange Mode in Microsoft Office Outlook 2007. Additionally, you use the DownloadOAB registry value to prevent the automatic download of the offline address book (OAB). When you press F9 to send and receive e-mail messages in all Outlook accounts, Outlook unexpectedly tries to download the OAB. Additionally, you receive the following error message:

    TASK 'Microsoft Exchange Server' reported error (0x8004010F) : The operation failed. An object could not be found.

    To resolve this problem, apply hotfix 939596. Additionally, you must turn off the option to download the offline address book before you press F9.

    Reference: For more details refer this KB article and how to obtain the hotfix to resolve the issue.

    Error message when you try to synchronize Outlook to a Windows Live Hotmail account: "Error with Send/Receive"

    You use the Microsoft Office Outlook Connector to synchronize Microsoft Office Outlook to a Windows Live Hotmail account. If the synchronization fails after several attempts, the synchronization process stops. Additionally, you receive the following error message:

    Error in Mail. Error with Send/Receive. http://g.live.com/1OLC12URL/SyncLimit

    This issue occurs if the Windows Live Hotmail account cannot currently be synchronized. To avoid saturating the synchronization limit for the account, the Outlook Connector preemptively stops the synchronization process.

    Reference: For more details refer this KB article to find the workaround to resolve the issue.

  • Le Café Central de DeVa

    Error Codes : Windows Mail and Windows Live Mail error codes


    I came across this KB article which contains a list of error codes that may occur in Windows Mail or in Windows Live Mail. The list contains the following categories:

    • Error code  • Error type • Description

    The list of error codes may be returned in Windows Mail or in Windows Live Mail if a failure occurs when you send mail or when you receive mail. The list contains, General errors, Winsock errors, SMTP (Simple Mail Transfer Protocol) errors, HTTPmail errors, NNTP (Network news Transport Protocol) errors, Remote access errors, IMAP (Internet Message Access Protocol) errors,

  • Le Café Central de DeVa

    Outlook 2007 / MS CRM : Access denied error - [0x80070005-0x80070005-0x000508]


    Whenever we send any email from the Outlook client (Outlook 2007) & MS CRM the email bounces back undeliverable with the following message:

    This message could not be sent. Try sending the message again later, or contact your network administrator. You do not have sufficient permission to perform this operation on this object. See the folder contact or your system administrator. Error is [0x80070005-0x80070005-0x000508].

    The above error code is "Windows General Access Denied" message.

    When we investigated and found that,

    • It's due to "permissions issue" in the "Exchange Organization object" in "Active Directory". In our scenario the error thrown to the Outlook Client, when it tries to attempt to access MessageID from Exchange and failing.
  • Le Café Central de DeVa

    Screencast: Outlook Context Menus and Creating a Meeting from an Email


    Please view this wonderful Screencast from channel9, which easily we can able to create our own menu option to the context menu in Outlook.

    Per jwiese "...would you like to add your own menu option to the context menu in Outlook?  How about turning an email into a new meeting request without having to type in all the attendees or the body and subject?  Well, in this Screencast I'll show you how to add to the context menu and generate a meeting request that includes the email's recipients, subject and body in the meeting details..."

  • Le Café Central de DeVa

    How to access a particular mailbox using Microsoft Exchange web services ?


    In this article, we will see how we can access a particular mailbox using Microsoft Exchange web services ?

    The DistinguishedFolderId element identifies Microsoft Exchange Server 2007 folders that can be referenced by name. The DistinguishedFolderId class has an optional Mailbox property on it that allows you to indicate which mailbox you are accessing.

       1:  <DistinguishedFolderId Id="" ChangeKey="">
       2:     <Mailbox/>
       3:  </DistinguishedFolderId>

    Note: A DistinguishedFolderId resolves to a FolderId. The schema that describes this element is located in the EWS virtual directory of the computer that is running Microsoft Exchange Server 2007 that has the Client Access server role installed.

  • Le Café Central de DeVa

    Microsoft Visual Studio 2005 & ASP.Net 2.0 Web site : How to create Internet Calendar appointment


    Please find the following MSDN article which helps us to make use of Microsoft Visual Studio 2005 to create an ASP.NET 2.0 Web site. It can create and send an Internet Calendar appointment to add to a Microsoft Office Outlook 2007 calendar.

    Internet Calendars are calendars that can be shared through the Internet. Internet Calendars are based on a global Internet standard that allows the exchange of calendar information, regardless of the application that is used to create or view the information. Internet Calendars use the iCalendar format and the .ics file name extension.

    This Visual How-to article uses Microsoft Visual Studio 2005 to create an ASP.NET 2.0 Web site that can create and send an Internet Calendar appointment that can be added to a Microsoft Office Outlook 2007 calendar.

    Also you can view it from the following link.

  • Le Café Central de DeVa

    EWS Programming # 1 : Creating my first Exchange Web Services client application in C#.Net


    Please find my first web service client that i tried couple of months earlier that creates an e-mail item in the Sent Items folder. You can use Microsoft Visual Studio 2005 to create a simple Exchange Web Services client application like this.

       1:  using System;
       2:  using System.Net;
       3:  using System.Security.Cryptography.X509Certificates;
       4:  using System.Net.Security;
       6:  // The ExchangeWebServices namespace was created by using Visual Studio // 2005 and the Add Web Reference wizard.
       7:  using ExchangeWebServices;
       9:  namespace Devas_First_WebService
      10:  {
      11:      partial class Program
      12:      {
      13:          static void Main(string[] args)
      14:          {
      15:              ServicePointManager.ServerCertificateValidationCallback =
      16:              delegate(Object obj, X509Certificate certificate, X509Chain chain, SslPolicyErrors errors)
      17:              {
      18:                  // Replace this line with code to validate server 
      19:  // certificate.
      20:                  return true;
      21:              };
      23:              // Identify the service binding and the user.
      24:              ExchangeServiceBinding esb = new ExchangeServiceBinding();
      25:          // Provide the Network credentials - username, password, domain
      26:              esb.Credentials = new NetworkCredential("<username>", "<password>", "<domain>");
      27:          // Provide the Exchange Web Service (URL)
      28:              esb.Url = @"https://<FQDN>/EWS/Exchange.asmx";
      30:              // Create the CreateItem request.
      31:              CreateItemType createEmailRequest = new CreateItemType();
      33:              // Specifiy how the e-mail will be handled.
      34:              createEmailRequest.MessageDisposition = MessageDispositionType.SaveOnly;
      35:              createEmailRequest.MessageDispositionSpecified = true;
      37:              // Specify the location of sent items. 
      38:              createEmailRequest.SavedItemFolderId = new TargetFolderIdType();
      39:              DistinguishedFolderIdType sentitems = new DistinguishedFolderIdType();
      40:              sentitems.Id = DistinguishedFolderIdNameType.sentitems;
      41:              createEmailRequest.SavedItemFolderId.Item = sentitems;
      43:              // Create the array of items.
      44:              createEmailRequest.Items = new NonEmptyArrayOfAllItemsType();
      46:              // Create a single e-mail message.
      47:              MessageType message = new MessageType();
      48:              message.Subject = "Daily Report";
      49:              message.Body = new BodyType();
      50:              message.Body.BodyType1 = BodyTypeType.Text;
      51:              message.Body.Value = "(1) Handled customer issues, (2) Saved the world.";
      52:              message.Sender = new SingleRecipientType();
      53:              message.Sender.Item = new EmailAddressType();
      54:              message.Sender.Item.EmailAddress = "user1@example.com";
      55:              message.ToRecipients = new EmailAddressType[1];
      56:              message.ToRecipients[0] = new EmailAddressType();
      57:              message.ToRecipients[0].EmailAddress = "user2@example.com";
      58:              message.Sensitivity = SensitivityChoicesType.Normal;
      60:              // Add the message to the array of items to be created.
      61:              createEmailRequest.Items.Items = new ItemType[1];
      62:              createEmailRequest.Items.Items[0] = message;
      64:              try
      65:              {
      66:                  // Send a CreateItem request and get the CreateItem 
      67:  // response.
      68:                  CreateItemResponseType createItemResponse = esb.CreateItem(createEmailRequest);
      69:                  ArrayOfResponseMessagesType responses = createItemResponse.ResponseMessages;
      70:                  ResponseMessageType[] responseMessages = responses.Items;
      72:                  // Access the response messages.
      73:                  foreach (ResponseMessageType respMsg in responseMessages)
      74:                  {
      75:                      if (respMsg.ResponseClass == ResponseClassType.Error)
      76:                      {
      77:                          throw new Exception("Error: " + respMsg.MessageText);
      78:                      }
      79:                      else if (respMsg.ResponseClass == ResponseClassType.Warning)
      80:                      {
      81:                          throw new Exception("Warning: " + respMsg.MessageText);
      82:                      }
      84:                      // Check to determine whether the response message is the correct type.
      85:                      if (respMsg is ItemInfoResponseMessageType)
      86:                      {
      87:                          ItemInfoResponseMessageType createItemResp = (respMsg as ItemInfoResponseMessageType);
      88:                          ArrayOfRealItemsType aorit = createItemResp.Items;
      90:                          foreach (ItemType item in aorit.Items)
      91:                          {
      92:                              if (item is MessageType)
      93:                              {
      94:                                  MessageType myMessage = (item as MessageType);
      95:                                  Console.WriteLine("Created item: " + myMessage.ItemId.Id);
      96:                                  Console.ReadLine();
      97:                              }
      98:                              // If needed add the logic to check and cast for all other types.
      99:                          }
     100:                      }
     101:                  }
     102:              }
     103:              catch (Exception ex)
     104:              {
     105:                  Console.WriteLine(ex.Message);
     106:                  Console.ReadLine();
     107:              }
     108:          }
     109:      }
     110:  }
    Reference: Creating an Exchange Web Services Client Application
  • Le Café Central de DeVa

    Nutshell: Automation using # imports with Exchange Server environment is good or bad?


    Automation using # imports ?

    As you know, Automation (OLE Automation), the technology that allows you to take advantage of an existing program's functionality and incorporate it into your own applications. This technology can greatly simplify and speed up your development.

    # imports:

    In C/C++ preprocessor, we have a directive called "#imports" is available. Using this #import directive allows you to automatically "import" the type information contained in the component type library to your project.

    As you know we can use the #import to do the automation(OLE Automation). The #import, a new directive that became available with Visual C++; it creates VC++ "smart pointers" from a specified type library. It is very powerful, but often not recommended because of reference- counting problems that typically occur when used with the Microsoft Office applications.

    If you use Visual C++ (especially 5.0 or later), you can take advantage of its native Component Object Model (COM) support through the #import statement. The #import creates two header files that reconstruct the type library contents in C++ source code. The primary header file is similar to that produced by the Microsoft Interface Definition Language (MIDL) compiler, but with additional compiler-generated code and data.


    • Usually, the files generated have the same name as the component dynamic-link library (DLL) with the extensions .tlh and .tli.
    • Microsoft ActiveX Data Objects (ADO) type information is required, so you need to include it as well.
    • This directive is used to incorporate information from a type library.
    • The content of the type library is converted into C++ classes, mostly describing the COM interfaces.
    • Using this statement allows you to automatically add type information contained in a type library into your project.

    Need to determine:

    You must determine which of the dependency comments are not otherwise provided for by system headers and then provide an #import directive at some point before the #import directive of the dependent type library to resolve the errors.

    Using in Exchange Server environment:

    When we talk about how we can make use of # imports in our exchange environment, i found this wonderful article which gives reference(s) or code snippets how we can make use of Collaboration Data objects (CDO).

    Note: When using the #import statement, make sure to import the ActiveX Data Objects type information before the Microsoft CDO for Windows 2000 type information.

    Some important points to remember: 

    • The application that we're trying to automate stays in memory even after the program is finished. This may because if we have forgotten to release an acquired interface and we need to track it down.
    • If you are dedicated to using MFC's wrapper classes or Visual C++'s native COM support (#import), either you may still have to delve into the guts of IDispatch and COM Automation in order to work around common bugs and limitations with these frameworks.
    • If you're using #import, it is very likely you could be running into one of the reference-counting bugs associated with it.
    • Often times the bugs can be worked around, but usually it is preferred to use one of the other Automation methods.
    • #import doesn't work very well with the Office applications, because its type libraries and use are fairly complex.
    • Also, such reference counting problems are hard to track down because a lot of the interface-level COM calls are behind-the-scenes when using #import.

    Some known issues to be aware of:

    For more information, see the Knowledge Base article "#import Wrapper Methods May Cause Access Violation" (Q242527) or "Compiler Errors When You Use #import with XML" (Q269194). You can find Knowledge Base articles on the MSDN Library media or at http://support.microsoft.com/support/.

    My take, yes, i do agree that even without making use of # imports we can do more. Take this simple example which doesn't uses the # imports directive, instead it just uses the C++ to build an automated console application straightly. So it's up to the programmer who wants to create their program or it depends on whether he wants to make use of # imports to take advantage of native Component object model or not.

  • Le Café Central de DeVa

    How to get date & time when the message was received by Exchange server ?


    One of my customer wanted to get the date and time when the message was received by Microsoft Exchange?

    • In Exchange Server, we have the OriginationTime property.
    • It indicates the date and time, in coordinated universal time (UTC), when the message was received by Microsoft Exchange.
    • The OriginationTime property is read-only.

    For example, this could be the time the message was received from the Internet via SMTP, or the time a user clicked the Send button in an e-mail client application.

    The OriginationTime property appears on instances of the \\COMPUTERNAME\ROOT\MicrosoftExchangeV2:Exchange_MessageTrackingEntry class.

    Please find the following example (VBScript) shows how to retrieve a list of Exchange_MessageTrackingEntry instances, and how to retrieve the OriginationTime property.

  • Le Café Central de DeVa

    Outlook Programming Series # 12 : How to automate different versions of Outlook using VC++ ?


    You can automate Outlook 2000, 2002, and 2003 with one small change.

    The Outlook 97 Namespace class member has changed to _Namespace in Outlook 2000, 2002, and 2003.

    To use the code above for automating Outlook 2000, 2002, and 2003 change this line:

    Namespace olNS(olApp.GetNames("MAPI"));


    _Namespace olNS(olApp.GetNames("MAPI"));

  • Le Café Central de DeVa

    Web Service : Passing data to and from Webservice & SOAP header


    SOAP headers offer a method for passing data to and from an XML Web service method if the data is not directly related to the XML Web service method's primary functionality.

    For instance, an XML Web service might contain several XML Web service methods that each require a custom authentication scheme. Instead of adding parameters to each XML Web service method for the custom authentication scheme, a SoapHeaderAttribute, referring to a class deriving from SoapHeader, can be applied to each XML Web service method. The implementation for the class deriving from SoapHeader handles the custom authentication scheme.

    In this manner, the XML Web service method implements only the functionality specific to it and adds additional functionality using a SOAP header.

    Reference: http://msdn.microsoft.com/en-us/library/system.web.services.protocols.soapheader.aspx

  • Le Café Central de DeVa

    Microsoft Product Lifecycle : Visual Basic, Exchange Server and Outlook (various versions)




    Microsoft Product Lifecycle for various versions of Visual Basic


    Products Released


    General Availability Date


    Mainstream Support Retired


    Extended Support Retired


    Service Pack Retired




    Visual Basic .NET 2002 Standard Edition









    Visual Basic .NET 2003 Standard Edition









    Visual Basic 2005 Express Edition









    Visual Basic 2008 Express Edition




    Review Note


    Review Note



    Mainstream support will end two years after the next version of this product is released. Extended support will end five years after mainstream support ends.


    Visual Basic 6.0 Enterprise Edition









    Visual Basic 6.0 Standard Edition









    Microsoft Product Lifecycle for various versions of Exchange Server


    Products Released


    General Availability Date


    Mainstream Support Retired


    Extended Support Retired


    Service Pack Retired




    Exchange Server 2000 Service Pack 3




    Review Note


    Review Note



    Support ends 12 months after the next service pack releases or at the end of the product's support lifecycle, whichever comes first. For more information, please see the service pack policy at http://support.microsoft.com/lifecycle/#ServicePackSupport .


    Exchange Server 2003 Service Pack 2




    Review Note


    Review Note



    Support ends 12 months after the next service pack releases or at the end of the product's support lifecycle, whichever comes first. For more information, please see the service pack policy at http://support.microsoft.com/lifecycle/#ServicePackSupport .


    Exchange Server 2007 Service Pack 1




    Review Note


    Review Note



    Support ends 12 months after the next service pack releases or at the end of the product's support lifecycle, whichever comes first. For more information, please see the service pack policy at http://support.microsoft.com/lifecycle/#ServicePackSupport .


    Exchange Server 4.0 Standard Edition






    Not Applicable



    Exchange Server 5.0 Enterprise Edition









    Support for the Exchange 5.0 Outlook Web Access (OWA) client and Internet Information Server (IIS) 3.0 ended on March 31, 2000. (IIS 3.0 is a required component of Exchange 5.0 OWA.) We strongly recommend that customers who are running Exchange 5.0 OWA, upgrade to Internet Information Server 4.0 or later and Exchange 5.5 OWA.


    Exchange Server 5.0 Standard Edition









    Exchange Server 5.5 Enterprise Edition









    Exchange Server 5.5 Standard Edition









    Forefront Security for Exchange Server









    Exchange Server 4.0 Service Pack 1




    Not Applicable


    Not Applicable





    Exchange Server 4.0 Service Pack 2




    Not Applicable


    Not Applicable





    Exchange Server 4.0 Service Pack 3




    Not Applicable


    Not Applicable





    Exchange Server 5.0 Service Pack 1




    Not Applicable


    Not Applicable





    Exchange Server 4.0 Service Pack 4




    Not Applicable


    Not Applicable





    Exchange Server 5.5 Service Pack 1




    Not Applicable


    Not Applicable





    Exchange Server 5.5 Service Pack 2




    Not Applicable


    Not Applicable





    Exchange Server 5.5 Service Pack 3




    Not Applicable


    Not Applicable





    Exchange Server 2000 Service Pack 1




    Not Applicable


    Not Applicable





    Exchange Server 4.0 Service Pack 5




    Not Applicable


    Not Applicable





    Exchange Server 2003 Enterprise Edition











    Exchange Server 2003 Standard Edition











    Exchange Server 5.0 Service Pack 2




    Not Applicable


    Not Applicable





    Exchange Server 5.5 Service Pack 4




    Not Applicable


    Not Applicable





    Exchange Server 2003 Service Pack 1




    Not Applicable


    Not Applicable





    Exchange Server 2007 Enterprise Edition











    Exchange Server 2007 Standard Edition












    Microsoft Product Lifecycle for various versions of Outlook


    Products Released


    General Availability Date


    Mainstream Support Retired


    Extended Support Retired


    Service Pack Retired




    Outlook 97 Standard Edition









    Outlook Express 4.0 for Macintosh






    Not Applicable



    Outlook Express 4.0






    Not Applicable



    Outlook 98 Standard Edition









    Outlook Express 4.5 for Macintosh






    Not Applicable



    Outlook 2000 Standard Edition









    Outlook Express 5.0 Macintosh Edition






    Not Applicable



    Outlook 2002 Standard Edition









    Outlook Express 6.0




    Review Note


    Review Note



    Please review the Internet Explorer 6 information that is on the Select a Product for Lifecycle Information site at http://support.microsoft.com/gp/lifeselect or the Support Lifecycle Index site at http://support.microsoft.com/gp/lifeselectindex.


    Outlook 2003









    Outlook 2007









    Outlook 2007 with Business Contact Manager






    Not Applicable



    Outlook 2007 with Interconnect










  • Page 1 of 2 (35 items) 12