?
Solved

Exchange 2007 SP1, Windows 2003 R2 X64, SP2 - OWA, IIS.

Posted on 2010-01-10
42
Medium Priority
?
1,817 Views
Last Modified: 2012-05-08
Hello All -

I have a craszy issue that i just cannot nail. here is the deal: I have 2 exchange servers (exchange1 and exchange2) 2 DC's with DNS (SRV4, SRV3). IIS and OWA are installed and configured (owa itself is working for Exchange2 and Exchange1).

However here is the issue: Whenever i browse to the server exchange1/owa (so https://exchange1/owa) it redirects me to the clients old external fqdn name. Instead of going to itself https://exchange1/owa (and landing there) using firefox i see that it says connecting to http://former.fqdn.com.

I do not get this problem on the other server. I have checked dns records, cached dns records, host files, outlook web services, ews, active sync etc. and no where can i find the fqdn.... http://former.fqdn.com.

This is a very critical issue....

Please advise...

Thanks,

Robert
0
Comment
Question by:castellansolutions
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 20
  • 19
  • 2
42 Comments
 
LVL 9

Expert Comment

by:tl121000
ID: 26279033
What is the domain external MX record pointing to?
0
 
LVL 16

Expert Comment

by:Raheem05
ID: 26279060
Do you have your external domain name published in DNS? i.e. company.com? Can you tell us what DNS zones are listed in DNS?

Where is your CAS server sitting inside your private network or in your DMZ? Do you have ISA?

How is your firewall rule setup? In specific for https port 443??

Sorry need the above information to help
0
 
LVL 9

Expert Comment

by:tl121000
ID: 26279093
Check extrenal DNS records...
A record - poiting to public IP address of Exchange Server(s)
MX record - poiting to public Ip address of Exchanger Server(s)
Fiewall -
Make sure internal ips are natd to public address
ports 443 of internal mail IP
port 25 of internal mail IP
0
Office 365 Training for IT Pros

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

 
LVL 6

Author Comment

by:castellansolutions
ID: 26279106
External mail record did point to this ip (however) that record is not being used. what i dont understand is why the server inside the network is redirecting to an outside i address?

there is no isa
the cas server is seitting inside the network and is not dmz'd
the firewall is setup to allow 443 into this server.

0
 
LVL 16

Expert Comment

by:Raheem05
ID: 26279111
ok so if you do a nslookup internally to your exchange servers what does it resolve as? The correct private IP of the exchange server?
0
 
LVL 16

Expert Comment

by:Raheem05
ID: 26279117
if you could also do https://exchangeserver / http://exchangeserver

Do you get the default IIS splash screen?

0
 
LVL 6

Author Comment

by:castellansolutions
ID: 26279120
Yes, iis works correctly. its jsut the stupid owa folder.
0
 
LVL 6

Author Comment

by:castellansolutions
ID: 26279127
basically the best way of describing it is this: when you hit the owa folder it redirects you to "the fqdn.com" but when you use exchange or autodiscover or exadmin it works just fine.
0
 
LVL 16

Expert Comment

by:Raheem05
ID: 26279144
OK could you do the following as a test please I would like you to redirect the default IIS splash screen to the owa directory

so after you have implemented the above you can then do the following: https://exchangeserver and it should automatically redirect to https://exchangeserver/owa

   1. Start the Microsoft Management Console (MMC) IIS snap-in.
   2. Right-click Default Web Site, click Properties, and then click the Home Directory tab.
   3. Under When connecting to this resource, the content should come from, click A redirection to a URL.
   4. In the Redirect to box, type /owa
   5. Under The client will be sent to, click A directory below this one.
   6. Stop and start the Default Web Site.

Does this resolve correctly?
0
 
LVL 16

Expert Comment

by:Raheem05
ID: 26279153
Also make sure you do not apply the /owa to all directories so once you click apply click cancel and then cancel otherwise it will redirect all virtual directories to /owa which we dont want we just want the default splash screen to redirect
0
 
LVL 6

Author Comment

by:castellansolutions
ID: 26279201
I did what you asked and the same issues still occurs. i even restarted the iis service*
0
 
LVL 16

Expert Comment

by:Raheem05
ID: 26279209
so this happens even if you attempt to do https://ip / https://hostname correct?
0
 
LVL 6

Author Comment

by:castellansolutions
ID: 26279219
yes with ip and hostname same result...
0
 
LVL 16

Expert Comment

by:Raheem05
ID: 26279225
Do you have any pages setup inside the /owa virtual directory to perform redirection?
0
 
LVL 16

Expert Comment

by:Raheem05
ID: 26279228
any chance you could post some screen shots of the /owa virtual directory contents and properties?
0
 
LVL 6

Author Comment

by:castellansolutions
ID: 26279231
no... but what if i coped the owa virtual directory from the other server??? (i have already removed and recreated the default virtual directories)
0
 
LVL 16

Expert Comment

by:Raheem05
ID: 26279249
No do not do this....ok open the exchange management shell and go to server config - client access and right click the owa directory on the general tab what is the internals and external URL set to?

Could you also do the following in exchange management shell:

Get-OwaVirtualDirectory

And post the output on here please
0
 
LVL 6

Author Comment

by:castellansolutions
ID: 26279318
yes i can do that....here is the screen shot...i copied the files from the other server into this directory and still i get the same issue...




owa-issues-custom.JPG
0
 
LVL 6

Author Comment

by:castellansolutions
ID: 26279330
i will put back the original files...
0
 
LVL 16

Expert Comment

by:Raheem05
ID: 26279333
Ok have you tried the steps in my last post?

And in the owa directory above on the server that is not resolving could you open casredirect.aspx and redir.aspx and post the contents here please
0
 
LVL 6

Author Comment

by:castellansolutions
ID: 26279365
casredirect:



<%@ Page language="c#" AutoEventWireup="false" Inherits="Microsoft.Exchange.Clients.Owa.Core.CasRedirect" %>
<%@ Import namespace="Microsoft.Exchange.Clients"%>
<%@ Import namespace="Microsoft.Exchange.Clients.Owa.Core"%>
<%@ Import namespace="Microsoft.Exchange.Clients.Owa.Premium"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; CHARSET=utf-8">
<title><%=UrlTitle%></title>
<link type="text/css" rel="stylesheet" href="<%ThemeManager.RenderBaseThemeFileUrl(Response.Output, ThemeFileId.LogonCss);%>">
<link type="text/css" rel="stylesheet" href="<%=OwaUrl.ApplicationRoot.ImplicitUrl%>8.1.291.1/themes/base/<%= Utilities.GetDefaultCultureFontCssFileUrl(OwaContext) %>">
<script language="javascript">

<% if (RenderAddToFavoritesButton) { %>
      function clkAddToFav()
      {
            window.external.AddFavorite(
                  "<%Utilities.JavascriptEncode(RedirectionUrl, Response.Output);%>",
                  "<%Utilities.JavascriptEncode(UrlTitle, Response.Output);%>");
      }
<% } %>
</script>
</head>
<body class="owaLgnBdy<%=IsRtl ? " rtl" : ""%>">
<%ThemeManager.RenderClientBaseThemeFileList(Response.Output);%>
<table align="center" id="tblMain" cellpadding=0 cellspacing=0>
      <tr>
            <td colspan=3>
                  <table cellspacing=0 cellpadding=0 class="tblLgn">
                  <tr>
                        <td class="lgnTL"><img src="/owa/<%ThemeManager.RenderBaseThemeFileUrl(Response.Output, ThemeFileId.LogonTopLeft);%>"></td>
                        <td class="lgnTM"></td>
                        <td class="lgnTR"><img src="/owa/<%ThemeManager.RenderBaseThemeFileUrl(Response.Output, ThemeFileId.LogonTopRight);%>"></td>
                  </tr>
                  </table>
            </td>
      </tr>
      <tr>
            <td id="mdLft">&nbsp;</td>
            <td id="mdMid">
                  <table class="mid">
                        <tr><td><hr></td></tr>
                        <tr><td><%=LocalizedStrings.GetHtmlEncoded(Strings.IDs.CasRedirectMessage)%></td></tr>
                        <tr>
                              <td id="tdLng">
                              <a href="<%Utilities.HtmlEncode(RedirectionUrl, Response.Output);%>"><%Utilities.HtmlEncode(RedirectionUrl, Response.Output);%></a>
                              </td>
                        </tr>
                        <% if (RenderAddToFavoritesButton) { %>
                        <tr>
                              <td align="right" class="txtpad">
                              <% if (!IsDownLevelClient) { %>
                                    <input type="button" class="btn" style="float: right" value="<%=LocalizedStrings.GetHtmlEncoded(Strings.IDs.AddToFavorites)%>" onclick="clkAddToFav()"
                                    onmouseover="this.className='btnOnMseOvr'" onmouseout="this.className='btn'" onmousedown="this.className='btnOnMseDwn'">
                              <% } %>
                              <% else { %>
                                    <input type="button" class="btn" style="float: right" value="<%=LocalizedStrings.GetHtmlEncoded(Strings.IDs.AddToFavorites)%>" onclick="clkAddToFav()">
                              <% } %>
                              </td>
                        </tr>
                        <% } %>
                  </table>
                  <table class="mid tblConn">
                        <tr>
                              <td rowspan=2 align="right" class="tdConnImg"><img style="vertical-align:top" src="<%=OwaUrl.ApplicationRoot.ImplicitUrl%><%ThemeManager.RenderBaseThemeFileUrl(Response.Output, ThemeFileId.LogonExchangeLogo);%>"></td>
                              <td class="tdConn"><%=LocalizedStrings.GetHtmlEncoded(Strings.IDs.ConnectedToExchange)%></td>
                        </tr>
                        <tr>
                              <td class="tdCopy"><%=String.Format(LocalizedStrings.GetHtmlEncoded(Strings.IDs.LogonCopyright), "&copy;")%></td>
                        </tr>
                  </table>
            </td>            
            <td id="mdRt">&nbsp;</td>
      </tr>
      <tr>
            <td colspan=3>
                  <table cellspacing=0 cellpadding=0 class="tblLgn">
                  <tr>
                        <td class="lgnBL"><img src="/owa/<%ThemeManager.RenderBaseThemeFileUrl(Response.Output, ThemeFileId.LogonBottomLeft);%>"></td>
                        <td class="lgnBM"></td>
                        <td class="lgnBR"><img src="/owa/<%ThemeManager.RenderBaseThemeFileUrl(Response.Output, ThemeFileId.LogonBottomRight);%>"></td>
                  </tr>
                  </table>
            </td>
      </tr>
</table>
</body>
</html>
0
 
LVL 6

Author Comment

by:castellansolutions
ID: 26279374
<%@ Page language="c#" Codebehind="Redir.aspx.cs" AutoEventWireup="false" Inherits="Microsoft.Exchange.Clients.Owa.Core.Redir" %>
<%@ Import Namespace="Microsoft.Exchange.Clients" %>
<%@ Import Namespace="Microsoft.Exchange.Clients.Owa.Core" %>
<%@ Import Namespace="Microsoft.Exchange.Clients.Owa.Premium" %>
<%@ Import Namespace="Microsoft.Exchange.Clients.Owa.Premium.Controls" %>
<html dir="<%=UserContext.IsRtl ? "rtl" : "ltr"%>">
<head>
<meta http-equiv="Content-Type" content="text/html; CHARSET=utf-8">
<% if (!UserContext.IsBasicExperience) { %>
      <script language="javascript" src="8.1.291.1/scripts/premium/uglobal.js"></script>
<% } %>
<% if ((ShowExternalLinkDialog) || (ShowInvalidCanaryWarning)) {
      Utilities.RenderClientStrings(Response.Output);
%>
      <link type="text/css" rel="stylesheet" href="<%UserContext.RenderThemeFileUrl(Response.Output, ThemeFileId.PremiumCss);%>">
      <link type="text/css" rel="stylesheet" href="<%UserContext.RenderCssFontThemeFileUrl(Response.Output, ThemeFileId.PremiumCss);%>">
<% } %>
<script language="javascript">
      var a_sURL = "<% Utilities.JavascriptEncode(SafeUrl, Response.Output); %>";
      <% if (ShowInvalidCanaryWarning) {
            RenderingUtilities.RenderStringVariable(Response.Output, "L_CanWrnTl", Strings.IDs.NoCanaryWarningTitle);
            RenderingUtilities.RenderStringVariable(Response.Output, "L_CanWrnTx", String.Format(LocalizedStrings.GetNonEncoded(Strings.IDs.NoCanaryWarningText), SafeUrl));
      }%>
      
      <% if (ShowExternalLinkDialog) {
            RenderingUtilities.RenderStringVariable(Response.Output, "L_ExLnk",
                  LocalizedStrings.GetHtmlEncoded(Strings.IDs.RedirLeaveOwa) + "<br>" + LocalizedStrings.GetHtmlEncoded(Strings.IDs.RedirExternalLinkDialog));
            RenderingUtilities.RenderStringVariable(Response.Output, "L_ExLnkHd", Strings.IDs.RedirExternalLinkDialogHeader);
            RenderingUtilities.RenderStringVariable(Response.Output, "L_DntShw", Strings.IDs.DoNotShowDialog);
      %>
      
      
            var g_iTO = null;
            var g_oDlg = null;
            
            function ldExLnk()
            {
                  g_iTO = setTimeout("nvUrl('1')", 10000);
                  
                  var g_oDlg = shwPont(
                        <%=(int)PontType.ExternalLink %>,
                        L_ExLnk,
                        L_ExLnkHd,
                        new Array(L_OK),
                        BDI_INF,
                        nvUrl);
            }
            
            function nvUrl(iTO)
            {
                  // iTO is present only if there is a timeout of 10 seconds. If user clicked OK or close of dialog, iTO is not there.
                  //
                  if (g_iTO)
                        clearTimeout(g_iTO);

                  if (g_oDlg && iTO)
                        g_oDlg.dlgDisp();
                        
                  ldLnk();
            }

            
      <%   // End of External Link Dialog
      } %>
      
      function ldLnk()
      {
            <% if (!UserContext.IsBasicExperience && (NewMailCreated || OpenWebReadyForm)) { %>
                  try
                  {
                        window.resizeTo(700, 600);
                  }
                  catch(e){}
            <% } %>
                  
                  try
                  {
<%
                   // FIX BUG: E12SP1 112517
                  // We should append the mimectl verstion part at the end of url if smime is installed on client
                  //
                  if (NewMailCreated && !UserContext.IsBasicExperience) { %>
                        window.location.href = a_sURL + gtMmPar();
<%                   } else { %>
                        window.location.href = a_sURL;
<%                   } %>
                  }
                  catch(e){}
      }
      
      function initLd()
      {
            <% if (ShowInvalidCanaryWarning)
            {
                  if (!UserContext.IsBasicExperience)
                  {%>
                        var o = new BtnDlg("divCanWrn", L_CanWrnTx, L_CanWrnTl, new Array(L_Yes, L_No), 390, BDI_WRN, clDlg, null, 0, 0);
                        o.show();
                  <%} else {%>
                        var i=1;
                        
                        if (confirm(L_CanWrnTx))
                              var i = 0;
                              
                        clDlg(i);
                  <%}%>
            <%}else{%>
                  <% if (ShowExternalLinkDialog) { %>
                        ldExLnk();
                  <% } else {%>
                        ldLnk();
                  <%}
            }%>
      }
            
      function clDlg(i)
      {
            if (i == 0)
            <% if (ShowExternalLinkDialog) { %>
                  ldExLnk();
            <% } else {%>
                  ldLnk();
            <% } %>
            else      
                  setTimeout("window.close();", 1);
      }
      
</script>
</head>
<body onload="initLd()">
<%if ((ShowExternalLinkDialog) || (ShowInvalidCanaryWarning))
{
      ThemeManager.RenderClientThemeFileList(Response.Output, UserContext);
}%>
</body>
</html>
0
 
LVL 6

Author Comment

by:castellansolutions
ID: 26279384
i am not comfortable posting the output of the Get-OwaVirtualDirectory ... What are you looking for in there?
0
 
LVL 16

Expert Comment

by:Raheem05
ID: 26279396
Ok I am looking for server what is listed in this section is it the correct server?

Also what is the external and internal URL's set to above?
0
 
LVL 16

Expert Comment

by:Raheem05
ID: 26279400
The aspx files look fine
0
 
LVL 16

Expert Comment

by:Raheem05
ID: 26279408
How is your network setup? i.e. do you use cisco? do you use VLANS? if so are both on the same vlan? if not using VLANS are both these servers on the same subnet? You dont use cisco routers do you? have you set natting up on these?
0
 
LVL 6

Author Comment

by:castellansolutions
ID: 26279417
there is not cisco anywhere here... no vlans... 1 sonicwall and thats doing natting for the ext >> int ips. pretty basic... also i cannot find mention of anything other than exchange1 or exchange2 in the output of the requested command.

0
 
LVL 16

Expert Comment

by:Raheem05
ID: 26279433
Ok back to my DNS question above which zones have you setup for dns? private only or public too?
0
 
LVL 6

Author Comment

by:castellansolutions
ID: 26279465
I have 4 dns zones...

1. is the_msdsc.local
2. is the .local domain name for ad
3. is an fqdn for a different fqdn site
4. is another different fqdn for a different fqdn site.

None of the above zones have anything to do with where this server is redirecting...


0
 
LVL 16

Expert Comment

by:Raheem05
ID: 26279469
Ok and finally what are the internal and externals URLS set to as my question above?
0
 
LVL 6

Author Comment

by:castellansolutions
ID: 26279470
they are set to the correct respiective server names and the correct external dns name.
0
 
LVL 6

Author Comment

by:castellansolutions
ID: 26279477
i reset the this morning... when i started to try and fix this.
0
 
LVL 16

Expert Comment

by:Raheem05
ID: 26279485
Yikes dude I am out of ideas here Can you look at the IIS logs on the server causing you problems and see if you can see anything out of the ordinary? Surely if this is resolving to an external FQDN then it will be hitting your firewall can you see where the request is coming from via monitoring the traffic on the firewall?
0
 
LVL 6

Author Comment

by:castellansolutions
ID: 26279504
here is the log file entries...

2010-01-10 18:59:00 W3SVC1 192.168.0.252 GET /owa/auth/logon.aspx url=https://mail.baddomain.com/owa/&reason=0 443 - 192.168.0.252 Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+5.2;+WOW64;+.NET+CLR+2.0.50727;+.NET+CLR+3.0.04506.30;+.NET+CLR+3.0.04506.648) 200 0 0
2010-01-10 18:59:00 W3SVC1 192.168.0.252 GET /owa/8.1.291.1/themes/base/logon.css - 443 - 192.168.0.252 Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+5.2;+WOW64;+.NET+CLR+2.0.50727;+.NET+CLR+3.0.04506.30;+.NET+CLR+3.0.04506.648) 200 0 0
2010-01-10 18:59:00 W3SVC1 192.168.0.252 GET /owa/8.1.291.1/themes/base/owafont.css - 443 - 192.168.0.252 Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+5.2;+WOW64;+.NET+CLR+2.0.50727;+.NET+CLR+3.0.04506.30;+.NET+CLR+3.0.04506.648) 200 0 0
2010-01-10 18:59:00 W3SVC1 192.168.0.252 GET /owa/8.1.291.1/scripts/premium/flogon.js - 443 - 192.168.0.252 Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+5.2;+WOW64;+.NET+CLR+2.0.50727;+.NET+CLR+3.0.04506.30;+.NET+CLR+3.0.04506.648) 200 0 0
2010-01-10 18:59:00 W3SVC1 192.168.0.252 GET /owa/auth/logon.aspx replaceCurrent=1&url=https%3a%2f%2fmail.baddomain.com%2fowa%2f 443 - 192.168.0.252 Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+5.2;+WOW64;+.NET+CLR+2.0.50727;+.NET+CLR+3.0.04506.30;+.NET+CLR+3.0.04506.648) 200 0 0




