Reply or forward via OWA gives “An unexpected error occurred and your request couldn’t be handled.”

When you try to reply or forward an e-mail via outlook web app (OWA) in exchange 2010 (in this case small business server 2011 exchange 2010 SP1) you get this error “An unexpected error occurred and your request couldn’t be handled.”

Url: https://remote.domain.com:443/owa/?ae=PreFormAction&a=Reply&t=IPM.Note&id=RgAAAACGrFxHc9ijR44U4ykKtU4LBwAeKagN6lmQSpA1lJbfKp7EAAAALJcxAAAeKagN6lmQSpA1lJbfKp7EAAAcI3ykAAAJ&pspid=_1300011623710_69458484
User host address: ::1
User: User A
EX Address: /o=First Organization/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Recipients/cn=User A
SMTP Address: email@domain.com
OWA version:
Mailbox server: servername.domain.local

Exception type: System.ArgumentException
Exception message: imceaDomain must be a valid domain name.

Call stack

Microsoft.Exchange.Data.Storage.InboundConversionOptions.CheckImceaDomain(String imceaDomain)
Microsoft.Exchange.Data.Storage.InboundConversionOptions..ctor(String imceaDomain)
Microsoft.Exchange.Clients.Owa.Core.Utilities.CreateInboundConversionOptions(UserContext userContext)
Microsoft.Exchange.Clients.Owa.Core.ReplyForwardUtilities.CreateReplyOrReplyAllItem(BodyFormat bodyFormat, Item item, ReplyForwardFlags flags, Boolean replyAll, UserContext userContext, StoreObjectId parentFolderId)
Microsoft.Exchange.Clients.Owa.Core.ReplyForwardUtilities.CreateReplyItem(BodyFormat bodyFormat, Item item, ReplyForwardFlags flags, UserContext userContext, StoreObjectId parentFolderId)
Microsoft.Exchange.Clients.Owa.Premium.Controls.ItemReplyPreFormAction.Execute(OwaContext owaContext, ApplicationElement& applicationElement, String& type, String& state, String& action)
Microsoft.Exchange.Clients.Owa.Core.RequestDispatcher.DoFinalDispatch(OwaContext owaContext)
Microsoft.Exchange.Clients.Owa.Core.RequestDispatcher.InternalDispatchRequest(OwaContext owaContext)
Microsoft.Exchange.Clients.Owa.Core.RequestDispatcher.DispatchRequest(OwaContext owaContext)
Microsoft.Exchange.Clients.Owa.Core.OwaRequestEventInspector.OnPostAuthorizeRequest(Object sender, EventArgs e)
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Solution: The problem was caused with one of the accepted domains, probably a space or other illegal character at the end of the domain name. After reading this article and set the domain name again with the following command in the exchange management shell:

Set-AcceptedDomain -Identity “accepted domain name” -Name “domain.com”

Did this for the last added domain name, because that was when the problem started. After completing this and restarted the server, the problem was solved.

Posted in Blog, Exchange 2010, SBS 2011 at March 13th, 2011. 14 Comments.

Remove http redirect for exchange virtual directories, public, exchange, exadmin and exchweb error

When accidentally set a http redirect for your OWA on your Exchange 2007 / 2010 and SBS 2008 via IIS7 and inherited to all virtual sub directories and then try to remove it for the virtual directories public, exchange, exadmin and exchweb you get an error like this one:

HTTP Redirect:
There was an error while performing this operation.
Filename: \\?BackOfficeStorage\yourdomain.extension\Public Folders\web.config
Error: Cannot write configuration file

Solution: This error is generated because these virtual directories don’t have a physical path.
You can solve this issue by opening a command prompt window. Change directory to Windows\system32\Inetsrv. Then run this command: appcmd set config “/” /section:httpredirect /enabled:false -commit:apphost. Change and for your specific environment.

More information about this topic and setting http redirect for owa can be found here: Simplify the Outlook Web App URL

Posted in Blog, Exchange 2007, Exchange 2010, SBS 2008 at December 21st, 2010. No Comments.

Autodiscover errors after installing a ssl certificate on a Exchange server

When you install a Exchange 2007 or 2010 client access server and using outlook 2007 or 2010. You will get a autodiscover error by default. Also connect with outlook webaccess or web app you get a certificate error.

To solve this problem you will have to import the certificate on all computers. Another way is to buy a trusted third party certificate. In most cases this will be a SAN / UCC certificate so you can use multiple names on the certificate, webmail.domain.name, autodiscover.domain.name, servername.domain.name and for a transition legacy.domain.name.

