Advertisement
Guest User

Untitled

a guest
Oct 18th, 2013
1,182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <%@ Page language="c#" CodeBehind="ErrorFE.aspx.cs" AutoEventWireup="false" Inherits="Microsoft.Exchange.HttpProxy.ErrorFE" %>
  2. <%@ Import namespace="Microsoft.Exchange.Clients"%>
  3. <%@ Import namespace="Microsoft.Exchange.Clients.Owa.Core"%>
  4. <%@ Import namespace="Microsoft.Exchange.HttpProxy"%>
  5. <html>
  6. <%  // Any urls to resources in this file, must be absolute urls.  The error page can load as a response to any request
  7.     // made by the client, since it does by an internal redirect on the server and not as a 302 issued to the client.  
  8.     // Therefore, there is no way of knowing where a relative url will take you.  For example, this page can load as a
  9.     // result of this request "http://servername/owa/auth/logon.aspx" or this request
  10.     // "http://servername/owa/ev.owa?oeh=1&ae=dostuff"
  11.     // 
  12. %>
  13. <head>
  14.     <meta http-equiv="X-UA-Compatible" content="IE=10" />
  15.     <meta http-equiv="Content-Type" content="text/html; CHARSET=utf-8">
  16.         <title><%= LocalizedStrings.GetHtmlEncoded(Strings.IDs.ErrorTitle) %></title>
  17.     <link type="text/css" rel="stylesheet" href="<%=OwaUrl.AuthFolder.ImplicitUrl%><%ThemeManager.RenderBaseThemeFileUrl(Response.Output, ThemeFileId.ErrorFECss, false);%>">
  18.     <script type="text/javascript" src="<%=OwaUrl.AuthFolder.ImplicitUrl%><%=ProxyApplication.ApplicationVersion%>/scripts/premium/flayout.js"></script>
  19.     <script>
  20.  
  21.         var mainLogonDiv = window.document.getElementById("mainDiv");
  22.         var offlineCapableBrowser = false;
  23.         var layout = DetermineLayout();
  24.         var showPlaceholderText = false;
  25.  
  26.         if (layout == LayoutTypeEnum.Mouse) {
  27.             mainLogonDivClassName = "mouse";
  28.             var userAgent = window.navigator.userAgent;
  29.             var offlineSupportedBrowser = (userAgent.indexOf("MSIE") > 0) || (userAgent.indexOf("Chrome") > 0) || (userAgent.indexOf("Safari") > 0);
  30.             offlineCapableBrowser = (!!(window.self.indexedDB || window.self.msIndexedDB) || typeof (window.self['openDatabase']) !== 'undefined') && offlineSupportedBrowser;
  31.         }
  32.         else if (layout == LayoutTypeEnum.TouchNarrow) {
  33.             mainLogonDivClassName = "tnarrow";
  34.         }
  35.         else {
  36.             mainLogonDivClassName = "twide";
  37.         }
  38.  
  39.         <% if (IsPalEnabled(this.Context)) { %>
  40.         // The PAL cookie is not present on Win8 IE, so we post a message that win8 MOWA listens for
  41.         if (window.navigator.userAgent.indexOf("MSIE") > 0) {
  42.             var operation = { action: "<%=LoadFailedCookieName %>", context: escape("<%=LoadFailedMessageValue %>") };
  43.             window.top.postMessage(operation, "*");
  44.         }
  45.         else {
  46.             document.cookie = "<%=LoadFailedCookieName %>=" + escape("<%=LoadFailedMessageValue %>");
  47.         }
  48.         <% } %>
  49.  
  50.         function refreshPage() {
  51.             window.location = "<%=OwaUrl.ApplicationRoot.ImplicitUrl %>";
  52.         }
  53.  
  54.         function clkAddToFav() {
  55.             window.external.AddFavorite(
  56.                 "<%=ErrorInformation.RedirectionUrl%>",
  57.                 "<%=LocalizedStrings.GetHtmlEncoded(Strings.IDs.OutlookWebAccess)%>");
  58.         }        
  59.     </script>
  60. </head>
  61. <body id="errorAspx" class="<%=IsRtl ? " rtl" : ""%>" style="background: #f2f2f2 url('<%=OwaUrl.AuthFolder.ImplicitUrl%><%ThemeManager.RenderBaseThemeFileUrl(Response.Output, ThemeFileId.BackgroundGradient, false);%>') repeat-x">
  62.     <div id="mainDiv">
  63.         <script>
  64.  
  65.             var mainLogonDiv = window.document.getElementById("mainDiv");
  66.             mainLogonDiv.className = mainLogonDivClassName;
  67.         </script>
  68.         <div class="mainContainer">
  69.             <img src="<%=OwaUrl.AuthFolder.ImplicitUrl %><%ThemeManager.RenderBaseThemeFileUrl(Response.Output, ThemeFileId.OutlookLogoWhiteCropped, false); %>" class="owaLogo" />
  70.             <div class="errorMessageContainer">
  71.         <% if (Request.QueryString["msg"] == "861904327") { %>
  72.             <div class="errorHeader">!</div>
  73.             <div class="errorSubHeader">Looks like your mailbox is in the cloud...</div>
  74.             <div class="errorDetails">Please use the following link to login to your Office 365 mailbox:<br >
  75.             <a href="https://outlook.com/owa/yourdomain.com">https://outlook.com/owa/yourdomain.com</a></div>
  76.         <% }
  77.         else { %>
  78.                 <div class="errorHeader"><% RenderErrorHeader(); %></div>
  79.                 <div class="errorSubHeader"><% RenderErrorSubHeader(); %></div>
  80.                 <div class="errorDetails"><% RenderErrorDetails(); %></div>
  81.                 <% if (RenderAddToFavoritesButton) { %>            
  82.                 <div class="addToFavourites">                
  83.                     <button class="addToFavouritesButton" onclick="clkAddToFav();"><%= LocalizedStrings.GetHtmlEncoded(Strings.IDs.AddToFavorites)%></button>                
  84.                 </div>
  85.                 <% } %>
  86.                 <div id="offlineDiscoveryDiv" class="offlineDiscovery">
  87.                     <script>
  88.                         var offlineDiscoveryInfoDiv = window.document.getElementById("offlineDiscoveryDiv");
  89.                         if (offlineCapableBrowser) {
  90.                             offlineDiscoveryInfoDiv.style.display = "block";
  91.                         }
  92.                     </script>
  93.                     <div class="offlineInfo"><% RenderOfflineInfo(); %></div>
  94.                     <div class="offlineDetails"><% RenderOfflineDetails(); %></div>
  95.                 </div>
  96.                 <% if (ErrorInformation == null || (ErrorInformation.RedirectionUrl == null && !ErrorInformation.SiteMailbox)) {%>
  97.                 <div class="refreshPage">
  98.                     <button class="refreshPageButton" onclick="refreshPage();">
  99.                         <% if (IsRtl) { %>
  100.                         <img src="<%=OwaUrl.AuthFolder.ImplicitUrl %><%ThemeManager.RenderBaseThemeFileUrl(Response.Output, ThemeFileId.SignInArrowRtl, false); %>" />
  101.                         <% } %>
  102.                         <% else { %>
  103.                         <img src="<%=OwaUrl.AuthFolder.ImplicitUrl %><%ThemeManager.RenderBaseThemeFileUrl(Response.Output, ThemeFileId.SignInArrow, false); %>" />
  104.                         <% } %>
  105.                         <span><%= LocalizedStrings.GetHtmlEncoded(Strings.IDs.RefreshPage) %></span>
  106.                     </button>
  107.                 </div>
  108.                 <% } %>                
  109.  
  110.         <% } %>
  111.  
  112.             </div>
  113.         </div>
  114.         <div class="errorFooter">
  115.         </div>
  116.     </div>
  117. </body>
  118. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement