PDA

View Full Version : [CLOSED] Internet Explorer 11 won't display any ext.net dynamic control after deployment



bbros
Jan 14, 2015, 9:32 AM
I am working with Framework 4.5.1 and VS2013 Update 4.
In the develpoment environment the application works, but in production environment, using IE11 I can't get ext controls.
Using browser javascript console Ext.net is a null reference.
I tried both witn Chrome and FireFox and the page is displayed.
This happens both on a 2008 R2 Server with Framework 4.5.2 and a 2012 R2 Server.

In this project I got also errors with the license activation when the licensekey is located in global.asax instead of in web.config. If you want I may open a new thread.

I have referenced the last svn version compiled with 4.5.1 WebForm Debug.

There are no errors in the server "Application Events"

Html page:


<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="ButtonLoading.aspx.vb" Inherits="BBros.ExtCookbook.ButtonLoadingStae" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>

Il pulsante finisce da solo l'animazione quando esce dal suo evento click</div>
</form>
</body>
</html>



Code behind:


Imports Ext.Net

Public Class ButtonLoadingStae
Inherits System.Web.UI.Page

Dim btn As Button

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim rm As New ResourceManager
Me.Controls.Add(rm)

btn = New Button With {.Text = "Cliccami"}
btn.LoadingState = New ButtonLoadingState With {.Text = "Aspetta..."}
AddHandler btn.DirectEvents.Click.Event, AddressOf btn_Click
Me.Controls.Add(btn)

End Sub

Private Sub btn_Click(sender As Object, e As EventArgs)
System.Threading.Thread.Sleep(2000)
End Sub
End Class


My web.config file is this (license has been replaced with x):


<?xml version="1.0"?>
<!--
Per ulteriori informazioni sulla configurazione dell'applicazione ASP.NET, visitare
http://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<configSections>
<section name="extnet" type="Ext.Net.GlobalConfig" requirePermission="false" />
</configSections>
<extnet theme="Gray" licenseKey="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" />
<system.web>
<compilation debug="true" strict="false" explicit="true" targetFramework="4.5.1"/>
<httpRuntime targetFramework="4.5"/>
<httpHandlers>
<add path="*/ext.axd" verb="*" type="Ext.Net.ResourceHandler" validate="false" />
</httpHandlers>
<httpModules>
<add name="DirectRequestModule" type="Ext.Net.DirectRequestModule, Ext.Net" />
</httpModules>
<pages enableSessionState="true">
<controls>
<add assembly="Ext.Net" namespace="Ext.Net" tagPrefix="ext" />
</controls>
<namespaces>
<add namespace="Ext.Net"/>
<!--<add namespace="Ext.Net.MVC"/>-->
</namespaces>
</pages>
</system.web>
<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
<modules>
<add name="DirectRequestModule" preCondition="managedHandler" type="Ext.Net.DirectRequestModule, Ext.Net" />
</modules>
<handlers>
<add name="DirectRequestHandler" verb="*" path="*/ext.axd" preCondition="integratedMode" type="Ext.Net.ResourceHandler" />
</handlers>
</system.webServer>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" />
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>


HTML Page in Internet Explorer 11.0.9600.17498 does not display the button and its source is this and it is identical to the chrome html:


<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link type="text/css" rel="stylesheet" href="/extcookbook/extjs/packages/ext_theme_gray/build/resources/ext-theme-gray-all-embedded-css/ext.axd?v=37070" id="ext-theme" />
<link type="text/css" rel="stylesheet" href="/extcookbook/extnet/resources/css/extnet-all-embedded-css/ext.axd?v=37070" id="extnet-styles" />
<script type="text/javascript" src="/extcookbook/extjs/ext-all-js/ext.axd?v=37070"></script>
<script type="text/javascript" src="/extcookbook/extjs/packages/ext_theme_gray/build/ext-theme-gray-js/ext.axd?v=37070"></script>
<script type="text/javascript" src="/extcookbook/extnet/extnet-all-js/ext.axd?v=37070"></script>
<script type="text/javascript" src="/extcookbook/extnet/locale/ext-locale-it-js/ext.axd?v=37070"></script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>

</title>
<script type="text/javascript">
//<![CDATA[
Ext.net.ResourceMgr.init({id:"ctl03",aspForm:"form1",theme:"gray",appName:"extcookbook"});Ext.onReady(function(){Ext.create("Ext.button.Button",{id:"ctl04",renderTo:"App.ctl04_Container",text:"Cliccami",loadingState:{text:"Aspetta..."},directEvents:{click:{fn:function(item,e){Ext.net .directRequest({control:this});}}}});});
//]]>
</script>
</head>
<body>
<form method="post" action="buttonloading.aspx" id="form1">
<div class="aspNetHidden">