But after you request and installed the certificate you still get a autodiscover or certificate error.

Possible solution: you will have to change some autodiscover and client access setting, I will describe the wat to check and change the settings with the Exchange management shell. Some settings can also be changed by GUI.

Check the AutoDiscoverServiceInternalUri with the following command: Get-ClientAccessServer |ft Identity,AutoDiscoverServiceInternalUri
To change the setting: Set-ClientAccessServer -Identity “SERVERNAME” -AutoDiscoverServiceInternalUri “https://url.domain.name/autodiscover/autodiscover.xml”

For the next options you can set for both internal and external a different url. But you can choose to use same url for both in that case you will have to setup your internal and external dns right.

Check the AutodiscoverVirtualDirectory Get-AutodiscoverVirtualDirectory |ft internalurl,externalurl
To change the settings:
Set-AutodiscoverVirtualDirectory -Identity ‘SERVERNAME\Autodiscover (Default Web site)’ -ExternalUrl https://externalurl.domain.name/Autodiscover/Autodiscover.xml’
Set-AutodiscoverVirtualDirectory -Identity ‘SERVERNAME\Autodiscover (Default Web site)’ -InternalUrl ‘https://internalurl.domain.name/Autodiscover/Autodiscover.xml’

Check the WebServicesVirtualDirectory InternalUrl and ExternalUrl Get-WebServicesVirtualDirectory |ft internalurl,externalurl
To change the settings:
Set-WebServicesVirtualDirectory -Identity ‘SERVERNAME\EWS (Default Web site)’ -ExternalUrl ‘https://externalurl.domain.name/EWS/Exchange.asmx’
Set-WebServicesVirtualDirectory -Identity ‘SERVERNAME\EWS (Default Web site)’ -InternalUrl ‘https://internalurl.domain.name/EWS/Exchange.asmx’

You will have to do the same thing for all the next option. If you don’t use one of these options you can consider skipping the setting.

Get-OabVirtualDirectory |ft internalurl,externalurl
Set-OabVirtualDirectory -Identity “SERVERNAME\OAB (Default Web site)” -InternalUrl ‘https://internalurl.domain.name/OAB’
Set-OabVirtualDirectory -Identity “SERVERNAME\OAB (Default Web site)” -ExternalUrl ‘https://externalurl.domain.name/OAB’

Get-ActiveSyncVirtualDirectory |ft internalurl,externalurl
Set-ActiveSyncVirtualDirectory -Identity “SERVERNAME\Microsoft-Server-ActiveSync (Default Web Site)” -InternalUrl ‘https://internalurl.domain.name/OAB’
Set-ActiveSyncVirtualDirectory -Identity “SERVERNAME\Microsoft-Server-ActiveSync (Default Web Site)” -ExternalUrl ‘https://externalurl.domain.name/OAB’

Get-OwaVirtualDirectory |ft internalurl,externalurl
Set-OwaVirtualDirectory -Identity “SERVERNAME\owa (Default Web Site)” -InternalUrl ‘https://internalurl.domain.name/OAB’
Set-OwaVirtualDirectory -Identity “SERVERNAME\owa (Default Web Site)” -ExternalUrl ‘https://externalurl.domain.name/OAB’

Get-UMVirtualDirectory |ft internalurl,externalurl
Set-UMVirtualDirectory -Identity “SERVERNAME\UnifiedMessaging (Default Web site)” -InternalUrl ‘https://internalurl.domain.name/UnifiedMessaging/Service.asmx’
Set-UMVirtualDirectory -Identity “SERVERNAME\UnifiedMessaging (Default Web site)” -ExternalUrl ‘https://externalurl.domain.name/UnifiedMessaging/Service.asmx’

Note: when you using SBS 2008 you should replace (Default Web site) by (SBS Web Applications)

Posted in Blog, Exchange 2007, Exchange 2010 at September 3rd, 2010. 3 Comments.

Exchange 2010 blank owa page

After installing a exchange 2010 roll-up you will get a blank browser page when you try to reach your outlook web app (owa) site. When click on the error sign at the bottom of your browser you see a syntax error flogon.js like below.

OWA flogon.fs error

Solution: Start an exchange management shell (powershell) with run as administrator. Then browse to the directory and run the roll-up package like this: ii Exchange2010-KB982639-x64-en.msp. KB982639 stands for exchange 2010 roll-up 4 if you use a other roll-up change the kb number.

Posted in Blog, Exchange 2010 at July 16th, 2010. 1 Comment.

Sharing Buttons by Linksku