Office.js web add-in throws HTTP 401 Unauthorized

One of my dev customer, created Outlook Web add-in (using Office.js/JavaScript) and tried calling EWS call (mailbox.makeEWSRequestAsync method). It throws HTTP error 401 for mailbox.makeEWSRequsetAsync() method. They noticed the error or behaviour when they tested with Outlook on the Web and Outlook Web Access for devices. The API call throws, the following HTTP error: “The…


Gotchas – Microsoft Graph/Outlook REST API throttling, best practices

In recent times, I was working with this customer where they make Graph API calls, Say, GET https://graph.microsoft.com/v1.0/users/YYY@XXX.onmicrosoft.com/mailFolders/inbox/messages?$skip=0&$top=30&$select=bodypreview,categories,conversationid,from,hasattachments,id,isdraft,isread,lastmodifieddatetime,parentfolderid,receiveddatetime,replyto,sender,sentdatetime,subject,torecipients and few other GET (read operations of mail folders/single item handles specifically) and few POST/PATCH calls. They noticed, once the throttling threshold is exceeded, Microsoft Graph limits any further requests from that client for a period of…


Debug: Collecting HTTP/HTTPS traffic using Fiddler Web Debugger tool

As you aware that the Fiddler tool helps you debug web applications by capturing network traffic between the Internet and test computers. The tool enables you to inspect incoming and outgoing data to monitor and modify requests and responses before the browser receives them. So this post provides the steps for capturing HTTP/HTTPS traffic with…


Office Developer: Request from Office for Apps going to ajax.aspnetcdn.com getting a 502 error?

In recent times, i was working with this customer where they created an Outlook add-in (Office for Apps/Office.js). They noticed that a request from Office for Apps going to ajax.aspnetcdn.com getting HTTP 502 error. During debugging (network sniffs) we noticed that issue happens that the URLs were blocked by their AV, Proxy Server settings. On…


Why using Custom Outlook forms and HTTP scenarios not recommended?

In Outlook, custom Outlook forms are not supported for use with HTTP-based mail services (such as Microsoft Hotmail). Outlook does not prevent you from using custom form features if you are using an HTTP-based mail service. However, some features do not work correctly. The features do not work correctly because HTTP-based mail messages are stored…


While try to log into an Exchange 2003 mailbox by using WebDAV program, you receive a 401 status code in IE

When the user tried to access a Microsoft Exchange Server 2003 mailbox by using a program that uses Web Distributed Authoring and Versioning (WebDAV), Internet Explorer throws 401 HTTP status code. During investigation we found that we may not be able to access the mailbox. Also we notice that the mailbox has never received an…


Troubleshooting: IIS/Exchange logs and WebDAV functions

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,…


System.Net.Mail: Mail sent via Network delivery throws exception “Command not implemented/supported”

One of the customer reported that whenever he tries to send e-mail by using System.Net.Mail API they get the following error “System.Net.Mail.SmtpException error message: Command not implemented. The server response was: Command not Supported” I had a look at the application. They built a Microsoft Visual Studio 2005 based application and tried to send e-mail…

2

Troubleshooting : EWS request throws “The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel” ?

One of my customer updated that whenever they try to make the remote Exchange Web Service (EWS) call from his C#.Net 2008 application (VS.Net 2008 – .Net Framework 3.x), he gets the following error: The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel I had a detailed look at…

3

Behavior changes in Outlook : MAPI & Custom properties

Per the knowledgebase the implementation of MAPI in Outlook has been changed to control how custom properties can be created. To guarantee consistent use of custom properties, custom properties must already be used in the organization or on the Outlook client. As soon as custom properties are being used or are registered, the custom properties…

1

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;…

1

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…


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…

3