Le Café Central de
Deva             


                    ... Deva blogs!!



  • Le Café Central de DeVa

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

    • 1 Comments

    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

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

    • 0 Comments

    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

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

    • 0 Comments

    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"));

    to:

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

  • Le Café Central de DeVa

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

    • 0 Comments

    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

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

    • 0 Comments

    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.

    Usage:

    • 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

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

    • 0 Comments

    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;
       5:   
       6:  // The ExchangeWebServices namespace was created by using Visual Studio // 2005 and the Add Web Reference wizard.
       7:  using ExchangeWebServices;
       8:   
       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:              };
      22:   
      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";
      29:   
      30:              // Create the CreateItem request.
      31:              CreateItemType createEmailRequest = new CreateItemType();
      32:   
      33:              // Specifiy how the e-mail will be handled.
      34:              createEmailRequest.MessageDisposition = MessageDispositionType.SaveOnly;
      35:              createEmailRequest.MessageDispositionSpecified = true;
      36:   
      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;
      42:   
      43:              // Create the array of items.
      44:              createEmailRequest.Items = new NonEmptyArrayOfAllItemsType();
      45:   
      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;
      59:   
      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;
      63:   
      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;
      71:   
      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:                      }
      83:   
      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;
      89:   
      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

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

    • 0 Comments

    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

    Video: Microsoft Office Outlook Web Access online training

    • 1 Comments

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

    image

    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

    Synchronization : Exchange Server & Outlook

    • 0 Comments

    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

    Troubleshooting: Exchange environment with Event viewer

    • 0 Comments

    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:

    http://technet.microsoft.com/en-us/library/aa996117(EXCHG.65).aspx
    http://technet.microsoft.com/en-us/library/aa996634(EXCHG.65).aspx
    http://technet.microsoft.com/en-us/library/aa996105(EXCHG.65).aspx
    http://technet.microsoft.com/en-us/library/bb232137(EXCHG.80).aspx

Page 2 of 2 (35 items) 12