Author: --Anand--

I am located at Silicon Valley working as IT Infrastructure Architect.

“Network Stored PST files … don’t do it!”: Whoa! I didn’t know that


Advertisements

Exchange RPC/HTTP aka Outlook Anywhere Troubleshooting


Outlook Anywhere (RPC/HTTP in Exchange 2003) is very useful and secured feature in Exchange. It requires careful planning and understanding. Outlook 2003/2007 may have trouble connecting with Exchange server via RPC/HTTP for many reasons.

I am assuming you already have the infrastructure ready. Let first understand what’s the Outlook setup looks like and what it means.

image

On fast networks: connect using HTTP first, then connect using TCP/IP

If Outlook detects a fast connection, that is >128,
        Try the FIRST attempt using TCP/IP (usual RPC session) to Exchange Mailbox server
        Then fail over to HTTP (RPC over HTTP) to the RPC Proxy server on further attempts

The fast connection by default is >128, set at the Network Card configuration. I am not sure how to change this value. I am sure it can be changed in Registry.

On slow networks, connect using HTTP first, then connect using TCP/IP

If Outlook detects a slow connection, that is <=128,
         Try the first attempt using HTTP to the RPC proxy server
         Then fail over to TCP/IP to Exchange mailbox server on further attempts

Now the troubleshooting the issues.

Outlook is not connecting to the Exchange server. (Connection Errors, "Disconnected" status)

Outlook Anywhere (RPC/HTTP) requires reliable Internet connectivity. If the computer has spotty wireless connection or busy Internet connection, Outlook will not connect. 

Solution: Make sure you have good wireless reception and check you can browse Internet. Try your Outlook Web Access in your browser. Are using "Use automatic configuration script" setting in Control Panel –> Internet Options –> Connections –> LAN Settings? You need uncheck this when you are out of office. Outlook caches proxy setting which causes when you are using Outlook from Home, Hotel, etc.,

Outlook may switched to TCP/IP connection mode and trying to connect to the Exchange server using RPC connection. (Pop ups "Outlook is trying to connect…")

To find this issue, Press and Hold Control button on your Keyboard, click on Outlook Icon on Notification area in your task bar, select "Connection Status". The connection column will show HTTPS (for HTTP connection) or TCP.

This is probably the HTTPS URL is not reachable for some reason. So Outlook tried HTTP on first attempt (setting: On slow networks, connect using HTTP first, then connect using TCP/IP), failed over to TCP/IP connection.

Solution: On Outlook Window, Click File –> Work Offline.  Your Outlook goes into Offline mode. Click File –> Work Office again to turn off the Offline mode. See your Outlook connects to the Exchange or not.  Rebooting your laptop works most of the time.

Laptop wakes up from sleep mode at Home or Hotel and Outlook is not connecting to Exchange server (Pop ups "Outlook is trying to connect…" and goes to Disconnected mode)

Solution: If you are sure your Internet connection fine and you can get to Outlook Web Access page using the same HTTPS URL, try closing the Outlook and reopen it.

If closing and opening Outlook doesn’t work, ONLY solution is reboot your laptop. It works most of the time. I believe some RPC connection/session is hung when you were working at Office and it won’t go away till your reboot. (Log off/Log back in does not clear hung RPC sessions)

Outlook goes into Disconnected Mode after being connected (Pop ups for few minutes and goes into Disconnected mode continuously)

This is tricky. Outlook connected via RPC/HTTP and gets some updates (new mails, read mail count, etc.,), then suddenly Outlook pop ups appear (Outlook is trying to connect to Exchange server..). Outlook goes into disconnected mode and tries to connect again. After a while,  Outlook is on Disconnected mode permanently for a while.

Solution: There is a "Back Off" algorithm in Outlook which stops connecting to Exchange server after frequent attempts for 5 minutes. Outlook will start trying connect to Exchange again in 15 minutes.  You can’t wait 15 minutes, Huh! 🙂  Try this,

Outlook: File –> Connect to Exchange

OR

Go to Outlook Offline mode (File –> Work Offline) and switch to Online mode (File –> Work Offline).

Laptop is restored from Backup after corruption, Outlook never connects to Exchange while user can see the mailbox in OWA

Check the following registry keys, set it if it is not looks like below,

[HKEY_LOCAL_MACHINESOFTWAREMicrosoftRpcClientProtocols]
"ncacn_np"="rpcrt4.dll"
"ncacn_ip_tcp"="rpcrt4.dll"
"ncadg_ip_udp"="rpcrt4.dll"
"ncacn_http"="rpcrt4.dll"

While in RPC/HTTP connection, Outlook Address book search fails but works in second or third attempts

For some reason, Outlook doesn’t have a good connection to the Exchange servers.

Solution: Wait for few minutes see the problem goes away (temporary connectivity issues, Exchange server is too busy, etc.,). Try closing your Outlook, wait for minute and reopen the Outlook.

If nothing else works, call your IT guys. Before you start bugging the IT guys, I would recommend to call your co-workers to see their Outlook is working in HTTP mode or not.  😉