</div>




<div class="aspNetHidden">

<input type="hidden" name="__VIEWSTATEGENERATOR" id="__VIEWSTATEGENERATOR" value="E0111240" />
</div>
<div>

Il pulsante finisce da solo l'animazione quando esce dal suo evento click</div>
</form>
</body>
</html>
<div id="App.ctl04_Container"></div>


Chrome page is this (identical to IE):



<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link type="text/css" rel="stylesheet" href="/extcookbook/extjs/packages/ext_theme_gray/build/resources/ext-theme-gray-all-embedded-css/ext.axd?v=37070" id="ext-theme" />
<link type="text/css" rel="stylesheet" href="/extcookbook/extnet/resources/css/extnet-all-embedded-css/ext.axd?v=37070" id="extnet-styles" />
<script type="text/javascript" src="/extcookbook/extjs/ext-all-js/ext.axd?v=37070"></script>
<script type="text/javascript" src="/extcookbook/extjs/packages/ext_theme_gray/build/ext-theme-gray-js/ext.axd?v=37070"></script>
<script type="text/javascript" src="/extcookbook/extnet/extnet-all-js/ext.axd?v=37070"></script>
<script type="text/javascript" src="/extcookbook/extnet/locale/ext-locale-it-js/ext.axd?v=37070"></script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>

</title>
<script type="text/javascript">
//<![CDATA[
Ext.net.ResourceMgr.init({id:"ctl03",aspForm:"form1",theme:"gray",appName:"extcookbook"});Ext.onReady(function(){Ext.create("Ext.button.Button",{id:"ctl04",renderTo:"App.ctl04_Container",text:"Cliccami",loadingState:{text:"Aspetta..."},directEvents:{click:{fn:function(item,e){Ext.net .directRequest({control:this});}}}});});
//]]>
</script>
</head>
<body>
<form method="post" action="buttonloading.aspx" id="form1">
<div class="aspNetHidden">



</div>




<div class="aspNetHidden">

<input type="hidden" name="__VIEWSTATEGENERATOR" id="__VIEWSTATEGENERATOR" value="E0111240" />
</div>
<div>

Il pulsante finisce da solo l'animazione quando esce dal suo evento click</div>
</form>
</body>
</html>
<div id="App.ctl04_Container"></div>


Could you help me?

Daniil
Jan 14, 2015, 12:00 PM
Hi @bbros,

Please try to put the controls into a Me.Form.Controls.

Adding it into Me.Controls, it is being added even outside the body.

Though, it is more important:


Using browser javascript console Ext.net is a null reference.

It probably means that some JavaScript resources are not loaded. Could you, please, review loading of resources? Is there some "404 - Not Found" error or something?



In this project I got also errors with the license activation when the licensekey is located in global.asax instead of in web.config. If you want I may open a new thread.

Yes, please start a new forum thread.

