PDA

View Full Version : [CLOSED] Application behaving differently in Staging enviroment



otouri
Jan 07, 2013, 7:58 PM
when working in my local all controls and the UI looked and worked as they were supposed. When I release to staging the UI get messy and tab overlay the navigation (please see the screenshots)
Please help

otouri
Jan 07, 2013, 8:12 PM
more screenshot

Vladimir
Jan 07, 2013, 9:50 PM
We need more details. Did you test under the same browser? Are you sure that all resources are loaded to the server (for example, use Fiddler to ensure that there are no invalid requests)

Try to create simple test page which works differently on the server and post that page here

Do you have online access for pages from screenshots?

otouri
Jan 07, 2013, 10:02 PM
When I open IE developer tool and click browser compability IE8 everything stat working normally. what i can't apprehend is that i am accessing the page in the staging server from my local using the same browser of my visual studio 2010 (IE9). With visual studio using IE 9 browser (while running the app) all looks good. When I open IE using the Shortcut in my desktop, that's when i get fucky looking page.

Daniil
Jan 08, 2013, 9:54 AM
Hi @otouri,

Summary:

1. Everything is OK when you run the app with VS 2010 development server and IE9.

Question. Is there any non default modes in IE developer tools. Please double ensure there is IE9 in the both: Browser and Document modes.

2. Everything is bad when you run the app with IIS and IE9, but OK with IE8 (toggling it in the developer tools).

Comment. Well, it is weird. Generally, server should not affect UI (if all resources loads correctly), but it can depend on a browser. So, if it runs well with VS server and IE9, it should run well with IIS and IE9.

It is hard to say anything concrete here without something to reproduce the problem.

Sp, please answer/comment these statements.

Are you sure that all resources are loaded to the server (for example, use Fiddler to ensure that there are no invalid requests)

Try to create simple test page which works differently on the server and post that page here

Do you have online access for pages from screenshots?

otouri
Jan 08, 2013, 2:30 PM
Please find below the anwers requested:

1- (Yes) Everything is OK when I run the app with VS 2010 development server and IE9
2- (Not sure how i can check this) Is there a non default modes in IE developer tools. Please double ensure there is IE9 in the both: Browser and Document modes.
3- (Yes) Everything is bad when I run the app with IIS and IE9 (Devopper tool says the default browser is set to IE9 compact view), but becomes OK with IE9, IE8 (toggling it in the developer tools).
4- (Yes) Yes all resources were loaded to the server. I copied the whole folder from my local and pasted it into the staging server
5- I access the staging server from IE9 (i tried both 64bit and 32bit) of my local machine. same result

I hope i did answer most of your question:

PS: Not sure if this will help. My machine is on windows 7 64 bit

Daniil
Jan 08, 2013, 3:33 PM
Please find below the anwers requested:

1- (Yes) Everything is OK when I run the app with VS 2010 development server and IE9


Please try to turn on the Compatibility Mode. How is the page rendered?



2- (Not sure how i can check this) Is there a non default modes in IE developer tools. Please double ensure there is IE9 in the both: Browser and Document modes.


Well, I mean just looking at this in the Developer Tools.



3- (Yes) Everything is bad when I run the app with IIS and IE9 (Devopper tool says the default browser is set to IE9 compact view), but becomes OK with IE9, IE8 (toggling it in the developer tools).


Do you mean that Compatibility Mode is switched on? Well, this mode is not officially supported. Either Ext.NET and ExtJS supports IE in the standard mode only.



4- (Yes) Yes all resources were loaded to the server. I copied the whole folder from my local and pasted it into the staging server


Please clarify did you check resources requests using the Fiddler or Developers Tools?

otouri
Jan 08, 2013, 3:49 PM
Actually after some debugging here is the issue:

My browser is set to to "display intranet site in compability view". Since my staging server is in intranet it renders the application in compatibility view and the result is the bad UI.

There is a solution to force the browser to render the code in a non compability view by adding

<meta http-equiv="X-UA-Compatible" content="IE=edge" /> right after the title tag.

I tried to implement this solution by adding this tag in my master page, but unfortunately no script should be preceding the meta tag.

when i view the source of the page there are bunch of EXT.net scripts before the the meta tag:


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link type="text/css" rel="stylesheet" href="/extjs/resources/css/ext-all-embedded-css/ext.axd?v=18167" id="ext-theme" />
<link type="text/css" rel="stylesheet" href="/extnet/resources/css/extnet-all-embedded-css/ext.axd?v=18167" />
<script type="text/javascript" src="/extjs/ext-all-js/ext.axd?v=18167"></script>
<script type="text/javascript" src="/extnet/extnet-all-js/ext.axd?v=18167"></script>
<script type="text/javascript" src="/ux/progressbarpager/progressbarpager-js/ext.axd?v=18167"></script>

<title></title>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<link href="/Styles/Form.css" rel="stylesheet" type="text/css" />
<link href="/Styles/Site.css" rel="stylesheet" type="text/css" />


These script are probably due to registering the control in the page

<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
Inherits="SecondaryDealLog.ActiveDealLogScreen" EnableEventValidation="false"
CodeBehind="ActiveDealLog.aspx.cs" %>

<%@ Register Src="UserControls/Feedback.ascx" TagName="Feedback" TagPrefix="uc1" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="Server">

please advice?

Thank you,

Daniil
Jan 08, 2013, 4:20 PM
Please use the ResourcePlaceHolder control.

Example

<head runat="server">
<title>Ext.NET v2 Example</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />

<ext:ResourcePlaceHolder runat="server" Mode="Script" />
<ext:ResourcePlaceHolder runat="server" Mode="Style" />
</head>

You will get all the Ext.NET resources rendered below the meta tag, but I am not sure it will help. Does it help?

otouri
Jan 08, 2013, 4:27 PM
Thank you so much this fixed the issue.
I love this control and you guys are always available. AS much as it is challenging to re-learn ASP.net using the control as much as it sweet.
Thank you, you may close this thread

Daniil
Jan 08, 2013, 5:08 PM
Thank you for the excellent feedback!