Exchange ActiveSync and issues with “Attachment download” (with solution)


There was a frustrated voice came from other side of the world "Taiwan", said "I can’t download attachments on my Windows Mobile device, why are you guys blocking the attachments? This is very frustrating. what’s the point having a device that handles whole office documents? It’s not only me, all of my co-workers have same issue."

So there I am, blinking. I confirmed him that we don’t block attachments in Exchange ActiveSync, by the way I am using it all the time means I am downloading Office documents on my mobile. I did a short test and I could download any attachment from Mail.  But he can’t download any attachment from any Exchange mail. But he can download attachments from Google mail setup in Pocket Outlook.

Let’s begin the troubleshooting process.

Our setup is like below,

image 

Now any USA user have no issues downloading attachments. But our foreign users complaining they can’t download attachments in any Windows Mobile devices.  I suspected some kind of "language" issue here. I am sure our Taiwanese users using Chinese language in mails.  I asked the user to turn on the ActiveSync logging (ActiveSync program on the device: Open Menu–>Options–>Exchange Server–>Settings–>Advanced Settings–>Event logging set to "Verbose") and send me the logs (in Device WindowsActiveSync*.*). He did send me the logs. 

ActiveSync on his device is getting "Attention Required" and clicking it displays "One or more of your attachments failed to download. To try downloading this attachment again, mark the…."

Attachment Error1

 

 

 

 

 

 

 

 

 

 

 

ActiveSync Log file on the device (MicrosoftExchange1.txt) says,

=-=-=-= Server Response =-=-=-
HTTP/1.1 500 ( The request was rejected by the HTTP filter. Contact your ISA Server administrator.  )
Connection: close
Pragma: no-cache
Cache-Control: no-cache
Content-Type: text/html
Content-Length: 2022

I checked the ISA server logs and found this,

Denied Connection CORPISA 9/13/2007 2:53:31 AM
Log type: Web Proxy (Reverse)
Status: 12217 The request was rejected by the HTTP filter. Contact your ISA Server administrator. 
Rule: RPC-OMA-ActiveSync Publishing
Source: Internal ( 124.29.164.85:0)
Destination: – ( 157.165.5.58:443)
Request: POST https://xxxx.xxxxx.com:443/Microsoft-Server-ActiveSync?User=xxxxx&DeviceId=B04745019142C9573D211524CA29C08D&DeviceType=SmartPhone&Cmd=GetAttachment&AttachmentName=%E6%94%B6%E4%BB%B6%E5%8C%A3/RE:%20RE:%20Helpful%20document%20for%20new%20users%20to%20the%20IDTAPAC%20domain-2.EML/Test.xls
Filter information: Req ID: 08f16710; Blocked: URL contains high-bit characters
Protocol: https
User: anonymous
Additional information
Client agent: MSFT-SPhone/5.2.203
Object source: Processing time: 1
Cache info: 0x8 MIME type: –

Blocked: URL contains high-bit characters!!!! Blocked???? What? High-bit characters?? What’s that?

Little bit of research I found when using OWA/ActiveSync (or even SharePoint pages), URL may contain double-byte character set (DBCS) or Latin-1 type. It happens to the user is using different language other than English. YES, Obviously my user is using Chinese character set in his Outlook and mails (even attachment names) has Chinese characters. Make sense.

Solution:

  1. Open your ISA server console
  2. Click Firewall Policy on the left pane
  3. Right click on the firewall rule that serves "ActiveSync" and select "Configure HTTP"
  4. Uncheck "Block high bit characters" (see screen shot below) and click OK to close the dialog
  5. Click Apply the new settings take effect
  6. Say "Voila" and Dance.

image

I found later the closest MSKB article for the same issue: You receive a "The request was rejected by the HTTP Security filter" error message when you try to open a message from an Exchange Server that is published in ISA Server

Search words: ActiveSync, Attachment, high bit character, Windows Mobile

Exchange 2007 Visio stencil and shapes


I was planning for Exchange 2007 migration and site consolidation for my company. I found very useful Visio stencil just for Exchange 2007 related shapes like "Client Access Server", "Hub Transfer Server", "VoIP Gateway", etc., shapes. It’s free from Microsoft and can be downloaded HERE.

Sample shapes:

Distributing proxy.pac file using IIS 6 (Windows 2003)


One fine busy day, a fellow system administrator called for help on distributing "proxy.pac" file using Windows 2003 IIS server. She says it used to work in Windows 2000 server based web server, but not with Windows 2003.  After 3 system administrators spend a little precious time, we found out this following MSKB 326965 article.

IIS 6.0 does not serve unknown MIME types

What do we know!! IIS 6 is locked down for serving unknown file types by default. Earlier versions of IIS, all MIME types (*) are allowed by default. Good for us as long as we know how to override when needed.

Keywords: IIS 6, Windows 2003, 404, file not found, cannot download file,"HTTP Error 404 – File or directory not found."

Simple Web Site Monitoring Script – written for Outlook Web Access server monitoring


