Link to home
Start Free TrialLog in
Avatar of castellansolutions
castellansolutionsFlag for United States of America

asked on

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

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
Avatar of tl121000
tl121000
Flag of United States of America image

What is the domain external MX record pointing to?
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
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
Avatar of castellansolutions

ASKER

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.

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?
if you could also do https://exchangeserver / http://exchangeserver

Do you get the default IIS splash screen?

Yes, iis works correctly. its jsut the stupid owa folder.
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.
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?
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
I did what you asked and the same issues still occurs. i even restarted the iis service*
so this happens even if you attempt to do https://ip / https://hostname correct?
yes with ip and hostname same result...
Do you have any pages setup inside the /owa virtual directory to perform redirection?
any chance you could post some screen shots of the /owa virtual directory contents and properties?
no... but what if i coped the owa virtual directory from the other server??? (i have already removed and recreated the default virtual directories)
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
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
i will put back the original files...
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
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>
<%@ 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>
i am not comfortable posting the output of the Get-OwaVirtualDirectory ... What are you looking for in there?
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?
The aspx files look fine
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?
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.

Ok back to my DNS question above which zones have you setup for dns? private only or public too?
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...


Ok and finally what are the internal and externals URLS set to as my question above?
they are set to the correct respiective server names and the correct external dns name.
i reset the this morning... when i started to try and fix this.
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?
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




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...
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
i have done that adn no change... i am on the phone with ms now..
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
ASKER CERTIFIED SOLUTION
Avatar of castellansolutions
castellansolutions
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Glad its sorted :)
so am i...