Le Café Central de
Deva             


                    ... Deva blogs!!



  • Le Café Central de DeVa

    Installing Ubuntu 10.10 on Windows Server 2008 R2 Hyper-V

    • 0 Comments

    I used the following steps to install Ubuntu (10.10) version in the my Windows Server 2008 R2 Hyper-V machine.

    1) Created a new Hyper-V machine

    2) Downloaded the latest Ubuntu ISO. You can notice few options on this page:

    (a) Download Desktop Edition – I used this.
    (b) Burn your CD or create a USB drive
    (c) You can try it before you install it

    3) Create a legacy Network driver and associate it with the above Hyper-V machine

    4) Select the Ubuntu ISO by the following option: Hyper-V –> Media –> DVD Drive –> Insert Disk

    5) Started the Ubuntu Hyper-V and mount with above ISO

    image

    6) Select the options to Install Ubuntu and its configuration. For the disk management, you can use the entire drive or customize the drive partition as per your requirement.

    image

    image

    One it’s installed, it will request you to restart. During the time, make sure to remove the above mounted ISO drive.

    image

    I would rate the installation is pretty straight, works fine with all the drivers. I haven’t faced any glitches during the above work and loads with 640 * 480 display configuration.

    Bingo. Enjoy!!

  • Le Café Central de DeVa

    KB : Application support for WEBDAV to access Exchange Server?

    • 1 Comments

    Exchange Server 2003Do you know the support that is available for applications that use the Web Distributed Authoring and Versioning (WebDAV) protocol to access Microsoft Exchange 2000 Server or Microsoft Exchange Server 2003 ?

     

    What is supported?

    Microsoft support the use of the WebDAV protocol for the following items:

    •Non-recurring appointments
    •Contacts in Microsoft Outlook that you create or modify
    •Folders that you create in Outlook and in Exchange 2000 Server or Exchange Server 2003
    •E-mail messages that you create or modify

    Note
    You cannot use the WebDAV protocol to access the Rich Text Format (RTF) body of an e-mail message.

    All other tasks that use the WebDAV protocol to modify a Web store in Exchange 2000 Server or in Exchange Server 2003 are not supported.
    Note These limitations do not apply to Outlook Web Access URLs.

    Why it's not supported?

    Because of limitations that exist when you create items that are compatible with Outlook, we do not support complex calendaring when you use the WebDAV protocol. Complex calendaring applications include the following items:

    •Recurring appointments
    •Meeting functionality
    Note Meeting functionality includes sending, modifying, and canceling meetings.

    What are the alternatives?

    For applications that require complex calendaring functionality with Exchange 2000 Server or with Exchange Server 2003, we recommend that you use the following API's:

    •Collaboration Data Objects for Exchange 2000 Server (CDOEX)
    •Collaboration Data Objects (CDO) 1.21
    •Outlook Object Model

    These API's include additional logic that is required to make the created items work correctly with Outlook. This additional logic is not available when you use the WebDAV protocol. for more information please find the following MSDN KB.

  • Le Café Central de DeVa

    Creating Outlook Calendar Folder using WebDAV & C#.Net

    • 1 Comments

    Code snippet to create Outlook Calendar Folder using WebDAV & C#.Net

    // TODO: Replace with the URL of an object on Exchange Server
            string sUri = "http://ExchServer/Exchange/Administrator/Inbox/NewApptFolder";
     
            System.Uri myUri = new System.Uri(sUri);
            HttpWebRequest HttpWRequest = (HttpWebRequest)WebRequest.Create(myUri);

            string sQuery;
            sQuery = "<?xml version='1.0'?>" +
              "<a:propertyupdate xmlns:a='DAV:' " +
              "xmlns:ex='http://schemas.microsoft.com/exchange/'>" +
              "<a:set><a:prop>" +
              "<ex:outlookfolderclass>IPF.Appointment</ex:outlookfolderclass>" +
              "</a:prop></a:set>" +
              "</a:propertyupdate>";

            // Set Credentials
            // TODO: Replace with appropriate user credentials

            NetworkCredential myCred = new NetworkCredential(@"DomainName\UserName", "UserPassword");
            CredentialCache myCredentialCache = new CredentialCache();
            myCredentialCache.Add(myUri, "Basic", myCred);
            HttpWRequest.Credentials = myCredentialCache;

            // Set Headers
            HttpWRequest.KeepAlive = false;
            HttpWRequest.Headers.Set("Pragma", "no-cache");
            HttpWRequest.ContentType =  "text/xml";
            HttpWRequest.ContentLength = sQuery.Length;

            //Set the request timeout to 5 minutes
            HttpWRequest.Timeout = 300000;
            // Set the request method
            HttpWRequest.Method = "MKCOL";

            // Store the data in a byte array
            byte[] ByteQuery = System.Text.Encoding.ASCII.GetBytes(sQuery);
            HttpWRequest.ContentLength = ByteQuery.Length;
            Stream QueryStream = HttpWRequest.GetRequestStream();
            // Write the data to be posted to the Request Stream
            QueryStream.Write(ByteQuery,0,ByteQuery.Length);
            QueryStream.Close();

            // Send Request and Get Response
            HttpWebResponse HttpWResponse = (HttpWebResponse)HttpWRequest.GetResponse();

            // Get the Status code
            int iStatCode =  (int)HttpWResponse.StatusCode;
            string sStatus = iStatCode.ToString();
            Console.WriteLine("Status Code: {0}", sStatus);
            // Get the request headers
            string sReqHeaders = HttpWRequest.Headers.ToString();
            Console.WriteLine(sReqHeaders);

            // Read the Response Steam
            Stream strm = HttpWResponse.GetResponseStream();
            StreamReader sr = new StreamReader(strm);
            string sText = sr.ReadToEnd();
            Console.WriteLine("Response: {0}", sText);

            // Close Stream
            strm.Close();

            // Clean Up
            myCred = null;
            myCredentialCache = null;
            HttpWRequest = null;
            HttpWResponse = null;
            QueryStream = null;
            strm = null;
            sr = null;
         

    Note: This code snippet shows how to use WebDAV to create a Microsoft Outlook Calendar folder.

    • It initially sets the method of the HttpWebRequest class to "MKCOL"
    • Then sends the request with the user credentials to the Exchange server.
    • It uses the HttpWebResponse method to receive the response.

    The HttpWebRequest and the HttpWebResponse methods are available in the System.Net namespace

  • Le Café Central de DeVa

    Visual Studio 2013 Update 4 now available for download and related channel 9 video…

    • 0 Comments

    Now you can download Visual Studio 2013 Update 4. Visual Studio 2013 updates are cumulative releases. The following download links always direct you to the latest update:


    If you do not have Visual Studio 2013 (original-release version), then run one of the following downloads, both Visual Studio 2013 and Update 4 are installed.

    This update includes the latest software updates and feature additions. New Technology improvements in Visual Studio 2013 Update 4 is listed in http://support.microsoft.com/kb/2994375.

    In addition to that you can have a look at the below Channel 9 video featuring Robert and Dmitry Lyalin – along with special guests Aaron Bjork and Rong Lu from the engineering team – take you through the many new features, highlighting and demoing web editor improvements (HTML, CSS, JSON), various new capabilities in Team Foundation Server such as Git pull requests, updated tooling for Azure WebJobs and the new GPU usage analyzer etc.

  • Le Café Central de DeVa

    Outlook Programming: How to retrieve unread messages from any Outlook folder?

    • 1 Comments
    Recently one of my customer updated that he got a requirement to programmatically retrieve unread messages from any Outlook folder to be implemented part of his application. We tried the following steps -  Will show you how you can programmatically retrieve unread messages from any Outlook folder using Outlook Object Model (OOM) API.

    Let we first have a look at the following code snippet (C#.Net):
    Outlook.MAPIFolder Fldr = this.Application.ActiveExplorer().Session.GetDefaultFolder
    
            _(Outlook.OlDefaultFolders.olFolderInbox);
    
    Outlook.Items UnReads = Fldr.Items.Restrict("[Unread]=true");
    
    MessageBox.Show(string.Format("Unread items in Inbox = {0}", UnReads.Items.Count));
    

    Line # 1, we need to specify target Outlook folder that we need to read messages. Here I used Inbox.
    Line # 2, we need to filter target folder items using Restrict filter as Unread]=true to get unread items
    Line # 3, displaying the number of unread items.

    Please note: In order to retrieve unread messages from any Outlook folder, just point out the target folder in the Line # 1, instead of Inbox.

    Pretty simple isn’t it Winking smile

  • Le Café Central de DeVa

    Troubleshooting: IIS/Exchange logs and WebDAV functions

    • 0 Comments

    You can collect information about client requests by enabling logging for sites and services. IIS logs are stored in %SystemRoot%\system32\Logfiles\<service_name>. If you examine the IIS/Exchange log file you will see the request for the sample application being handled by IIS - you can notice couple of jargons like GET, PUT, POST, MKCOL, LOCK, UNLOCK, PROPFIND, SEARCH, PROPATCH, SUSBCRIBE, UNSUBSCRIBE, POLL etc.

    clip_image002

    The three main HTTP functions used are GET, PUT and POST:

    • GET: Retrieves a document 

    • PUT: Puts an item in a folder 

    • POST: Submits an item to a folder


    In addition to above, there are few more WebDAV functions that are used:

    • MKCOL: Makes a collection that is in essence the same as a Web Storage System folder. MKCOL allows you to make folders and set their properties. 

    • LOCK: Locks documents to prevent writes. 

    • UNLOCK: Allows writes and creates updates. 

    • PROPFIND: Searches for properties individually or for a whole set of folders. 

    • SEARCH: Provides filter, subquery and sort capabilities to a search. 

    • PROPPATCH: Sets arbitrary properties on an item. 

    • SUBSCRIBE: Adds a user to a list. 

    • UNSUBSCRIBE: Removes a user from a list. 

    • POLL: Checks to see if the notification is fired.

    Happy troubleshooting!!

  • Le Café Central de DeVa

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

    • 0 Comments

    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;
       5:   
       6:  //Add it to the Powershell SnapIn
       7:  PSSnapInInfo info = config.AddPSSnapIn("Microsoft.Exchange.Management.PowerShell.Admin", out snapEx);
       8:   
       9:  //Create a Runspace
      10:  Runspace space = RunspaceFactory.CreateRunspace(config);
      11:   
      12:  //Supply the Command & its relevant parameters collection
      13:  Command createcmd = new Command(@"Get-Mailboxstatistics testmailbox");
      14:  createcmd.Parameters.Add("server", "servername");
      15:   
      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

    OOM : How to retrieve Outlook attachments ( Reference, Value, Embedded and OLE) using VBA?

    • 1 Comments

    Please find the following code snippet for retrieving various Outlook attachments  - Reference, Value, Embedded and OLE using Outlook Object Model (OOM) & VBA:

    'Code Snippet : How to retrieve Outlook attachments using Visual Basic for Application (VBA)
    Dim omailitem As Outlook.MailItem
    Dim oattach As Outlook.Attachment
    Dim ofolder As Outlook.Folder
     
    Set ofolder = Application.Session.PickFolder
    Debug.Print "Total Items available in Folder : " & ofolder.Items.Count
     
    For Each Item In ofolder.Items
    Set omailitem = Item
    Debug.Print "Item Subject :" & omailitem.Subject & " Size (in bytes):" & omailitem.Size
    If omailitem.Attachments.Count > 0 Then
     
    For Each oattach In omailitem.Attachments
    If oattach.Type = Outlook.olByReference Then
    Debug.Print "By reference : " & oattach.FileName & " Size (in bytes) : " & oattach.Size
    ElseIf oattach.Type = Outlook.olByValue Then
    Debug.Print "By Value : " & oattach.FileName & " Size (in bytes) : " & oattach.Size
    ElseIf oattach.Type = Outlook.olEmbeddeditem Then
    Debug.Print "Embedded item : " & oattach.FileName & " Size (in bytes) : " & oattach.Size
    ElseIf oattach.Type = Outlook.olOLE Then
    Debug.Print "OLE : " & oattach.FileName & " Size (in bytes) :" & oattach.Size
    End If
    Debug.Print "-------------------"
    Next
    End If
    Next

    Here,
    - olByReference The attachment is a shortcut to the location of the original file.
    - olByValue The attachment is a copy of the original file and can be accessed even if the original file is removed.
    - olEmbeddeditem The attachment is an Outlook message format file (.msg) and is a copy of the original message.
    - olOLE The attachment is an OLE document

    You can also get more info from : http://msdn.microsoft.com/en-us/library/aa220737(office.11).aspx

    Result will be like this (sample data provided for your view):

    Total Items available in Folder : 3
    Item Subject :Fw: Mormons and Roses - A "Cheers" TV Show ClipSize (in bytes):4057344
    By Value : Mormonscantsendflowers_1.wmvSize (in bytes) : 4054264
    -------------------
    Item Subject :Rate spectrum on exotic position JEX and JNKSize (in bytes):2537614
    By Value : JNK_JEX_IR.xls Size (in bytes) : 2525885
    -------------------
    Item Subject :Fw: Blue Angles in San Francisco(May be a repeat)Size (in bytes):741293
    By Value : image001.jpg Size (in bytes) : 61862
    -------------------
    By Value : image002.jpg Size (in bytes) : 59804
    -------------------
    By Value : image003.jpg Size (in bytes) : 81551
    -------------------
    By Value : image004.jpg Size (in bytes) : 48063
    -------------------
    By Value : image005.jpg Size (in bytes) : 62174
    -------------------
    By Value : image006.jpg Size (in bytes) : 55008
    -------------------
    By Value : image007.jpg Size (in bytes) : 76879
    -------------------
    By Value : image008.jpg Size (in bytes) : 42201
    -------------------
    By Value : image009.jpg Size (in bytes) : 45637
    -------------------
    By Value : image010.jpg Size (in bytes) : 56987
    -------------------
    By Value : image011.jpg Size (in bytes) : 2308
    -------------------
    By Value : image012.jpg Size (in bytes) : 97229
    -------------------
    By Value : image013.jpg Size (in bytes) : 28169
    -------------------

  • Le Café Central de DeVa

    Virtual Classroom : Building Web Apps with ASP.NET Jump Start

    • 2 Comments

    Hi there,

    You can join this Jump Start session provided by Microsoft Virtual Academy – it’s tailored for experienced application developers interested in leveraging ASP.NET and Visual Studio 2012 to offer modern apps that target modern browsers. Two of Microsoft’s most seasoned ASP.NET speakers, Scott Hanselman and Jon Galloway, will provide an accelerated introduction to building modern web applications with ASP.NET 4.5 and ASP.NET MVC 4. In this course, they will target key scenarios like building mobile ready websites, social web applications as well as modern HTML5 browser features.


    Technologies Covered

         •  New and advanced features in ASP.NET Web Forms
          •  ASP.NET MVC 4 and ASP.NET Web API
          •  jQuery
          •  SignalR
          •  Entity Framework
          •  Visual Studio 2012
          •  Internet Explorer 10 and HTML5
          •  Building apps for Office with HTML5
          •  Windows Azure Web Sites for ASP.NET developers

    Details

    February 19, 2013
    8:00am-5:00pm PST

    Register: In order to participate you need to register first.
    Where : Live online
    What  : Engaging, demo virtual class
    Cost  : Free
    Target Audience: Intended for developers who have at least six months of professional experience.

    Hope this helps.

  • Le Café Central de DeVa

    Download: Outlook 2007 Add-ins & code samples

    • 0 Comments

    Whenever we discuss with regards to Outlook Add-in customization, many of our customer(s) or their developers want to customize it according to their requirements. Also they look for the code-samples, related articles to proceed further. In this discussion, i have added couple of Outlook 2007 specific add-ins, code samples along with their download links.

    Please download the following Outlook add-ins along with the code-samples:

    Outlook 2007 Add-Ins: RulesAddin, TravelAgencyAddin, and PrepareMeAddin
    Download: http://www.microsoft.com/downloads/details.aspx?FamilyId=F871C923-3C42-485D-83C7-10A54A92E8A2&displaylang=en

    Please note: The Outlook 2007 Sample Add-Ins are a learning tool that will help you understand some of the important new features in the Outlook 2007 object model. Each sample is available in a version for Visual Studio 2005 Tools for Office Second Edition (VSTO 2005 SE) in addition to the version based on the Outlook 2007 Sample: Visual Studio 2005 Templates.

    They provide coverage of the following important new areas:

    • Using the Rules object model, which allows you to programmatically create or access most rules supported by the Outlook Rules Wizard (Rules sample)
    • Implementing a form region for an Outlook contact item (Travel Agency sample)
    • Adding a custom task pane to an Outlook AppointmentItem (Prepare Me sample)
    Outlook 2007 Sample: Ribbon Extensibility Add-In
    Download: http://www.microsoft.com/downloads/details.aspx?FamilyID=11ab93bf-48dc-4f73-8f6b-62b4482a92bc&displaylang=en

    Please note: The Outlook 2007 Ribbon Extensibility Add-In is a learning tool that will help you understand how to customize the Ribbon for Outlook Inspector windows. It provides coverage of the following important new areas:

    • How legacy command bar customizations appear in an Outlook Inspector window
    • How to implement the Office.IRibbonExtensibility interface in an Outlook add-in
    • Providing Ribbon markup for Ribbon customization depending on the RibbonID string passed in the GetCustomUI callback
    • Using the IRibbonControl.Context object to find an instance of an Inspector object
    • Changing the state of Ribbon controls depending on the PropertyChange event for an Outlook item.
    Outlook 2007 Sample: Visual Studio 2005 Templates
    Download: http://www.microsoft.com/downloads/details.aspx?familyid=0cab159a-0272-4635-b158-10553779a3df&displaylang=en

    Please note: The Outlook 2007 Add-in Templates provide a basic template for developing Outlook 2007 add-ins using Visual Studio 2005. The templates are available in both Visual Basic and Visual C# languages. Each template includes the OutlookItem class, which enables developers to work with generic Outlook items through late-binding, without determining the item type first.

    The templates also include wrapper classes that enable you to track multiple Outlook Inspector or Explorer windows. The templates provide an alternative to the Outlook add-in templates available with Microsoft Visual Studio 2005 Tools for the 2007 Office system (VSTO 2005 Second Edition). VSTO 2005 SE is the preferred tool for developing add-ins for Outlook 2007. If you choose to build your add-in by using the Outlook 2007 Add-In Templates, you must add a COM Shim project and a Setup project to your add-in solution.

    Outlook 2007 Add-In: Form Region Add-In
    Download: http://www.microsoft.com/downloads/details.aspx?familyid=932b830f-bf8f-41fc-9962-07a741b21586&displaylang=en

    Please note: The Outlook 2007 Form Region Add-ins are a learning tool that will help you understand how to design, build, and run custom form solutions based on Outlook form regions. They provide coverage of the following important new areas:

    • Tracking the state of a form region across multiple windows
    • Implementing the FormRegionStartup interface in an Outlook add-in
    • Understanding the form region manifest XML
    • Registering a form region with Outlook
    • Storing form components as a project resource
    • Deploying a form region solution
    Outlook 2007 Sample: What's New Add-Ins
    Download: http://www.microsoft.com/downloads/details.aspx?FamilyId=AABF127D-D069-4549-A1B1-667A698C3EF6&displaylang=en

    Please note: The Outlook 2007 What's New Add-Ins are a learning tool that will help you understand some of the important new features in the Outlook 2007 object model. They provide coverage of the following important new areas:

    • Context menu customization
    • The Table object model and Instant Search queries
    • The PropertyAccessor object that allows getting or setting properties that are not explicitly exposed in the Outlook object model
    • The Rules object model that allows programmatically creating or accessing most rules supported by the Outlook Rules Wizard
    • The SelectNamesDialog object that displays the Outlook Address Book and lets you customize the dialog caption and recipient selectors
    • Enhancements to the AddressEntry and AddressList objects, including the ExchangeUser and ExchangeDistributionList objects that allow getting and setting properties of an Exchange user or Exchange distribution list.
  • Le Café Central de DeVa

    Download: EWS Managed API 1.1

    • 0 Comments

    If you use EWS (Exchange Web Services) Managed API 1.0 or 1.1 beta, then its time for downloading its latest update: EWS Managed API 1.1 (Version 14.02.0051.000)

    The Microsoft Exchange Web Services (EWS) Managed API 1.1 provides a managed interface for developing client applications that use Exchange Web Services. The EWS Managed API simplifies the implementation of applications that communicate with Microsoft Exchange Server 2007 Service Pack 1 (SP1) and later versions of Microsoft Exchange. Built on the Exchange Web Services SOAP protocol and Autodiscover, the EWS Managed API provides a .NET interface to EWS that is easy to learn, use, and maintain.

    You can download it from http://www.microsoft.com/downloads/en/details.aspx?FamilyID=c3342fb3-fbcc-4127-becf-872c746840e1

    Note:
    1) For x64 (64-bit) computers, download and run EwsManagedApi.msi
    2) For x86 (32-bit) computers, download and run EwsManagedApi32.msi
    3) Requires Microsoft .NET Framework 3.5 and Microsoft Visual Studio 2008 or later

  • Le Café Central de DeVa

    Migration: Exchange Public folders and its future

    • 0 Comments

    Public Folders are used in earlier versions of Microsoft Exchange Server to store free/busy data and files. From Microsoft Exchange Server 2007, free/busy data is no longer stored in public folders. It’s recommend that you do not store files in public folders in Exchange 2007. Instead, consider using Microsoft Office SharePoint, or Windows SharePoint Services. Public folders are included and supported in Exchange 2007 and 2010. However, future releases of Microsoft Exchange might not include public folders. You can visit http://blogs.technet.com/b/exchange/archive/2006/02/20/419994.aspx. Also, you can refer MS Exchange team blog have posted the updated public folder guidance for versions of Exchange past Exchange 2007.

    So, what are my options?

    If you're building something new, you should look at the requirements and building on the SharePoint Technologies platform:

    + Starting with Exchange 2007, we recommend that applications use the Availability service to provide free/busy data for Exchange mailbox users. Windows SharePoint Services replaces the file sharing functionality that public folders provide. You must redesign applications that use public folders to use Exchange Web Services.
    + Also consider redesigning custom applications as early as possible as future versions of Microsoft Exchange may not contain public folders.
    + In addition to that you can refer the wonderful blogpost by Joel.

  • Le Café Central de DeVa

    Outlook Object Model : Creating Outlook Categories programmatically and assign colors, shortcut keys to that

    • 1 Comments

    In this blogpost, we will try to create the Outlook Categories programmatically using Outlook Object Model API. Also we will assign the relevant colors and shortcuts to that. Whenever we try with Outlook Object Model, it’s relatively simple.

    '[Code snippet to create Categories]
    Private Sub CreateCategory()
     
        Dim objNameSpace As NameSpace
        Dim objCategory As Category    
      
        ' Obtain a NameSpace object reference
        Set objNameSpace = Application.GetNamespace("MAPI")
        'Add the Category, set its color and shortcutkey, if any
        Set objCategory = objNameSpace.Categories.Add("SampleCat", OlCategoryColor.olCategoryColorDarkBlue, 
    _OlCategoryShortcutKey.olCategoryShortcutKeyNone)
       
       ' Clean up
        Set objCategory = Nothing
        Set objNameSpace = Nothing
        
    End Sub
     
    Happy programming!!
  • Le Café Central de DeVa

    Exchange throttling: MAPI application fails with error “The information store could not be opened. [MAPI 1.0 - [MAPI_E_LOGON_FAILED(80040111)]]”

    • 0 Comments

    We recently resolved a case where a customer tries accessing Exchange Server 2010 mailboxes (DAG) via their custom Exchange MAPICDO based application. On average 2-3 days once, they're frequently facing an error “The information store could not be opened. [MAPI 1.0 - [MAPI_E_LOGON_FAILED(80040111)]]” while attempting to connect to Exchange server 2010. After some days of normal working, Exchange server starts to refusing their connector to open the users' mailboxes. Whenever they notice this error, the application just fails and they need to restart the app to make it work.

    During debugging, we haven’t noticed any issues logged Exchange Server’s event viewer and MPS also looked fine. We took memory dump and analyzed RCA logs, which pointed client throttling policy.

    Earlier, Steve had blogged an excellent article on this. So first we need to understand more about Exchange Client throttling, a feature which got introduced in Exchange Server 2007. Exchange server 2007/2010 allows many clients to connect via Outlook, MAPI, ActiveSync, Outlook Anywhere, OWA ,IMAP  or  POP3, to their Mailboxes through the (CAS) Client Access Server role. Throttling policies are used to restrict clients in the Exchange Server resources they can use. The purpose of these restrictions is to make sure a client can’t bring down an Exchange Server or disrupt services for other clients, intentionally or unintentionally, by exhausting resources. Thus, throttling will also help in lowering the impact of denial-of-service attacks. Because the limit is enforced on clients, and clients can connect to their mailbox simultaneously using different components, throttling policies are applied to mailboxes.

    Note: By default the mailbox attribute ThrottlingPolicy is not set, meaning the default throttling policy will be used (refer the below pic):

    Default Throttling Policy

    Once the ThrottlingPolicy is set, it will be shown like the below:

    Modified Throttling Policy

    You have to use the exchange shell to manage throttling policies with the New-ThrottlingPolicy, Get-ThrottlingPolicy, Set-ThrottlingPolicy & Remove-ThrottlingPolicy cmdlets. We pointed them to fix it by creating/modifying client throttling policy – it helped them to move ahead.

  • Le Café Central de DeVa

    Adding delegates in Exchange Web Services (Exchange Server 2007 SP1)

    • 1 Comments

    Delegates & Exchange Web Services 

    In Microsoft Exchange Server 2007 SP1, you can use Exchange Web Services to add, update, and remove delegates.

    Code sample

    Please find the code example that shows you how to add delegates that can take actions on behalf of a principal. In this code it shows how to add two delegate users to an account.

    static void AddDelegate()
    {
        // Set the version, credentials, and Client Access server on ExchangeServiceBinding.
        ExchangeServiceBinding esb = new ExchangeServiceBinding();
        esb.RequestServerVersionValue = new RequestServerVersion();
        esb.RequestServerVersionValue.Version = ExchangeVersionType.Exchange2007_SP1;
        esb.Credentials = new NetworkCredential("username", "password", "domain");
        esb.Url = "https://example.com/ews/exchange.asmx";

        // Create the request.
        AddDelegateType request = new AddDelegateType();

        // Identify the principal's mailbox.
        request.Mailbox = new EmailAddressType();
        request.Mailbox.EmailAddress = "user1@example.com";

        // Identify the delegates who are given access to the principal's mailbox.
        request.DelegateUsers = new DelegateUserType[2];
        request.DelegateUsers[0] = new DelegateUserType();
        request.DelegateUsers[0].UserId = new UserIdType();
        request.DelegateUsers[0].UserId.PrimarySmtpAddress = "user2@example.com";
        request.DelegateUsers[1] = new DelegateUserType();
        request.DelegateUsers[1].UserId = new UserIdType();
        request.DelegateUsers[1].UserId.PrimarySmtpAddress = "user3@example.com";
       
        // Specify the permissions that are granted to each delegate.
        request.DelegateUsers[0].DelegatePermissions = new DelegatePermissionsType();
        request.DelegateUsers[0].DelegatePermissions.CalendarFolderPermissionLevel = DelegateFolderPermissionLevelType.Reviewer;
        request.DelegateUsers[0].DelegatePermissions.CalendarFolderPermissionLevelSpecified = true;
        request.DelegateUsers[1].DelegatePermissions = new DelegatePermissionsType();
        request.DelegateUsers[1].DelegatePermissions.TasksFolderPermissionLevel = DelegateFolderPermissionLevelType.Author;
        request.DelegateUsers[1].DelegatePermissions.TasksFolderPermissionLevelSpecified = true;
        request.DelegateUsers[1].DelegatePermissions.InboxFolderPermissionLevel = DelegateFolderPermissionLevelType.Editor;
        request.DelegateUsers[1].DelegatePermissions.InboxFolderPermissionLevelSpecified = true;

        // Specify whether the principal recieves meeting requests.
        request.DeliverMeetingRequests = DeliverMeetingRequestsType.DelegatesAndSendInformationToMe;
        request.DeliverMeetingRequestsSpecified = true;

        try
        {
            // Send the request and get the response.
            AddDelegateResponseMessageType response = esb.AddDelegate(request);
            DelegateUserResponseMessageType[] responseMessages = response.ResponseMessages;

            // One DelegateUserResponseMessageType exists for each attempt to add a delegate user to an account.
            foreach (DelegateUserResponseMessageType user in responseMessages)
            {
                Console.WriteLine("Results of adding user: " + user.ResponseClass.ToString());
                Console.WriteLine(user.DelegateUser.UserId.DisplayName);
                Console.WriteLine(user.DelegateUser.UserId.PrimarySmtpAddress);
                Console.WriteLine(user.DelegateUser.UserId.SID);
                if (user.DelegateUser.ReceiveCopiesOfMeetingMessagesSpecified)
                {
                    Console.WriteLine("Does the delegate receive copies of meeting related messages: " + user.DelegateUser.ReceiveCopiesOfMeetingMessages);
                }
                if (user.DelegateUser.ViewPrivateItemsSpecified)
                {
                    Console.WriteLine("Can the delegate view private items in the principal's mailbox: " + user.DelegateUser.ViewPrivateItems);
                }
            }
            Console.ReadLine();
        }
        catch (Exception e)
        {
            Console.WriteLine(e.Message);
            Console.ReadLine();
        }
    }

    For more information refer this article

  • Le Café Central de DeVa

    Exchange Management Shell : Changing DisplayName format “LastName, FirstName”

    • 0 Comments

    As we know by default the Display Name of Exchange Mailboxes(Exchange Server 2007 SP2) is in the format of “Firstname Lastname”. I want to change this for the couple of existing mailboxes to “Lastname, Firstname” for one my customer – he preferred non-development stuff!!

    I tried to do the same using the Exchange Management Shell, which fits for my requirement:
    > Get-Mailbox “User Name” | Get-User | ?{ $_.Lastname -ne $null } | %{ $dispName=$_.LastName + “, ” + $_.FirstName ; set-mailbox $_.SamAccountName -Displayname $dispName }

    In case you want to revert back to the format “Firstname Lastname”, here’s the command for that.
    > Get-Mailbox “User Name” | Get-User | ?{ $_.Lastname -ne $null } | %{ $dispName=$_.FirstName + ” ” + $_.LastName ; set-mailbox $_.SamAccountName -Displayname $dispName }

    You can try this out…

  • Le Café Central de DeVa

    Download: .Net Universe 2013 Poster

    • 4 Comments

    You can download the .Net Universe 2013 poster. This Poster showing the main .NET SDKs, libraries and packages classified by application type and package type (NuGet, official support, etc.).
    .Net Universe 2013 Poster
    This poster shows how the trends are changing in .NET as we´re moving from a single large .NET Framework to a more loosely coupled and autonomous libraries and sub-frameworks, many of them even published as NuGet packages and evolving continuously. The number of those libs and packages is evolving and growing, so having a visual photo of it can be helpful. The main idea of the poster is to show that you can create any kind of application with .NET, from the largest applications to the smaller apps: in the cloud, on the web, on desktops, tablets, phones, and in embedded environments (even watches!). Any of those application types is shown as category/bucket in the poster and within each bucket we´re tossing the main libraries/SDKs/packages out. Then we´re also showing cross-cutting concerns buckets like Security, Data Access, and .NET Extension libs. The main categories are the following: - Emerging application patterns (Mobile, Web & Cloud) - Established application patterns (Desktop and Embedded) - Cross-Cutting concerns Finally, the poster is putting a check/mark on every lib/SDK bullet depending if they are or not complaint with the following: - NuGet package - Open Source - Microsoft Official Supported You can print it out or use it as in electronic format (.PDF). Using the electronic format (.PDF) allows you to access each content URL/page related.

  • Le Café Central de DeVa

    How to : Determine the version number, build number & the service pack of Exchange Server?

    • 1 Comments

    Determine version number of Exchange:
    To determine the version number, the build number, and the service pack level of a Microsoft Exchange Server computer, check the following properties of the server.

    If you have Exchange Server 4.0, Exchange Server 5.0, or Exchange Server 5.5 then you can, follow these steps:

    1. Start the Microsoft Exchange Administrator program.
    2. In the left pane, expand the objects until you locate the server object, and then click the server object.
    3. On the File menu, click Properties.
    If you have Microsoft Exchange 2000 Server or Microsoft Exchange Server 2003 computer, then follow these steps:
    1. Start the Microsoft Exchange Administrator program.
    2. In the left pane, expand the objects until you locate the server object.
    3. Right-click the server object, and then click Properties.

    Build numbers and version numbers of the Exchange Server:
    Each version of Microsoft Exchange Server has a different build number. The following table lists the build numbers and general release dates for each version.

    Version

    Build number

    Release date

     

     

     

    Microsoft Exchange Server  4.0

    4.0.837

    April 1996

    Microsoft Exchange Server  4.0 (a)

    4.0.993

    August 1996

    Microsoft Exchange Server  4.0 SP1

    4.0.838

    May 1996

    Microsoft Exchange Server  4.0 SP2

    4.0.993

    August 1996

    Microsoft Exchange Server  4.0 SP3

    4.0.994

    November 1996

    Microsoft Exchange Server  4.0 SP4

    4.0.995

    April 1997

    Microsoft Exchange Server  4.0 SP5

    4.0.996

    May 1998

     

     

     

    Microsoft Exchange Server  5.0

    5.0.1457

    March 1997

    Microsoft Exchange Server  5.0 SP1

    5.0.1458

    June 1997

    Microsoft Exchange Server  5.0 SP2

    5.0.1460

    February 1998

     

     

     

    Microsoft Exchange Server  5.5

    5.5.1960

    November 1997

    Microsoft Exchange Server  5.5 SP1

    5.5.2232

    July 1998

    Microsoft Exchange Server  5.5 SP2

    5.5.2448

    December 1998

    Microsoft Exchange Server  5.5 SP3

    5.5.2650

    September 1999

    Microsoft Exchange Server  5.5 SP4

    5.5.2653

    November 2000

     

     

     

    Microsoft Exchange 2000 Server

    6.0.4417

    October 2000

    Microsoft Exchange 2000 Server (a)

    6.0.4417

    January 2001

    Microsoft Exchange 2000 Server SP1

    6.0.4712

    July 2001

    Microsoft Exchange 2000 Server SP2

    6.0.5762

    December 2001

    Microsoft Exchange 2000 Server SP3

    6.0.6249

    August 2002

    Microsoft Exchange 2000 Server post-SP3

    6.0.6487

    September 2003

    Microsoft Exchange 2000 Server post-SP3

    6.0.6556

    April 2004

    Microsoft Exchange 2000 Server post-SP3

    6.0.6603

    August 2004

    Microsoft Exchange 2000 Server post-SP3

    6.0.6620.5

    March 2008   

    Microsoft Exchange 2000 Server post-SP3

    6.0.6620.7

    August 2008

     

     

     

    Microsoft Exchange Server  2003

    6.5.6944

    October 2003

    Microsoft Exchange Server  2003 SP1

    6.5.7226

    May 2004

    Microsoft Exchange Server  2003 SP2

    6.5.7638

    October 2005

    Microsoft Exchange Server  2003 post-SP2

    6.5.7653.33

    March 2008

    Microsoft Exchange Server  2003 post-SP2

    6.5.7654.4

    August 2008  

     

     

     

    Microsoft Exchange Server  2007

    8.0.685.24 or 8.0.685.25

    December 2006

    Microsoft Exchange Server  2007 SP1

    8.1.0240.006

    November 2007

  • Le Café Central de DeVa

    Developer Hub: Download Windows Phone Developer tools SDK 7.1 (Mango) beta & 7.0

    • 2 Comments
      Now you can download the new Windows Phone Developer Tools 7.1 (Mango) Beta can be used to develop Applications for both 7.0 and 7.1 version of Windows Phone OS releases.  You can experiment with the latest tools release for Windows Phone. WPDT 7.1 Beta provides the tooling necessary to target the upcoming Windows Phone OS release (codenamed “Mango”) in addition to productivity enhancements such as an app profiler and an improved emulator.
      Although not required, the Windows Phone Developer Team strongly recommends that you install WPDT 7.1 Beta on a separate machine. Apps built for 7.0 by using the 7.1 beta tools should certify and behave similarly to those produced by your current WPDT environment, but these are beta tools and your apps may behave inconsistently. If you encounter an issue between the beta tools/emulator and production phones, please report the issue on the App Hub 'tools for wp7' forum.
      The Windows Phone Developer Tools includes the following,
      • Microsoft Windows Phone Developer Tools 7.1 (Beta)
      • Windows Phone Emulator (Beta)
      • Silverlight 4 SDK and DRT
      • Microsoft XNA Game Studio 4.0 Refresh Windows Phone Extensions
      • Microsoft Expression Blend SDK Preview for Windows Phone 7.1
      • WCF Data Services Client for Window Phone 7.1
          Please note:
          1) Windows Server, Windows XP & Virtual machine platforms are not supported
          2)  If you are installing Visual Studio 2010 Express for Windows® Phone 7.1 alone, you can install it on any drive. If Visual Studio 2010 Professional or higher is already installed on your development computer, Windows Phone Developer Tools 7.1 Beta is installed on the same drive as the existing Visual Studio installation.
          3) If you just need WP 7.0 SDK, then you can Download the Windows Phone 7.0 SDK (Windows Phone Developer Tools), then download and install the Windows Phone Developer Tools January 2011 Update and the Windows Phone Developer Tools Fix. The January 2011 Update should only be applied after you've installed the Windows Phone Developer Tools.

          Note:
          French, Italian, German, and Spanish versions of the tools are available at the Microsoft Download Center.

                                                                                                                  blogged using my Windows Live Writer 2011…

        • Le Café Central de DeVa

          Get all mailbox information from WMI &amp; C#.Net

          • 0 Comments

          In one scenario, there was a need for me to get all mailbox related information using WMI and C#.Net.

          Here is a code snippet to get all mailbox information from an Exchange Server - WMI & C#.Net.

          using System;
          using System.Management;

          namespace ConsoleTwo
          {
              class Class1
              {


                  [STAThread]
                  static void Main(string[] args)
                  {
                      try
                      {
           
                          System.Management.ConnectionOptions objcon = new System.Management.ConnectionOptions();
                           objcon.Impersonation = ImpersonationLevel.Impersonate;
           
                          // Exchange Server Name
                          string cServername = "Server Name";
           
                          // Create a management scope into Exchange WMI namespace
                          System.Management.ManagementScope exScope =
                              new System.Management.ManagementScope(@"\\" + cServername + @"\root\MicrosoftExchangeV2", objcon);

                          // Create a query to get the data from the Exchange WMI
                          System.Management.ObjectQuery objQry =
                              new System.Management.ObjectQuery("SELECT * FROM Exchange_Mailbox");

                          // Retrieves a collection of management objects based on the query.
                          System.Management.ManagementObjectSearcher objSrch =
                              new System.Management.ManagementObjectSearcher(exScope, objQry);
                          System.Management.ManagementObjectCollection qryCol = objSrch.Get();

                           // Loop each item in the collection
                          foreach (System.Management.ManagementObject mailBox in qryCol)
                          {
                               Console.WriteLine("{0} {1} {2}", mailBox["MailboxDisplayName"].ToString() , mailBox["TotalItems"].ToString() , mailBox["size"].ToString() );
                           }
                       }
                      catch (Exception eVal)
                      {
                          Console.Write(eVal.InnerException + eVal.Message + eVal.Source + eVal.StackTrace );
                      }
                      Console.Read(); 
                  }
              }
              }

        • Le Café Central de DeVa

          Interesting read: Microsoft offerings, OpenSSL & Heartbleed vulnerability

          • 0 Comments

          In recent headlines, the Heartbleed vulnerability in OpenSSL has received a significant amount of attention. While the discovered issue is specific to OpenSSL, many customers are wondering whether this affects Microsoft’s offerings or not. To answer that, I found a similar query posted at Microsoft forum the update – here is the forum post and answer. In addition, you can refer post at Windows Azure blog - http://blogs.msdn.com/b/windowsazure/archive/2014/04/09/information-on-microsoft-azure-and-heartbleed.aspx!!

          Happy reading!!

        • Le Café Central de DeVa

          OOM & VBA : How to delete Outlook recurring Task items (whose status marked as Completed)

          • 2 Comments
          '[VBA & Outlook Object Model : Code snippet to delete Outlook recurring Task items (whose status marked as Completed)]
           
          'Declaration part
          ...
          dim otaskitem as Outlook.Taskitem
          dim ofolder as Outlook.Folder
           
          'Get the Task items
          set ofolder = Application.Session.GetDefaultFolder(olFolderTasks)
          For each item in ofolder.items
          set otaskitem = Item
           
          'Check the status of the specific Taskitem is "Completed" or not
          if otaskitem.Status = olTaskcomplete then
          'Msgbox "Completed Tasks"
          otaskitem.Delete
          else
          'Msgbox "Not Completed Tasks"
          end if
          Next
          ....
        • Le Café Central de DeVa

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

          • 1 Comments

          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

          Note:

          • 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):

          C#

             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);
             3:   
             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);
             6:   

          Visual Basic:

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


          Reference(s):

          http://msdn.microsoft.com/en-us/library/microsoft.office.interop.outlook.namespaceclass.sendandreceive.aspx
          http://msdn.microsoft.com/en-us/library/microsoft.office.interop.outlook.syncobjectevents_event_members.aspx

        • Le Café Central de DeVa

          Exchange Server 2007 & OWA : Password change feature

          • 0 Comments

          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
          http://support.microsoft.com/?kbid=831047

          FIX: You experience various problems when you use the Password Change pages in IIS 6.0
          http://support.microsoft.com/?kbid=833734

          Implementing the Change Password feature with Outlook Web Access
          http://support.microsoft.com/?kbid=297121…”

        • Le Café Central de DeVa

          Coding practices : Outlook automation using VB.Net

          • 0 Comments

          You can try when you do programming with VB.Net and Outlook automation:

          • When you start automation code by declaring object variables with a specific object type that represents the top-level object and then declaring any child objects you want to reference.
            Dim olApp  As Outlook.Application

          • You then create an instance of the top-level object by using the Set statement and the New keyword.
          • Set olApp = New Outlook.Application

          Please note: You need to understand that the New keyword can't be used to create a new instance of a child object.

          • To create an instance of a child object, use the appropriate method of the parent object along with the Set statement.
          • Set MailMessage = olApp.CreateItem(olMailItem)

          • At the end of the procedure, each object variable is destroyed by explicitly setting it equal to the Nothing keyword. If you do this, there is no need to use a Set statement to instantiate the object. However, this technique is not recommended because you have no control over when the object variable is created.
          • In detail, if your code must test to see if an object exists by using a statement such as If olApp Is Nothing Then, this test will return True if you have created an instance of the object in the Dim statement. Additionally, you might not need to use an object except at the user's request.
          • If you create an instance of the object by using New in the Dim statement, the object will be created even if it isn't used. To maintain control over when an object is created, don't use the New keyword in the Dim statement, and instantiate the object by using a Set statement at the point in your code where you must use the object.
        Page 4 of 28 (684 items) «23456»