PDA

View Full Version : [CLOSED] Problem on a published Ext.Net web site



RCN
May 29, 2014, 4:45 PM
I found a layout issue when running a web site published on IIS 7.5

My machine has the following configuration:

HostName: dev001
IP: 192.168.0.2

When a page is accessed using the IP address (http://192.168.0.2/SandBox/Example/Page1 (http://<strong>192.168.0.2</strong>/SandBox/Example/Page1)), everything works as expected, but when the same page is accessed using the HostName (http://dev001/SandBox/Example/Page1 (http://<strong>dev001</strong>/SandBox/Example/Page1)) we got some issues regarding the width of the elements, in other words, the size of elements differ depending on how the page is accessed.

The problem occurs on IE, from versions 8 to 11.

Do you have any ideas about what is going on?

If needed i can prepare a sample application.

Thanks in advance.

RCN
May 29, 2014, 6:23 PM
Here's a example:


<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>

<!DOCTYPE html>
<html>
<head runat="server">
<title>LoginExample</title>
</head>
<body>
<ext:ResourceManager ID="ResourceManager1" runat="server" SeparateUIStyles="false"
Theme="Gray" />
<ext:Window ID="_winLogin" Closable="false" Width="420px" Height="242px" BodyBorder="0"
Border="false" Resizable="false" Maximizable="false" Draggable="false" Layout="Form"
runat="server">
<Items>
<ext:Image ID="Image1" ImageUrl="https://www.google.com.br/images/srpr/logo11w.png"
Width="410" Height="150" runat="server" />
<ext:TextField ID="_tbLogin" TabIndex="1" HideLabel="true" Icon="User" AutoDataBind="true"
runat="server" />
<ext:TextField ID="_tbSenha" TabIndex="2" HideLabel="true" Icon="Key" InputType="Password"
AnchorHorizontal="100%" runat="server">
</ext:TextField>
</Items>
<BottomBar>
<ext:Toolbar ID="_tlbLogin" runat="server" Border="false">
<Items>
<ext:ToolbarFill />
<ext:Button ID="_btnLogin" TabIndex="3" Icon="Accept" runat="server">
<Listeners>
<Click Handler="alert('Login in...');" />
</Listeners>
</ext:Button>
</Items>
</ext:Toolbar>
</BottomBar>
</ext:Window>
</body>
</html>


Screenshot of the page accessed using the IP:
11651

Screenshot of the page accessed using the HostName (the text in the TextFields was just to show that they are not working as indeed either):
11661

Thanks in advance.

geoffrey.mcgill
May 29, 2014, 6:58 PM
I'd check to see what resources are being loaded onto those pages, and any compression that might be happening from the server.

Ext.NET is not sending anything differently, so there's something happening on the server.

Ensure one is not being tested in Compatibility Mode, which is not supported by Ext.NET and might produce results similar to what you're seeing.

RCN
May 29, 2014, 8:35 PM
Geoffrey, thanks for the clue.

The resources loaded on both pages were the same and the server was not performing any compression, but the result html was different in each scenario.

The browser in both scenarios was "apparently" not running in compatibility mode, but i was able to discover that indeed, the "HostName scenario" was running under compatibility mode.

On IE settings, under Tools > Compatibility View Settings window, there is the option "Display intranet sites in Compatibility View", which is checked by default. That's the reason for the "HostName scenario" run under compatibility mode, but unfortunately it was not possible to notice it by "looking" to the browser, since the the compatibility mode button was not shown under this scenario.

11671

Hope that this thread can assist anyone that may face this issue in the future.