0
 
LVL 6

Author Comment

by:castellansolutions
ID: 26279512
192.168.0.252 is exchange1
and
192.168.0.160 is exchange2


the replaceCurrent=1 is what i think is doing it... it suggest that the issue is with the logon.aspx? but i checked and the domain name is not listed there...
0
 
LVL 16

Expert Comment

by:Raheem05
ID: 26279524
Ok can you copy the logon.aspx from working server to not working server and try again will take a look at the logs in 10mins
0
 
LVL 6

Author Comment

by:castellansolutions
ID: 26279577
i have done that adn no change... i am on the phone with ms now..
0
 
LVL 16

Expert Comment

by:Raheem05
ID: 26279589
Ok keep us posted on what MS say would be interested in what the outcome is you say you have already recreated the virtual directories I am assuming you have deleted the information from metadata whilst performing this
0
 
LVL 6

Accepted Solution

by:
castellansolutions earned 0 total points
ID: 26279871
so i am off the phone with ms and yeah! a solution.... the iis metabase under 1 > w3svc > set hostname value was set to the domain name that i did not want to get redirected to.


iis-meta-base-bad-day.JPG
0
 
LVL 16

Expert Comment

by:Raheem05
ID: 26279872
Glad its sorted :)
0
 
LVL 6

Author Comment

by:castellansolutions
ID: 26279937
so am i...
0

Featured Post

Office 365 Training for IT Pros

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A list of top three free exchange EDB viewers that helps the user to extract a mailbox from an unmounted .edb file and get a clear preview of all emails & other items with just a single click on mailboxes.
New style of hardware planning for Microsoft Exchange server.
In this video we show how to create a Shared Mailbox in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Recipients >> Sha…
In this video we show how to create an email address policy in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.:  First we need to log into the Exchange Admin Center. Navigate to the Mail Flow…
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question