Dimitris
Jan 14, 2015, 12:03 PM
@bbros As I said (http://forums.ext.net/showthread.php?51071-internet-explorer-Ext-is-undefined-Ext-NET-3-0-0) the problem presented here is a different one and should be treated in this thread. Please, allow some time to try and reproduce the error using your example.

bbros
Jan 14, 2015, 8:11 PM
Now I changed Me.Controls.Add into Me.form1.Controls.Add and the page source is this:


<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link type="text/css" rel="stylesheet" href="/extcookbook/extjs/packages/ext_theme_gray/build/resources/ext-theme-gray-all-embedded-css/ext.axd?v=37070" id="ext-theme" />
<link type="text/css" rel="stylesheet" href="/extcookbook/extnet/resources/css/extnet-all-embedded-css/ext.axd?v=37070" id="extnet-styles" />
<script type="text/javascript" src="/extcookbook/extjs/ext-all-js/ext.axd?v=37070"></script>
<script type="text/javascript" src="/extcookbook/extjs/packages/ext_theme_gray/build/ext-theme-gray-js/ext.axd?v=37070"></script>
<script type="text/javascript" src="/extcookbook/extnet/extnet-all-js/ext.axd?v=37070"></script>
<script type="text/javascript" src="/extcookbook/extnet/locale/ext-locale-it-js/ext.axd?v=37070"></script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>

</title>
<script type="text/javascript">
//<![CDATA[
Ext.net.ResourceMgr.init({id:"ctl03",aspForm:"form1",theme:"gray",appName:"extcookbook"});Ext.onReady(function(){Ext.create("Ext.button.Button",{id:"ctl04",renderTo:"App.ctl04_Container",text:"Cliccami",loadingState:{text:"Aspetta..."},directEvents:{click:{fn:function(item,e){Ext.net .directRequest({control:this});}}}});});
//]]>
</script>
</head>
<body>
<form method="post" action="buttonloading.aspx" id="form1">
<div class="aspNetHidden">
</div>
<div class="aspNetHidden">
<input type="hidden" name="__VIEWSTATEGENERATOR" id="__VIEWSTATEGENERATOR" value="E0111240" />
</div>
<div>
Il pulsante finisce da solo l'animazione quando esce dal suo evento click</div>
<div id="App.ctl04_Container"></div></form>
</body>
</html>


if I run the page with the console open, I get the following errors:
18911

Daniil
Jan 14, 2015, 8:22 PM
Ok, thanks.

Do you have any update on this?

It probably means that some JavaScript resources are not loaded. Could you, please, review loading of resources? Is there some "404 - Not Found" error or something?

bbros
Jan 14, 2015, 8:47 PM
I tryed to download any reference in the page and I do not have any 404.
is there a smarter way to do it?

bbros
Jan 14, 2015, 8:55 PM
I tried with the same browser to change the emulation which is 7 by default.
18921
With 8, 9, 10, Edge then button become visible and I don't get the error.

I realized that there is a couple of ways for me to fix that behavior and forcing compatibility mode at least to IE8:

add in the page (http://msdn.microsoft.com/it-it/library/ie/hh869300(v=vs.85).aspx):

<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE9">


change web.config (http://msdn.microsoft.com/it-IT/library/cc817572.aspx):

<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<httpProtocol>
<customHeaders>
<clear />
<add name="X-UA-Compatible" value="IE=Edge" />
</customHeaders>
</httpProtocol>
</system.webServer>
</configuration>


I'm sorry not to have found the solution before, anyhow, I don't know if it can be useful for you.
I started to migrate some project made with v2.5.3 and I god this problem just 3 times using different clients and 2 different servers. With v2 this didn't happen.

If you consider the thread closed, just mark it as closed, if you need some other detail ask me.
Thank you

Dimitris
Jan 14, 2015, 9:06 PM
Does this practically mean that the page does not work in IE 7?

Can you please confirm that the default mode in your development environment is Edge?

bbros
Jan 14, 2015, 9:23 PM
Sorry I did edit the previous post and finish the edit after you replied.
With no changes I get by default IE7 emulation both in win8.1 and in win7, ie8 and ie11.
Changing web config I get by default the value I decide to write in.
In my development environment the default value is Edge.

Dimitris
Jan 14, 2015, 9:40 PM
I think the question has been answered but FYI this solution looks good, too: http://stackoverflow.com/questions/25360348/ie-11-document-mode-by-default

Daniil
Jan 15, 2015, 6:29 AM
I tried with the same browser to change the emulation which is 7 by default.

On your screenshot I see "8". So, 7 or 8?:)

Generally speaking, those emulation/compatibility modes mostly work well, but they are not officially supported either by us or Sencha. The reason is the fact that, for example, the original IE8 and the IE8 emulation mode in IE10 are not the same. Some page might work well in the original IE8, but it doesn't work in the emulation mode. So, the recommendation is to avoid using the emulation modes.

If the problem is reproducible in any original (not an emulation) version of IE, please let us know. We could try to investigate.

bbros
Jan 15, 2015, 7:07 AM
In the last screenshot I changed to 8 in order to let you know that it is working and that the button is visible.
Opening other application deployed with v2.5.3 the browser switches from Edge to 7 in the same server, and this happens with v3 as well as v2.
The point is that since v3 it does not work anymore with "7".
I do not agree with this IE behavior, but it is not a user choice.
I think that a meta tag, or a web.config change could be a good solution. I just found it after the thread start.

Daniil
Jan 15, 2015, 7:28 AM
Thanks for clarifying.


The point is that since v3 it does not work anymore with "7".

Are you able to test your page/application with the original IE7 version? Well, sure, if you need to support IE7.

As for Ext.NET v3, IE7 is still supported and if something doesn't work, we would like to investigate. Though, you are definitely free not to spend time on that discussion anymore if you don't need it.

bbros
Jan 15, 2015, 7:38 AM
I'll let you know if I'm able to test with IE7.
In my case clients have IE8 (Xp and 2003) and IE11 (Win7/8 2012 2012R2); so it is not important for me to support IE7.

Thank you

Daniil
Jan 15, 2015, 7:44 AM
Ok, thanks. You are lucky that you don't need to support IE7:) There are always some problems with legacy IE.

Do you mind we close the thread? If any new info appears, please feel free to post a follow-up even if the thread is closed.

bbros
Jan 15, 2015, 8:00 AM
I don't mind. Close the thread!
Thank you