Le Café Central de

                 ... Deva blogs!!

  • Le Café Central de DeVa

    Gotcha : Appointment created with WebDAV is not getting displayed in Outlook?



    One of my customer updated me that he created an appointment by using WebDAV. But the user has the following issues when he tries to view the mailbox owner's calendar:

    • The appointment does not appear when Microsoft Outlook is in the Day, Week, or Month view.
    • The appointment appears correctly when the appointments are sorted by category.
    • The appointment appears correctly when the delegate user views the appointment by using Microsoft Outlook Web Access (OWA).

    Why it’s happening?
    Later when we started probing we found that the specific appointment doesn’t have dispidrecurring property or it is missing. This issue occurs if you do not explicitly set the dispidRecurring MAPI property in your program. When a schema name in your program is not specified, Outlook makes assumptions about the schema properties. Therefore, appointments that you create programmatically may not appear consistently when they are viewed in Outlook

    To resolve this issue, specify the dispidRecurring property in your program as specified in the article, like, we need to include the data type namespaces, "xmlns:dt=""urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/""" in our WebDAV code.

    But make sure, that we don’t fell prey to complex calendaring by setting dispidRecurring property as TRUE along with WebDAV, like by doing, "<mapi:0x00008223 dt:dt=""boolean"">1</mapi:0x00008223>". This excerpt sets the MAPI property to 1 (TRUE) to create a recurring appointment. To create a non-recurring appointment, set this property to 0 (FALSE). As the complex calendaring is not supported with WebDAV, you can refer the following article or the support KB, why complex calendaring is not supported and what is supported with WebDAV.

  • Le Café Central de DeVa

    How to configure user permissions to relay e-mail message through SMTP Service?

    You need to configure the user permissions to relay e-mail messages through the SMTP service. Do the following steps:
    1. Click Start, click Run, type inetmgr or open Internet Information Manager from Control Panel > Administrative Tools, and then click OK.
    2. Expand ComputerName, and then right-click a valid SMTP virtual server.
      Note The placeholder ComputerName represents the name of the local computer.
    3. Click Properties. On the Security tab, add the user account as an Operator, which you want to relay e-mail message through SMTP Service.
    4. Close all dialog boxes, and then restart the SMTP service
    5. Now try to send the email. Hope now the e-mail messages will be relayed through the SMTP service
  • Le Café Central de DeVa

    Sending email using CDO &amp;amp;amp; remote SMTP Server


    Assume that the computer on which this example will run has neither a SMTP service nor Microsoft Outlook® Express installed. In this case, you need to send the message through some SMTP service on the network and must configure the Message object completely.

    Further assume that the SMTP service through which you intend to send messages requires that you authenticate yourself using basic (clear-text) authentication. An instance of the Configuration Component Object Model (COM) class is created and the configuration fields in the object are set with values such as the required SMTP server name, port, authentication, and user name and password.

    Each field is in the http://schemas.microsoft.com/cdo/configuration/ namespace. As you know the http://schemas.microsoft.com/cdo/configuration/ namespace defines the majority of fields used to set configurations for various CDO objects. These configuration fields are set using an implementation of the IConfiguration.Fields collection.

    Many CDO objects use information stored in an associated Configuration object to define configuration settings. One example is the Message object, where you use its associated Configuration object to set fields such as sendusing. This field defines whether to send the message using the local SMTP service drop directory (if the local machine has the SMTP service installed), an SMTP service directly over the network. If sending over the network, you set smtpserver to specify the IP address or DNS name of the machine hosting the SMTP service, and optionally, smtpserverport to specify a port value. If credentials are required for connecting to an SMTP service, you can specify them by setting the sendusername and sendpassword.

    A similar set of fields exists for posting messages using either a local NNTP service pickup directory, or over the network After the Configuration object has been populated with relevant configuration information, the object reference is set on a Message object. The Message object uses the configuration information to send the message. Here as stated below the fully qualified field names are used to clarify the process. However, there are string constants (as type library modules) in the type library for each of these field names.

    I have enclosed the SMTP configuration parameters for your reference:
       1:  Flds("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "sample.smtp.com"
       2:  Flds("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
       3:  Flds("http://schemas.microsoft.com/cdo/configuration/sendusing") = cdoSendUsingPort
       4:  'CdoSendUsing enum value =  2
       5:  Flds("http://schemas.microsoft.com/cdo/configuration/smtpaccountname") = "My Name"
       6:  Flds("http://schemas.microsoft.com/cdo/configuration/sendemailaddress") = """MySelf"" <myself@example.com>"
       7:  Flds("http://schemas.microsoft.com/cdo/configuration/senduserreplyemailaddress") = """Another"" <another@example.com>"
       8:  Flds("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = cdoBasic
       9:  Flds("http://schemas.microsoft.com/cdo/configuration/sendusername") = "domain\username"
      10:  Flds("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "password"
  • Le Café Central de DeVa

    Developer Messaging Best Practices : System.Net classes


    Per the article, the following recommendations will help you use the classes contained in System.Net to their best advantage:

    • Use WebRequest and WebResponse whenever possible instead of type casting to descendant classes. Applications that use WebRequest and WebResponse can take advantage of new Internet protocols without needing extensive code changes.

    • When writing ASP.NET applications that run on a server using the System.Net classes, it is often better, from a performance standpoint, to use the asynchronous methods for GetResponse and GetResponseStream.

    • The number of connections opened to an Internet resource can have a significant impact on network performance and throughput. System.Net uses two connections per application per host by default. Setting the ConnectionLimit property in the ServicePoint for your application can increase this number for a particular host. Setting the ServicePointManager..::.DefaultPersistentConnectionLimit property can increase this default for all hosts.

    • When writing socket-level protocols, try to use TCPClient or UDPClient whenever possible instead of writing directly to a Socket. These two client classes encapsulate the creation of TCP and UDP sockets without requiring you to handle the details of the connection.

    • When accessing sites that require credentials, use the CredentialCache class to create a cache of credentials rather than supplying them with every request. The CredentialCache class searches the cache to find the appropriate credential to present with a request, relieving you of the responsibility of creating and presenting credentials based on the URL.

  • Le Café Central de DeVa

    Combining SQL Server tables and Exchange Web Services


    Have you tried programmatically combining the two powerful enterprise tools: SQL Server 2005 (table-valued user-defined functions) with Exchange Server 2007(Exchange Web Services)?Combining SQL Server 2005 (table-valued user-defined functions)  with Exchange Server 2007 (Exchange Web Services) I followed the Microsoft article written by Jim Kleewein and Ray Dixon, which talks about how we can combine the SQL Server tables and Exchange Web Services to provide data from both Microsoft Exchange and SQL Server to client applications so that the data appears as if it were stored in SQL Server.

    SQL Server tables:

    Table-valued user-defined functions in SQL Server return a table, much like a SQL Server view, but provide for much more powerful logic.

    Exchange Web Services:

    Exchange Web Services in Exchange 2007 provides access to Exchange store items and information, such as message, contact, task, and calendar items and availability information.

    SQL Server tables & SQL Server tables:

    When you combine these technologies, you have a formidable new way to integrate, search, and analyze your Microsoft Exchange messaging data by using the full power of SQL Server, and to combine that messaging data with virtually any other data managed by, or available from, SQL Server.

    Still, what you can achieve?

    Per the article, by combining these technologies, you can:

    • Correlate information that is stored in Microsoft Exchange (messages, contacts, calendar items, tasks, and so on) with customer relationship management (CRM) data that is stored in SQL Server.
    • Join Microsoft Exchange contacts data with sales data.
    • Combine messaging data with any SQL Server data; for example, combine e-mail with call center data for customer support.
    • Correlate information from different calendar resources.
    • Add a subset of messaging data to a SQL Server data repository.

    This list provides some ideas, but is not all-inclusive.

    How can i start to create a sample or with an existing sample to see how it works?

    I found a downloadable sample demonstrates a powerful integration of Microsoft® Exchange Server 2007 and Microsoft SQL Server™ 2005 features. This integration enables you to provide data from both Microsoft Exchange and SQL Server to client applications so that the data appears as if it were stored in SQL Server.


    • To execute the sample, you need to have Exchange Server 2007 along with Client Access server role (CAS ) enabled, SQL Server 2005 & VS2005 to modify or build the sample
    • This sample is designed to work with the following authentications SQL Server Authentication, SQL Server user authentication and UserId with Password authentication.
    • Per the above article, this sample is intended for instructional purposes only and is not meant to be used in a production environment.
    • Once you downloaded the sample and if you are currently running Windows Vista, save the ExchangeUDF.exe file locally before you run it. To extract the files, right-click the executable and select Run as administrator.

    So what will be the process workflow for it?
    Per the article, it talks about the following SQL Server tables and Exchange Server workflow. The following figure shows the process that the SQL Server Tables and Exchange Web Services sample with the following steps:

    1. The user requests information from the computer that is running Microsoft SQL Server.
    2. The computer that is running SQL Server acts as a Microsoft Exchange client by requesting data from the Client Access server by using Exchange Web Services.
    3. The Client Access server communicates with the Microsoft Exchange computer that is running the Unified Messaging server role or the user to request the specified data from the mailbox for the user.
    4. The Unified Messaging server responds to the request.
    5. The Client Access server returns the response to the computer that is running SQL Server by using Exchange Web Services.
    6. The computer that is running SQL Server combines the requested Microsoft Exchange data with the requested SQL Server data and returns the single set of data to the user.

    Just i tried this. So, what are you waiting then, please follow through the above articles and practices mentioned there. I am sure you’ll love this…

  • Le Café Central de DeVa

    Exchange Server 2007 : Getting Mailbox statistics using C#.Net &amp; Exchange Powershell


    In this session, we will have a look about how to get the mailbox statistics information using from Exchange Server 2007 SP1 using C#.Net & Exchange Powershell.

    I tried the following code to get the mailbox statistics…

       1:  ....
       2:  //Create Runspaceconfiguraiton object
       3:  RunspaceConfiguration config = RunspaceConfiguration.Create();
       4:  PSSnapInException snapEx = null;
       6:  //Add it to the Powershell SnapIn
       7:  PSSnapInInfo info = config.AddPSSnapIn("Microsoft.Exchange.Management.PowerShell.Admin", out snapEx);
       9:  //Create a Runspace
      10:  Runspace space = RunspaceFactory.CreateRunspace(config);
      12:  //Supply the Command & its relevant parameters collection
      13:  Command createcmd = new Command(@"Get-Mailboxstatistics testmailbox");
      14:  createcmd.Parameters.Add("server", "servername");
      16:  //Create the collection & invoke the pipe
      17:  pipe.Commands.Add(createcmd);
      18:  Collection<PSObject> results = null;
      19:  results = pipe.Invoke();
      20:  ....
  • Le Café Central de DeVa

    Exchange Server 2007 & Workflow designer for Exchange


    What is CDO for Workflow?

    CDO for Workflow (CDOWF) is built-in functionality provided with Microsoft Exchange 2000 Server. By using CDOWF, which is driven by the Exchange store event architecture, you can design workflow applications without having to write the fundamental code that accesses, modifies, and controls data. CDOWF includes a workflow engine, modeling tools, and an event sink.

    Applications that use CDOWF are stored on the Exchange server. Direct access to that server, however, is not required. The Workflow Designer can be used to deploy workflow applications remotely on an Exchange server, with the requirement that the user have sufficient permissions to access the mailboxes where the application is to be installed.

    Support for Workflow?

    Per the article, if you have developed applications by using the Workflow Designer for Exchange 2000 Server, and you require a copy of the Workflow Designer installation package, please contact Microsoft Customer Support Services. The Workflow Designer for Exchange 2000 Server will be supported while Microsoft Exchange Server 2003 support is available.

    Note: CDOWF does not ship in and is not supported for Microsoft Exchange Server 2007.

    Where can i get more documentation on this?

    Note: The Workflow Designer for Exchange 2000 Server is no longer available for download. The download file that is available here includes only a Readme file, and does not include the Workflow Designer


    Earlier it’s shipped with Exchange 2000 Server and Exchange Server 2003. CDOWF does not ship with and is not supported for Exchange 2007. CDOWF is expected to be enhanced or replaced in a future version of Exchange. So we need to consider using Microsoft BizTalk for more complicated, inter-organizational, and non-messaging related workflow process implementations.

    Future of Exchange Workflow…
    Microsoft recommends that you migrate applications that use Exchange Workflow and the Collaborative Data Objects for Exchange Workflow (CDOWF) to use the Windows Workflow Foundation. It is used to create applications that use workflow and orchestration. The programming model is more up-to-date, and the technology is part of the Windows platform. CDOWF can’t be used in managed code, but as you’d expect, Windows Workflow Foundation can.

    then, what is Windows Workflow Foundation?











    Windows Workflow Foundation supplies the programming model, engine, and tools required to quickly build workflow-enabled applications on Microsoft Windows.

    • It consists of a namespace, an in-process workflow engine, and designers for Microsoft Visual Studio 2005.
    • Applications that use Windows Workflow Foundation can be developed and run on Microsoft Windows Vista, Microsoft Windows XP, and the Microsoft Windows Server 2003 family.
    • Windows Workflow Foundation includes support for both system workflow and human workflow across a variety of scenarios, including workflow within line-of-business applications, user interface page flow, document-centric workflow, human workflow, composite workflow for service-oriented applications, business rule–driven workflow, and workflow for systems management.

    Where can i get more information on this…

    Windows Workflow Foundation
    Understanding Tracking in Windows Workflow Foundation
    WF Tutorial: Building Sequential Workflows for Windows Workflow Foundation


    Related articles:


  • Le Café Central de DeVa

    Exchange Server 2007 & OWA : Password change feature


    If you work with Exchange Server 2007, this method is no longer required.  But, it can be used with Windows Server 2003 and Exchange Server 2007 configurations when the ability to change passwords after they have expired or when users are required to change their password at the first logon is needed.


    When i was in search mode regards to this, just i found an article by Will Duff, which talks about what we need to know about the OWA Change Password feature of Exchange Server 2007 ? It’s worth of reading…:)

    He not only talks about the OWA & Exchange server 2007, but has various references to it’s previous versions.

    “…The previous versions of Exchange Server utilized the Change Password functionality for IIS 5 and 6 using the IISADMPWD virtual directory and a .DLL file on the server.  These configurations were discussed in the following KB articles:

    FIX: You experience various problems when you use the Password Change pages in IIS 5.0

    FIX: You experience various problems when you use the Password Change pages in IIS 6.0

    Implementing the Change Password feature with Outlook Web Access

  • Le Café Central de DeVa

    Windows Mobile : WM 6.1 SMTP fix released


    While i was reading articles related to our messaging arena and with regards to Windows Mobile they released SMTP fix for Windows Mobile 6.1. Per them, as some of you have noticed, a bug recently appeared on Windows Mobile 6.1 devices that prevented certain users from being able to send e-mail. It happened to investigate the cause, create a fix, and finally test it across the various flavors of Windows Mobile 6.1 out there, the fix is available: download it now!

    WM team noticed some confusion around the feature that caused the bug, so here’s a quick description of it: This feature allows operators to specify an alternate server that can be used only when your device has a problem accessing your mail account’s SMTP directly. When can this happen? Some mail services, like those provided by ISPs, only allow access to their SMTP servers when you are directly on their network.  With this feature, it’s supposed to be easier for end users to send mail on a Windows Mobile device.

  • Le Café Central de DeVa

    Windows (Outlook) Mobile: Using Hotmail & Gmail


    I read this interesting blogpost which talks about how to use your Hotmail or Windows Live account with Outlook Mobile. It gives detailed information like what are the sync’ing with Windows Live support, how to set up, limitation and its mobile related ms forum details…


    Also if you’re a Gmail user from Windows Mobile then read this FAQ, which talks about some of the most common issues that arise when trying to use Gmail on your Windows Mobile phone.

  • Le Café Central de DeVa

    When Microsoft Outlook 2007 is sequenced and streamed with Windows Vista, the search function in Outlook may not function as designed


    Issue: When Microsoft Outlook 2007 is sequenced and streamed with Windows Vista, the search function in Outlook may not function as designed.

    Note: Outlook 2003 does not experience this problem

    Please go through the article which describes about this…Virtualized Outlook 2007 search feature may not work as designed on Windows Vista clients

  • Le Café Central de DeVa

    .Net & COM: How to consume managed type from COM?


      In order to consume the managed type from COM, do the follow the steps given below:

      • Please refer Register assemblies with COM. Generally types in an assembly (and type libraries) must be registered at design time. If an installer does not register the assembly, instruct COM developers to use Regasm.exe.

      • Please refer Reference .NET types from COM. In general COM developers can reference types in an assembly using the same tools and techniques they use.

      • Please refer Call a .NET object which describes how COM developers can call methods on the .NET object the same way they call methods on any unmanaged type. The classical example would be COM CoCreateInstance API activates .NET objects.

      • Please refer Deploy an application for COM access. A strong-named assembly can be installed in the global assembly cache and requires a signature from its publisher. Assemblies that are not strong named must be installed in the application directory of the client

    • Le Café Central de DeVa

      Debugging functions : How to debug an application without any debugger?


      Using OutputDebugString

      If the application has no debugger, the system debugger displays the string if the filter mask allows it. (Note that this function calls the DbgPrint function to display the string. For details on how the filter mask controls what the system debugger displays, see the DbgPrint function in the Windows Driver Kit on MSDN.) If the application has no debugger and the system debugger is not active, OutputDebugString does nothing.

      If you use this function, it sends a string to the debugger for display.

      Communicating with the debugger

      The OutputDebugString function sends a string from the process being debugged to the debugger by generating an OUTPUT_DEBUG_STRING_EVENT debugging event. A process can detect whether it is being debugged by calling the IsDebuggerPresent function.

      The DebugBreak function causes a breakpoint exception in the current process. A breakpoint is a location in a program where execution is stopped to allow the developer to examine the program's code, variables, and register values and, as necessary, to make changes, continue execution, or terminate execution.

      The FatalExit function terminates the current process and gives execution control to the debugger, but unlike DebugBreak, it does not generate an exception. This function should only be used as a last resort, because it does not always free the process's memory or close its files.

      Ok, till now we saw Outputdebugstring, debugbreak, fatalexit and isdebuggerpresent functions. So, where can i find the other debugging functions?

      You can get it from the following:




      Determines whether the specified process is being debugged.


      Enables a debugger to continue a thread that previously reported a debugging event.


      Enables a debugger to attach to an active process and debug it.


      Stops the debugger from debugging the specified process.


      Causes a breakpoint exception to occur in the current process.


      Causes a breakpoint exception to occur in the specified process.


      Sets the action to be performed when the calling thread exits.


      Transfers execution control to the debugger.


      Flushes the instruction cache for the specified process.


      Retrieves the context of the specified thread.


      Retrieves a descriptor table entry for the specified selector and thread.


      Determines whether the calling process is being debugged by a user-mode debugger.


      Sends a string to the debugger for display.


      Reads data from an area of memory in a specified process.


      Sets the context for the specified thread.


      Waits for a debugging event to occur in a process being debugged.


      Retrieves the context of the specified WOW64 thread.


      Sets the context of the specified WOW64 thread.


      Writes data to an area of memory in a specified process.

    • Le Café Central de DeVa

      How OWA & Exchange 2000, 2003 and 2007 coexists ?


      If you work with Outlook Web Access (OWA) along with Exchange Server 2000 or/and Exchange Server 2003 or/and Exchange Server 2007, then please find the wonderful technet article, which i read frequently and distribute it with my customers.

      This article 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

      Blogpost's related to MAPI docs


      I read couple of related blogpost's related to MAPI documentation. You can start reading from Sgriffin's detailed information regarding the MAPI documentation. Also i found couple of related blogpost's from mstehle and Angela.

      You can end up by reading the article posted by Thom Randolp, which talks about the MAPI documentation. Per him, "... based on some discussions we had a while ago, the folks in Office have been putting a LOT of time and effort into improving the MAPI material, and bringing it up-to-date for Office 2007. Well, they’ve finished their work, and the improvements are substantial! Check out the new content on MSDN Library at: http://msdn.microsoft.com/en-us/library/cc765775.aspx. We plan to have a redirection page under Exchange Server for about six months, to remind you where the stuff went..."

    • Le Café Central de DeVa

      PDC'08 : Exchange Web Services Managed API &amp; how Exchange is getting “Cloud Ready”


      Some time earlier there was a silent & stable, services platform launched by Microsoft known as "cloud ready" or "Azure".

      What is Azure:

      Azure Services Platform (Azure) is an internet-scale cloud services platform hosted in Microsoft data centers, which provides an operating system and a set of developer services that can be used individually or together. Azure’s flexible and interoperable platform can be used to build new applications to run from the cloud or enhance existing applications with cloud-based capabilities.

      How Services platform look like:

      Per the article, it will be like

      How it's used with Exchange:

      Microsoft also offers cloud applications ready for consumption by customers such as Windows Live, Microsoft Dynamics, and other Microsoft Online Services for business such as Microsoft Exchange Online and SharePoint Online. Due to Azure's open architecture which gives developers the choice to build web applications, applications running on connected devices, PCs, servers, or hybrid solutions offering the best of online and on-premises.

      How Exchange is getting "Cloud ready":

      Regarding this, quite some time earlier I found this wonderful article at channel9, presented by Jason Henderson, Senior Lead Program Manager for Exchange Web Services team. The new Exchange Web Services Managed API provides managed code access to Exchange, whether running on premises or in the cloud. Learn how this new Microsoft .NET API provides full access to Microsoft Exchange mail, calendaring, scheduling, contacts, eventing, synchronization, permissioning, and public folders programmatically using the Exchange Web Services protocol.

      If you haven't attended PDC ’08 in L.A. at the last October (2008) you can watch the Exchange Web Services Managed API: Unified Communications Development for Exchange session.  This will be the first time that the API has been shown in public.

    • Le Café Central de DeVa

      Webcast & Whitepaper: Exchange Online


      As you know the new Microsoft Exchange Online is the messaging component of the Business Productivity Online Suite (BPOS) from Microsoft Online Services. I found this interesting Webcast by Edward Wu, Senior Program Manager Lead, who talks about the new Exchange Online application, features and its capabilities. Also, we explore the application capabilities of Exchange Online, including steps for configuring and managing the service, such as adding custom domains, configuring for external relay, provisioning mailboxes, creating distribution lists, and adding contacts.

      Also i found this white paper describes the services and features that are included with the Standard offering of Exchange Online. Download and read the Exchange Online Service Description

    • Le Café Central de DeVa

      Outlook & automatic categorization with Rules


      I found this interesting and useful blogpost by Justin Mahood (Outlook Program Manager), which talks about automatic categorization with rules. In this article, he talks about Color categories along with the automatic categorization with rules, which helps to optimize this process by categorizing my incoming mail.

    • Le Café Central de DeVa

      Exchange Server: How to retrieve appointments using C# & WebDAV?

      Code Snippet (C#):
         //Declaration part
          string strExchSvrName = "";
          string strMailbox = "";
          string strCalendarUri = "";
          string strDomain = "";
          string strUserName = "";
          string strPassword = "";
          System.Net.HttpWebRequest WebDavRequest = null;
          System.Net.HttpWebResponse WebDavResponse = null;
          System.Net.CredentialCache MyCredentialCache = null;
          byte[] bytes = null;
          System.IO.Stream WebDavRequestStream = null;
           // Provide the Exchange server name;
            strExchSvrName = "mydomain.in";
            // Provide Mailbox folder name.
             strMailbox = "Mailbox1";
            //if HTTPS -then provide URI of the user's calendar folder
            strCalendarUri = "https://" + strExchSvrName + "/exchange/"+ strMailbox + "/Calendar/";
              //if HTTP -then provide URI of the user's calendar folder
              //strCalendarUri = "http://" + strExchSvrName + "/exchange/" + strMailbox + "/Calendar/";
              //Provide the User name and password of appointment creator. Make sure the user has enough permissions to read
              strUserName = "username"; 
              strDomain = "domain";
              strPassword = "password";
              //Build the Query
              string query = "<?xml version=\"1.0\"?><D:searchrequest xmlns:D = \"DAV:\" >"
                      + "<D:sql>SELECT \"http://schemas.microsoft.com/exchange/outlookmessageclass\", \"DAV:contentclass\", 
      \"DAV:displayname\" FROM \""
      + strCalendarUri + "\""
                      + "WHERE \"DAV:ishidden\" = true AND \"DAV:isfolder\" = false"
                      + "</D:sql></D:searchrequest>";
              query = "<?xml version=\"1.0\"?>"
                      + "<dav:searchrequest xmlns:dav=\"DAV:\">"
                      + "<dav:sql>"
                      + "SELECT "
                      + "\"DAV:displayname\", " // Appointment Uri portion of the resource
                      + "\"DAV:href\", " // Full resource Uri of the appointment
                      + "\"urn:schemas:httpmail:subject\", " // Subject of appointment
                      + "\"urn:schemas:calendar:dtstart\", " // Start date/time of appointment
                      + "\"urn:schemas:calendar:dtend\", " // End date/time of appointment
                      + "\"urn:schemas:httpmail:textdescription\", " // Body of appointment
                      + "\"urn:schemas:calendar:location\", " // Location of appointment
                      + "\"urn:schemas:calendar:alldayevent\", " // Whether appointments an all day appointment
                      + "\"urn:schemas:calendar:meetingstatus\", " // Confimed status of the appointment
                      + "\"urn:schemas:calendar:busystatus\", " // Comitted status the appointment represents
                      + "\"http://schemas.microsoft.com/mapi/proptag/x823D0003\", " // Color of the appointment
                      + "\"urn:schemas:calendar:reminderoffset\", " // Reminder offset of the appointment
                      + "\"DAV:ishidden\", " // Whether this is hidden
                      + "\"urn:schemas:calendar:instancetype\", " // Relation of the appointment to a recurring series
                      + "\"urn:schemas:calendar:transparent\", " // Transparency of the appointment to free/busy searches
                      + "\"urn:schemas:calendar:timezoneid\" " // Display timezone of the appointment
                      + "FROM Scope('SHALLOW TRAVERSAL OF \"" + strCalendarUri + "\"') "
                      + "WHERE "
                      + "(\"DAV:contentclass\" = 'urn:content-classes:appointment' ) " // Item is an appointment
                      + "AND (NOT \"urn:schemas:calendar:instancetype\" = 1) " // appointment is not the master of a recurring series (Get single
      appointments or instances of recurring appointments)
                      + "AND (\"urn:schemas:calendar:dtend\" &gt; '" + 
                      Convert.ToDateTime("3-12-2007").Date.ToUniversalTime().ToString("yyyy/MM/dd HH:mm:ss") + "')
      //Appointment ends after the start of our range
                      + "AND (\"urn:schemas:calendar:dtstart\" &lt; '" + 
      Convert.ToDateTime("3-17-2007").Date.ToUniversalTime().ToString("yyyy/MM/dd HH:mm:ss") + "')
      //Appointment begins before the end of our range
                      + "AND (\"DAV:displayname\" like '" + "LS.ImportantDates." + "%' ) "
                      + "ORDER BY \"urn:schemas:calendar:dtstart\" "
                      + "</dav:sql>"
                      + "</dav:searchrequest>";
              //Provide credentials required to access the server. Here i used the NTLM
              MyCredentialCache = new System.Net.CredentialCache();
              MyCredentialCache.Add(new System.Uri(strCalendarUri), "NTLM", new System.Net.NetworkCredential(strUserName, strPassword, strDomain));
              //Create the HttpWebRequest object.
              WebDavRequest = (System.Net.HttpWebRequest)HttpWebRequest.Create(strCalendarUri);
              // Add the network credentials to the request.
              WebDavRequest.Credentials = MyCredentialCache;
              // Specify the PROPPATCH method.
              WebDavRequest.Method = "SEARCH";
              // Encode the body using UTF-8.
              bytes = Encoding.UTF8.GetBytes(query);
              // Set the content header length.
              WebDavRequest.ContentLength = bytes.Length;
              // Get a reference to the request stream.
              WebDavRequestStream = WebDavRequest.GetRequestStream();
              // Write the message body to the request stream.
              WebDavRequestStream.Write(bytes, 0, bytes.Length);
              // Release the connection
              // Set the content type header.
              WebDavRequest.ContentType = "text/xml";
             WebDavResponse = (System.Net.HttpWebResponse)WebDavRequest.GetResponse();
             Response.Write("Calendar : ");
        Response.Write("Status Code: " + WebDavResponse.StatusCode + "Description: " + WebDavResponse.StatusDescription);
             using (System.IO.StreamReader streamReader = new System.IO.StreamReader(WebDavResponse.GetResponseStream()))
           You can get more related samples and detailed information from Dan's blog. For more information you can also refer this article 
    • Le Café Central de DeVa

      How to show & recover the deleted subfolders using PFDAVAdmin tool?


      Using PFDAVAdmin we need to use the "Show deleted subfolders" option which enumerates any deleted subfolders of the currently selected folder.

      Note that the deleted folders are preserved only if Deleted Item Retention has been configured on the public store. Any such folders appear in red. If you right-click a deleted folder, you have the option to recover it.

      Using Recover Folder can be useful when the recover option in Outlook or Outlook Web Access is failing.

    • Le Café Central de DeVa

      Outlook 2007 & Hyperlinks


      Microsoft Office 2007 system contains several settings that enable you to control the way external threats are mitigated. By default, links to external content are disabled. This includes links to data sources, hyperlinks to Web sites and documents, and links to images and media.


      When a user opens a document that contains links to external content, the Message Bar notifies the user that the links are disabled. Users can enable the links by clicking the Message Bar. You can modify this default behavior by configuring security settings for external content. These settings enable you to:

      • Suppress hyperlink warnings.

      By default, users are notified about unsafe hyperlinks. In addition, unsafe hyperlinks are disabled until they are enabled by a user. Enabling this setting suppresses warnings for the following:

      • Hyperlinks that use unsafe protocols.

      • Hyperlinks from a remote file to the local computer.

      One of my customer reported that he want to suppress the hyperlink warnings. You can suppress warnings for some unsafe hyperlinks, including hyperlinks that use unsafe protocols and hyperlinks from a remote file to the local computer. Unsafe protocols are protocols that can run scripts or content that is potentially unsafe, including msn, nntp, mms, outlook, and stssync.

      To implement that follow the steps, so that we can do it by using Office customization tool (OCT) or Group policy Object editor.

    • Le Café Central de DeVa

      How to authenticate the Inbox in Microsoft Exchange Server 2003 with forms-based authentication enabled?


      Please find the Code Snippet Access Exchange Server 2003 using WebDAV in your Web application per KB:

         1:  'Declaration Section
         2:  Dim strServerName as String = "Server Name"     'TODO: Change to your environment
         3:  Dim strDomain as String = "Domain Name"       'TODO: Change to your environment
         4:  Dim strUserID as String = "Username"            'TODO: Change to your environment
         5:  Dim strPassword as String = "Password"        'TODO: Change to your environment
         7:  ' Create our destination URL.
         8:  Dim strURL As String = "https:/" & strServerName & "/exchange" & strUserName & "/inbox/test.eml"
         9:  Dim strReusableCookies As String
        11:  ' Create our Web request object.
        12:  GETRequest = CType(WebRequest.Create(New System.Uri(strURL & strApptItem)), HttpWebRequest)
        13:  strReusableCookies = AuthenticateSecureOWA(strServerName, strDomain, strUserID, strPassword)
        15:  ' Add the cookie set that is obtained after OWA authentication to our request header.
        16:  PROPPATCHRequest.Headers.Add("Cookie", strReusableCookies)
        17:  PROPPATCHRequest.ContentType = "text/xml"
        18:  PROPPATCHRequest.KeepAlive = True
        19:  PROPPATCHRequest.AllowAutoRedirect = False
        21:  ' Specify the PROPPATCH method.
        22:  PROPPATCHRequest.Method = "GET"
        24:  ' Enter your WebDAV-related code here.
        25:  ...

      There are two ways of implementing this.

      Method # 1: In the Visual Basic .NET code sample that was just mentioned, the strReusableCookies string variable is the authentication cookie that is returned from the AuthenticateSecureOWA function call. If the authentication cookie times out, call the AuthenticateSecureOWA function again to receive a new authentication cookie.

      Method # 2: Put the WebDAV request in a try/catch block. The try/catch block will catch the authentication cookie time-out error. When the authentication cookie time-out error occurs, you can re-authenticate the Inbox in Exchange Server 2003 to the Exchange Server 2003 server that is enabled with forms-based authentication.

    • Le Café Central de DeVa

      Various Outlook versions : .pst file has different formats & folder size limits


      Microsoft Office Outlook 2007 & Outlook 2003 have both a different format and a larger overall size limit for the personal folders (.pst) file than the .pst files that are in the earlier versions of Microsoft Outlook.

      In Outlook 2002 and earlier, the .pst files are in the American National Standards Institute (ANSI) format, and the overall size has a limit of 2 gigabytes (GB).

      By default, .pst files are in the Unicode format in Outlook 2007 and in Outlook 2003. Additionally, the overall size of the .pst files has a limit that is more than the 2-GB limit that is imposed by the ANSI .pst files. By default, the limit for a Unicode .pst file in Outlook 2007 and in Outlook 2003 is configured to be 20 GB.

      As in earlier versions of Outlook, Outlook 2003 Internet Message Access Protocol Version 4rev1 (IMAP4) accounts and HTTP accounts use .pst files that do not use the Unicode format. Therefore, the .pst files for IMAP or HTTP accounts in Outlook 2003 are limited to 2 GB. In Outlook 2007, the Internet Message Access Protocol Version 4rev1 (IMAP4) accounts and HTTP accounts do use Unicode format .pst files and are not limited to 2 GB.

    • Le Café Central de DeVa

      Outlook Programming: Custom forms &amp; disabling the macro warning?


      This issue happens if the form is not located in a trusted location, such as the Organizational Forms Library on an Exchange Server-based computer. Outlook displays the macro warning message to protect you from potentially malicious programming code, commonly called macro viruses.

      • You cannot directly prevent the warning message from appearing;
      • you must publish the form to a trusted location.

      In detail, outlook always prompts you before opening an item that contains VBScript code if the item is from an unknown source. This methodology ensures that unsafe VBScript code cannot run on your computer without your explicit approval. Outlook bases the decision to display or not display a warning on the item's form design and where script, and the accompanying form definition, is actually stored.

      • If the form has been published in one of the forms libraries (organizational, personal, or folder), Outlook considers the form safe, and no warning appears. The author of the form had the appropriate privileges to publish the form, so the form is considered trusted.
      • If the VBScript code and form definition is carried within the item, Outlook considers the form unsafe, and the user receives a warning when opening the item

      Ideally, when you design a forms solution, you should avoid having the VBScript warning message appear. Additionally, you do not want the custom code to be automatically disabled. If you are using a custom mail message form and you are also using Outlook in a Microsoft Exchange Server environment, ideally you should publish the form into the Organizational Forms Library so that it is available to all users within the organization. In addition to not having the warning appear, another benefit is that the form definition is not routed from user to user, which can save considerable network and server resources.

      If you are using a "non-routed" form, such as a contact or post form, the form should typically be published into the folder which will store the items that are based on the form. For example, if you are creating a custom contact form that will be used to store shared contacts in an Exchange public folder, the form should be published in that public folder. One exception to this general rule is if you will be using the same custom form in many folders. In this case it may be advisable to publish the form to the Organizational Forms Library so there is only copy of the form to maintain.

    • Le Café Central de DeVa

      Outlook programming : Looping individual mails inside the Inbox

         1:  'myLoop method
         2:  Sub myLoop()
         4:     'Declaration
         5:      Dim olApp As Outlook.Application
         6:      Dim olNs As Outlook.NameSpace
         7:      Dim olFldr As Outlook.MAPIFolder
         8:      Dim olItms As Outlook.Items
         9:      Dim olMail As Object
        11:      Set olApp = New Outlook.Application
        12:      Set olNs = olApp.GetNamespace("MAPI")
        13:      Set olFldr = olNs.GetDefaultFolder(olFolderInbox)
        14:      Set olItms = olFldr.Items
        16:      'Loop the items     
        17:      For Each olMail In olItms
        18:          'Here you need to use olMail Object to inspect individual mails inside the Inbox
        19:      Next olMail
        21:      'Release the objects appropriately
        22:      Set olFldr = Nothing
        23:      Set olNs = Nothing
        24:      Set olApp = Nothing
        25:  End Sub
    Page 1 of 1 (25 items)