I wanted to monitor our Exchange Front-End server and OWA URL at ISA server (in DMZ). There are tons of tools/scripts available to monitor web sites. But, I usually create a script by myself to fit my own needs.

This script is really really simple and gets the job done. Once it called with a web site URL, it will check the availability. If the web site is not reachable, it will send emails to specified administrators. Hope somebody make use of this simple script.

1. Copy and Paste the following script in Notepad. Save this script as "WebSiteMon.vbs" (type with quotes in File->Save dialog)
2. Search for "<<<<<" in this script and change the values like SMTP server name, Mail TO addresses
3. Create Batch file (somename.bat) and call this script by CScript WebSiteMon.vbs http://owa.xyz.com from the batch file.
4. Schedule to run this batch file every 15 minutes
5. Any Questions…leave a reply for this blog.

‘===============================================================
‘ Name: WebSiteMon.vbs
‘ Purpose:Checks availability of the given server and sends email
‘ if the server is not reachable.
‘ Paramenters: website URL (e.g., http://www.yahoo.com)
‘ Written By: Anand Venkatachalapathy
‘ Written Date: Aug 17th 2007
‘===============================================================
Dim MonitoredSite
Dim objWinHttp, strHTMResponse, strHTMStatus
Dim sTo, sSub, sBody

‘Get the Web Site URL from Arguments array
MonitoredSite = WScript.Arguments(0)

‘Open Windows HTTP Request object
Set objWinHttp = CreateObject("WinHttp.WinHttpRequest.5.1")

‘On Error is set to Resume Next. This is important.
On Error Resume Next

‘Open (get) the website
objWinHttp.Open "GET", MonitoredSite
objWinHttp.Send
objWinHttp.WaitforResponse(10000)

‘Get the website page data
strHTMResponse = objWinHttp.ResponseText
strHTMStatus = objwinHttp.status

‘If Error is generated, website is not available
If Err.Number <> 0 Then
    sTo = "JohnDoe@xyz.com;JoeAverage@xyz.com" ‘<<<<< Change E-Mail Addresses
    sSub = MonitoredSite & " is NOT available"
    sBody = MonitoredSite & " is NOT available. This web site may be down. " & vbCrLf & vbCrLf & _
            "This alert mails will be send again in 15 minutes if the web site is not available."
    Alert_Admins sTo,sSub,sBody
    WScript.Echo MonitoredSite & " is not reachable and may be down"
End If

‘Memory wipe the objWinHttp
Set objWinHttp = Nothing

‘*-*-*-* End Of Script *-*-*-*

‘===============================================================
‘ Name:      Alert_Admins
‘ Purpose:   Send email using SMTP server.
‘ Input:     strTo – Who to send to, strSub – Subject of the message
‘             strBody – Body of the message
‘ Output:    Sends the emails to the strTO recipients
‘===============================================================
Sub Alert_Admins( strTo,strSub,strBody)

    ‘* iMsg – holds CDO.Message object
    ‘* Flds – Enumeration for CDO SMTP object properties
    ‘* iConf – holds CDO.Configuration
    Dim iMsg, Flds, iConf

    ‘* sSMTPServerName – SMTP Server Name
    Dim sSMTpServerName

    ‘* Assign your SMTP server here
    sSMTPServerName = "SMTPServer.xyz.com"   ‘<<<<< Change the SMTP server name

    ‘* Assign cdoSendUsingPort is set to 2, i.e., send using SMTP (25) port
    Const cdoSendUsingPort = 2

    ‘* Create CDO Objects and assign to variables
    Set iMsg = CreateObject("CDO.Message")
    Set iConf = CreateObject("CDO.Configuration")
    Set Flds = iConf.Fields

    ‘* Assign values to Flds class properties

    With Flds
        .Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = cdoSendUsingPort
        .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = sSMTPServerName
        .Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 25 
        .Update
    End With

    ‘* Assign message properties and Send the mail
    With iMsg
        Set .Configuration = iConf
        .Fields("urn:schemas:httpmail:importance").Value = 2    ‘Setting Mail importance to High (2)
        .Fields.Update
        .To = strTo
        .From = "SystemAdministrator@xyz.com"               ‘Fake, but make-sense email FROM address
        .Sender = "Administrator@xyz.com"            ‘Return Email address
        .Subject = strSub
        .TextBody = strBody
    .Send
    End With

End Sub

Solution: Windows cannot access the specified device, path, or file. You may not have the appropriate permissions to access the item.


In Windows 2003 SP1, this may be annoying sometimes if you don’t know what’s really happening. 

Problem: I have started building a Windows 2003 server (SP1) in the lab. I already have downloaded few Microsoft Exchange Patch files from Internet on our file share. I copied one of those Exchange 2003 patch setup file to my new server and try to run. Boom…I got an popup saying,

Error

Solution: It turn out to be Microsoft is blocking files copied from other computers. That’s not the popup saying to us :-0 !!!!. Open the properties of the copied file (right click –> Properties). I found this,

Solution

The picture speaks itself. I don’t have to explain it.