PDA

View Full Version : [CLOSED] Ext is undefined & re-built Ext.Net



slavina
Oct 20, 2014, 11:08 AM
Hello,

for our project, we need to use Ext.Net 1.x and Ext.Net 2.x in reference because we made our web application in 1.x a few years ago and now we want to slowly migrate to 2.x.

So, initially, we want to use both version because it will be very expensive (in time) to migrate everything.
To use both, we need to change the Ext.Net.dll of one version.
To do this, we get the source code of 2.x.
We built a sample project which works with Ext.Net 2.x.
Now we try to rename it.

To test, we changed this :
- the default namespace in the 2.x sourcecode
- the namespace of every files
- every webResource in AssemblyInfo.cs
- the Web.config of our sample project.

The compilation of Ext.Net2 (the new name) do not throw any errors.
But when we try to generate the project, we have this error :

"Ext" is undefined on :

<script type="text/javascript">
//<![CDATA[
Ext.net.ResourceMgr.init({id:"ResourceManager1",aspForm:"form1",theme:"gray",appName:"Test_Tableau_Bord",icons:[{name:"Information",url:"/Test_Tableau_Bord/WebResource.axd?d=rCuciMpIuTMe2gBP1iGvW5lpteGWUDwa 8Ql8CS7SyeoC4fy3ZTywkLvQ8NOHCfEHf0PA6z3JwzZr8dXyVP 3zUCdcJpGL28VsURpwIrCGCTzyqdBCkx5euVK1_-h2udmuNTZNjUNi2HjC1A96Fv1MzQ2&amp;t=635494012503630000"},{name:"Table",url:"/Test_Tableau_Bord/WebResource.axd?d=KVYltv9pZmJ7b4F_byExMIPN0pMa26GP 5rSarHBXfBAaQYyK9UAOjHCP_aYxQcIfHeP2aKQIfu5iulpgPB BW0lkT8aZNgYrV_iyWvMn7sLa38GTZu2U-Y69N7WGWwZZWbnx23u4 [...I cut this]
//]]>
</scrip

With firebug, I have these errors :



"NetworkError: 404 Not Found - http://localhost/Test_Tableau_Bord/WebResource.axd?d=zZ7PktA2Vr2DX3-zLhBeBZU64nd-OMC5pX-l3YgYfNFe_6eQMSFHd35SLojPe8t8b2vQK1Chx35dK4uNZb0-MQsG1F-yHdesgTb-98pnoIA7Ds9SX_q9GaLz1GJUx8RTxFQDjPP-wWff7CzcLLV8ceBoUewQyFhwUqfHfS5w5tDkevyI4xc7fBStE4 OUr0OHdkRE6QDmJT9YDBC1kfjZNA2&t=635494012503630000"
WebReso...3630000

"NetworkError: 404 Not Found - http://localhost/Test_Tableau_Bord/WebResource.axd?d=s80zOnwElwT3FdcBgTt9On-CLWoHwImgPDI9e2hBRCj3rL7uXu7jB86QXVQEdKgrWXhrRhVs-yRMUfnVPnd2d9lRiAwO8ROleXYOfJU8U-viBxb_iL1aY42MWbZZzZG2L3sfonUYh7qZr7q_azFrdaMWqjJO ARFCk61Im_OMN9V0F_Vbk76ULpc0Vsvxh77-0&t=635494012503630000"
WebReso...3630000

"NetworkError: 404 Not Found - http://localhost/Test_Tableau_Bord/WebResource.axd?d=CfsPshHlsfpEZwv3c2RXxcs1g355TF50 N0cis9m4hfuvwF2VzuTVSA71RlgXEmSTaWdW5616xVHUoHYCok Wda4uesMg7zNSjZU-yWnjBkx-9QIiqj_VcRodxZAw21buhbLk__Td5r1U3H6gonkChg6pjO5TnM awr3me0BOfC2GiUo_EqTI8XNykjZk25figt0&t=635494012503630000"
WebReso...3630000

"NetworkError: 404 Not Found - http://localhost/Test_Tableau_Bord/WebResource.axd?d=ylozb5tQudCk5r37PMpw4VZ7bGN9x7XM 83H7TJD2EKCSJV4E2lMZ98WeUdxDnOvPej2dEerV_x_HE1dICq 5JtpmJt7g3Yzd66wYzDTQ5u8bW5fggUlsCdspTe19iqAucLqps hfz3lvF8-tvWLp6vLg2&t=635494012503630000"
WebReso...3630000

"NetworkError: 404 Not Found - http://localhost/Test_Tableau_Bord/WebResource.axd?d=4NA1P-P2nWHZ1NdjZn0S2pyAaqKTjS-EGu1J4PRRmjMyBLACBcdkEDBJnFJdU3wOWFfHitYPQ-ozvAP6RU-rTHZXVxwVkqz-eHokpK5ILN2AwUe3olHzzTqh-OP-3ev5lFiNmD5w8Awq_Ec4tP3oRw2&t=635494012503630000"
WebReso...3630000

"NetworkError: 404 Not Found - http://localhost/Test_Tableau_Bord/WebResource.axd?d=ahos8t34Iw02W4yXwK7OzVAfVa3I5l7R JUYO29xb4ZLFazeY8dwtD68co8UqzgKq1FRn5n3Mhk2D0kTcBQ hdzD5la787opcpBWD_bF43Symwi9A-gKxCQTNR549RplDgF40GHmeMFilVx0TwkzREEAv6FH6RLOBXqV 0cSV0jwIQ1&t=635494012503630000"
WebReso...3630000

"NetworkError: 404 Not Found - http://localhost/Test_Tableau_Bord/WebResource.axd?d=4NA1P-P2nWHZ1NdjZn0S2pyAaqKTjS-EGu1J4PRRmjMyBLACBcdkEDBJnFJdU3wOWFfHitYPQ-ozvAP6RU-rTHZXVxwVkqz-eHokpK5ILN2AwUe3olHzzTqh-OP-3ev5lFiNmD5w8Awq_Ec4tP3oRw2&t=635494012503630000"
WebReso...3630000

"NetworkError: 404 Not Found - http://localhost/Test_Tableau_Bord/WebResource.axd?d=ahos8t34Iw02W4yXwK7OzVAfVa3I5l7R JUYO29xb4ZLFazeY8dwtD68co8UqzgKq1FRn5n3Mhk2D0kTcBQ hdzD5la787opcpBWD_bF43Symwi9A-gKxCQTNR549RplDgF40GHmeMFilVx0TwkzREEAv6FH6RLOBXqV 0cSV0jwIQ1&t=635494012503630000"
WebReso...3630000

ReferenceError: Ext is not defined
Ext.net.ResourceMgr.init({id:"ResourceManager1",aspForm:"form1",theme:"gray",app...


Do you have any idea?

Daniil
Oct 20, 2014, 12:41 PM
Hi @slavina,

Welcome to the Ext.NET forums!

Somebody have got working what you want, please investigate.
http://forums.ext.net/showthread.php?26299

slavina
Oct 20, 2014, 1:53 PM
I read this topic but the web.config is missing for this example and I don't understand how to solve this point "You'll also need to change namespaces in Ext.Net.Utilities & NewtonSoft"
Should I ask here or in the other topic?

Daniil
Oct 20, 2014, 8:20 PM
I read this topic

Reading is OK, but have you tried this instruction?
http://forums.ext.net/showthread.php?26299&p=117319&viewfull=1#post117319


but the web.config is missing

Yes, there is no a full Web.config, but, seems, @betamax has highlighted the essential parts.


I don't understand how to solve this point "You'll also need to change namespaces in Ext.Net.Utilities & NewtonSoft"

I am not sure as well. Though, when you can start to convert and some compile error will occur at some point regarding Ext.Net.Utilities or Newtonsoft, you will understand.

I would add that using two different versions of Ext.NET in the same project is not officially supported and what you are doing is at your own risk. Also we don't have a ready solution for you? unfortunately. All that we can do on this topic is to push you to the right direction and/or help with some specific issues, but not with the whole task from scratch.

slavina
Oct 21, 2014, 3:04 PM
Yes, I have done this :

Rename Ext.Net folders to Ext.v1Net
Rename Assembly name to Ext.v1Net and Default namespace to Ext.v1Net in project file
Replace Ext.Net with Ext.v1Net in .CS files
Replace HttpContext.Current.Items["xx"] with HttpContext.Current.Items["v1xx"] in .CS files
Replace Ext.net with Ext.v1net in all files

But I dont understand these points :

Replace X-Ext.Net with X-Ext.v1Net in .JS files
You'll also need to change namespaces in Ext.Net.Utilities & NewtonSoft

The compilation of Ext.Net is ok but we still have the error "Ext is undefined".

this is my webconfig


<?xml version="1.0" encoding="utf-8"?>

<configuration>
<configSections>
<section name="extnetv2" type="Ext.v2Net.GlobalConfig" requirePermission="false" />
</configSections>

<extnetv2 theme="Gray" />

<system.web>
<compilation debug="true" targetFramework="4.0" />
<httpHandlers>
<add path="*/ext.axd" verb="*" type="Ext.v2Net.ResourceHandler" validate="false" />
</httpHandlers>
<httpModules>
<add name="DirectRequestModule" type="Ext.v2Net.DirectRequestModule, Ext.v2Net" />
</httpModules>

<pages>
<controls>
<add assembly="Ext.v2Net" namespace="Ext.v2Net" tagPrefix="ext" />
</controls>
</pages>
</system.web>

<system.webServer>
<validation validateIntegratedModeConfiguration="false" />

<modules>
<add name="DirectRequestModule" preCondition="managedHandler" type="Ext.v2Net.DirectRequestModule, Ext.v2Net" />
</modules>

<handlers>
<add name="DirectRequestHandler" verb="*" path="*/ext.axd" preCondition="integratedMode" type="Ext.v2Net.ResourceHandler" />
</handlers>

<defaultDocument>
<files>
<clear />
<add value="default.aspx" />
<add value="Default.htm" />
<add value="Default.asp" />
<add value="index.htm" />
<add value="index.html" />
<add value="iisstart.htm" />
<add value="DashBoard.aspx"/>
</files>
</defaultDocument>

</system.webServer>

<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" />
<bindingRedirect oldVersion="1.0.0.0-6.0.1" newVersion="6.0.2" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Ext.Net.Utilities" publicKeyToken="2c34ac34702a3c23" />
<bindingRedirect oldVersion="0.0.0.0-2.3.0" newVersion="2.4.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Transformer.NET" publicKeyToken="e274d618e7c603a7" />
<bindingRedirect oldVersion="0.0.0.0-2.1.0" newVersion="2.1.1" />
</dependentAssembly>
</assemblyBinding>
</runtime>

</configuration>

Daniil
Oct 22, 2014, 5:57 AM
Yes, it all might be quite a challenge task.


Replace X-Ext.Net with X-Ext.v1Net in .JS files

The Ext.NET JavaScript files you can find inside the Ext.Net\Build\Ext.Net\extnet folder.


You'll also need to change namespaces in Ext.Net.Utilities & NewtonSoft

I am also unsure about that item still. Though, if the project build without any compilation errors, I would forget about that for now.

More important at this point is to resolve the "Ext is undefined" error.

It happens because of "Not Found" errors that you've talked about in the original post.

So, there are WebResource.axd links... It needs to determine why they are not "ext.axd" links.

Most of resource links are constructed inside the GetWebResourceUrl method of ResourceManager. See the Ext.Net\Core\ResourceManager\ResourceManager.cs file.

This files checks

ResourceHandler.HasHandler()

I guess there is something within the HasHandler method that you should change.

slavina
Oct 22, 2014, 11:18 AM
So, I changed every Ext.Net in resourceManager and the error disappear.
After that, I changed every "url("<%=WebResource([...])%>")" in css of ext-theme with the new path.

Now it's almost good. Just the default theme configured in the web.config does not work. It's still "classic".
I tried directmethod, directevent, js function... no problem!

Daniil
Oct 22, 2014, 11:32 AM
Please review the Ext.Net\Configuration\GlobalConfig.cs file. There is

private static GlobalConfig settings = ConfigurationManager.GetSection("extnet") as GlobalConfig;

I guess you should replace "extnet" with "extnetv2".

slavina
Oct 22, 2014, 2:59 PM
Everything looks good. I will make an other try with Ext.Net v1.x.
If I have any problems, I will post here!

slavina
Oct 23, 2014, 5:18 PM
I tried with Ext.Net 1.x and I have an other error on :


this.StoreLanguage=new Ext.ux.data.PagingStore({proxyId:" [...]


Ext.ux.data is undefined

I only have :


Ext.ux.plugins
Ext.ux.layout
Ext.ux.FieldLabeler

With Firebug :


"NetworkError: 404 Not Found - http://localhost/*******/WebResource.axd?d=BQ_qNswYDEBNq0xgd5atcau920jOAjI1 ZTIkUE84Zm8E9qx1zj-FM4OylR0ePmPG1J190O4cQVlRM_RdI7KTmwewwZnS9T38G3SiN ZauxFBcADu2M0k7NYTXhoR6KKkfS7YTm5OyX4JnIFuNpHV2JGh 2jzKWWsmZRz3HwTMIT801&t=635496752358720000"

TypeError: Ext.ux.data is undefined
...",Ext.applyIf(config || {}, {}));} });this.StoreLanguage=new Ext.ux.data.PagingS...

Daniil
Oct 23, 2014, 6:11 PM
Please review this file

<Ext.Net v1>\Ext.Net\Core\XControl\Helpers.cs

There is the ExtNetDataItem property. I guess you should change the embedded path.

slavina
Oct 24, 2014, 1:38 PM
the path has already been changed. Every Ext.Net is Ext.v1Net now.


extNetDataItem = new ClientScriptItem(
"Ext.v1Net.Build.Ext.v1Net.extnet.extnet-data.js",
"Ext.v1Net.Build.Ext.v1Net.extnet.extnet-data-debug.js",
"/extnet/extnet-data.js",
"/extnet/extnet-data-debug.js");

Where Ext.ux.data is built?

Daniil
Oct 25, 2014, 8:10 AM
Where Ext.ux.data is built?

Sorry, I don't quite understand the question.

By the way, have you not forgotten to correct this in Ext.NET v1 as well?

private static GlobalConfig settings = ConfigurationManager.GetSection("extnet") as GlobalConfig;

Sure, only if you rename the section in Web.config.

slavina
Oct 27, 2014, 9:25 AM
I changed that


private static GlobalConfig settings = ConfigurationManager.GetSection("extnetv1") as GlobalConfig;

even if I dont need to because I did not call it in web.config (not the same project).

It says that "Ext.ux.data is undefined" so I try to find where data is instantiated. But I have no idea where to search.
Is it in the js?

Daniil
Oct 27, 2014, 6:31 PM
I changed that

private static GlobalConfig settings = ConfigurationManager.GetSection("extnetv1") as GlobalConfig;
even if I dont need to because I did not call it in web.config (not the same project).

I don't quite understand why you don't need to do that.

Please clarify have you attached the v1 Ext.Net.ResourceHandler in Web.config?


It says that "Ext.ux.data is undefined" so I try to find where data is instantiated. But I have no idea where to search.
Is it in the js?

It is inside this file.
http://svn.ext.net/premium/branches/1/Ext.Net/Build/Ext.Net/extnet/extnet-data-debug.js

This file is attached to a page via

<script src=...></script>

slavina
Oct 28, 2014, 9:23 AM
I changed that

private static GlobalConfig settings = ConfigurationManager.GetSection("extnetv1") as GlobalConfig;

And this is my web.config (I hide some parts for the project, sorry)


<?xml version="1.0" encoding="UTF-8"?>
<!--
Pour plus d'informations sur la configuration de votre application ASP.NET, consultez
http://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<configSections>
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=[...]">
<section name="[...].Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=[...]" requirePermission="false" />
</sectionGroup>
<section name="extnetv1" type="Ext.v1Net.GlobalConfig" requirePermission="false" />
</configSections>
<appSettings>
<add key="ChartImageHandler" value="storage=file;timeout=20;dir=c:\TempImageFiles\;" />
</appSettings>
<connectionStrings>
<add name="ApplicationServices" connectionString="data source=[...]\SqlExpress;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\asp netdb.mdf;User Instance=true" providerName="System.Data.SqlClient" />
<add name="DCxManagerEntities" connectionString="metadata=res://*/[...].csdl|res://*/[...].ssdl|res://*/[...].msl;provider=System.Data.SqlClient;provider connection string=&quot;Data Source=[...]\SqlExpress;Initial Catalog=[...];Integrated Security=True;MultipleActiveResultSets=True&quot;" providerName="System.Data.EntityClient" />
</connectionStrings>
<system.web>
<pages>
<controls>
<add tagPrefix="asp" namespace="System.Web.UI.DataVisualization.Charting"
assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=[...]" />
</controls>
</pages>
<httpRuntime maxRequestLength="30720" maxQueryStringLength="32768" />
<httpModules>
<add name="DirectRequestModule" type="Ext.v1Net.DirectRequestModule, Ext.v1Net" />
</httpModules>
<authentication mode="Windows" />
<!--
The <customErrors> section enables configuration
of what to do if/when an unhandled error occurs
during the execution of a request. Specifically,
it enables developers to configure html error pages
to be displayed in place of a error stack trace.
-->
<customErrors mode="Off" defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>
<httpHandlers>
<add path="*/ext.axd" verb="*" type="Ext.v1Net.ResourceHandler" validate="false" />
<add path="ChartImg.axd" verb="GET,HEAD" type="System.Web.UI.DataVisualization.Charting.ChartHttp Handler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false" />
</httpHandlers>
<compilation debug="true" targetFramework="4.0">
<assemblies>
<add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=[...]" />
<add assembly="System.Web.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=[...]" />
<add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=[...]" />
<add assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=[...]" />
</assemblies>
</compilation>
<membership>
<providers>
<clear />
<add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="ApplicationServices" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="/" />
</providers>
</membership>
<profile>
<providers>
<clear />
<add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="ApplicationServices" applicationName="/" />
</providers>
</profile>
<roleManager enabled="false">
<providers>
<clear />
<add name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="ApplicationServices" applicationName="/" />
<add name="AspNetWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider" applicationName="/" />
</providers>
</roleManager>
</system.web>
<system.net>
<mailSettings>
<smtp from="[...]">
<network host="[...]" password="[...]" userName="[...]" />
</smtp>
</mailSettings>
</system.net>
<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
<modules runAllManagedModulesForAllRequests="true">
<add name="DirectRequestModule" preCondition="managedHandler" type="Ext.v1Net.DirectRequestModule, Ext.v1Net" />
</modules>
<handlers>
<add name="DirectRequestHandler" verb="*" path="*/ext.axd" preCondition="integratedMode" type="Ext.v1Net.ResourceHandler" />
<remove name="ChartImageHandler" />
<add name="ChartImageHandler" preCondition="integratedMode" verb="GET,HEAD,POST" path="ChartImg.axd" type="System.Web.UI.DataVisualization.Charting.ChartHttp Handler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=[...]" />
</handlers>
<defaultDocument>
<files>
<clear />
<add value="default.aspx" />
<add value="Default.htm" />
<add value="Default.asp" />
<add value="index.htm" />
<add value="index.html" />
<add value="iisstart.htm" />
</files>
</defaultDocument>
<security>
<requestFiltering>
<requestLimits maxUrl="32768" maxQueryString="32768" />
</requestFiltering>
</security>
</system.webServer>
<applicationSettings>
<[...].Properties.Settings>
<setting name="VersionDate" serializeAs="String">
<value>04-10-2012 - 17-17</value>
</setting>
</[...].Properties.Settings>
</applicationSettings>
</configuration>


With Firebug, I still have 2 request failure on webresource. How can I know which one is wrong?

EDIT :

I saw on Firebug that "extnet-core.js" is loaded.

Daniil
Oct 28, 2014, 11:32 AM
Please post the Page Sources of the page that you are testing with.

I mean the Page Sources option in the browser, not the code of .aspx page.

slavina
Oct 28, 2014, 12:16 PM
Here's the page. It's the login page of the project.



<!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 id="Head1"><title>
Page d'accueil
</title><link rel="shortcut icon" type="image/x-icon" href="./Design/project_name.png" /><link rel="icon" type="image/x-icon" href="./Design/project_name.png" />
<style type="text/css">
html
{
height: 100%;
}
body
{
height: 100%;
margin: 0px;
padding: 0px;
background-image: url(./Design/fond_connexion.jpg) !important;
background-position: center;
background-repeat: no-repeat;
}
.text-red
{
text-align: center !important;
color: Blue !important;
}
.text-blue-spec
{
text-align: center !important;
color: #0f6b91 !important;
font: 14px/18px arial,sans-serif;
font-weight: bold;
font-style: italic;
}
.text-blue-normal
{
text-align: center !important;
color: #0f6b91 !important;
font: 14px/18px arial,sans-serif;
}
</style>
<script type="text/javascript">
var generateValidation = function () {
Ext.net.DirectMethods.GenerateValidation();
}
var manageRegistration = function (result, error) {
if (result != undefined) {
if (result.message != "true") {
Ext.Msg.alert('Erreur', result.message);
} else {
RegistrationValidation.clear();
Ext.Msg.alert('Erreur', 'Veuillez saisir le nouveau code de validation');
Captcha.imageUrl = result.filename;
}
}
}

var resize = function (a, b, c, d) {
if (!WindowLogin.hidden) { WindowLogin.center(); WindowLogin.show(); }
if (!WindowError.hidden) { WindowError.center(); WindowError.show(); }
if (!Window1.hidden) { Window1.center(); Window1.show(); }
if (!WindowAbout.hidden) { WindowAbout.center(); WindowAbout.show(); }
if (!Registration.hidden) { Registration.center(); Registration.show(); }
}

</script>
</head>
<body>
<form method="post" action="Default.aspx" id="form1">
<div class="aspNetHidden">
<input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" />
<input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT" value="" />
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUKMTQ5MjY2NzY5MA9kFgICAw9kFggCAw8UKhJTeXN0ZW0 uV2ViLlVJLlBhaXIBDwUJdnNNZW1iZXJzFCsAAQ8FBlJlYWRlc hQrBAEPBQRiYXNlFgIeCklEUHJvcGVydHkFA0tleWQCBQ8UKwQ BDwUJdnNNZW1iZXJzFCsAAQ8FBlJlYWRlchQrBAEPBQRiYXNlF gIfAAUCSWRkAg0PZBYCZg9kFgJmD2QWAgIDDxQrBAEPBQl2c01 lbWJlcnMUKwACDwUOQXV0b0xvYWRQYXJhbXMPAgIUKwACFCsEA Q8FBGJhc2UWBh4ETmFtZQUFc3RhcnQeBVZhbHVlBQEwHgRNb2R lCylpRXh0LnYxTmV0LlBhcmFtZXRlck1vZGUsIEV4dC52MU5ld CwgVmVyc2lvbj0xLjcuMC4yNjIxMywgQ3VsdHVyZT1uZXV0cmF sLCBQdWJsaWNLZXlUb2tlbj0yZTEyY2UzZDAxNzZjZDg3ABQrB AEPBQRiYXNlFgYfAQUFbGltaXQfAgUCMTUfAwsrBQAPBQZSZWF kZXIUKwQBDwUEYmFzZRYCHwAFAklkZAIPD2QWAgIJD2QWAgIBD xQrBAEPBQRiYXNlDxYCHgZMYXlvdXQFBGF1dG9kZBgBBR5fX0N vbnRyb2xzUmVxdWlyZVBvc3RCYWNrS2V5X18WLAUQUmVzb3VyY 2VNYW5hZ2VyMQULV2luZG93TG9naW4FBUxvZ2luBQNQd2QFB0J 1dHRvbjEFC1dpbmRvd0Vycm9yBQdCdXR0b24yBQtXaW5kb3dBY m91dAUHQnV0dG9uMwUHV2luZG93MQUJVGFiUGFuZWwxBQpHcml kUGFuZWwxBQ5QYWdpbmdUb29sYmFyMQUOUGFuZWxQYXJhbWV0Z XIFAklkBQlGaXJzdE5hbWUFCExhc3ROYW1lBQdDb21wYW55BRF GdW5jdGlvbkluQ29tcGFueQUITGFuZ3VhZ2UFA0xvZwUIUGFzc 3dvcmQFD0NvbmZpcm1QYXNzd29yZAUFRW1haWwFD1JlZ2lzdGV yaW5nRGF0ZQUOTGFzdENvbm5lY3Rpb24FC1Byb2ZpbGVOYW1lB QpCdXR0b25TYXZlBQxSZWdpc3RyYXRpb24FElJlZ2lzdHJhdGl vbkNsaWVudAUUUmVnaXN0cmF0aW9uTGFuZ3VhZ2UFFFJlZ2lzd HJhdGlvbkxhc3ROYW1lBRVSZWdpc3RyYXRpb25GaXJzdE5hbWU FE1JlZ2lzdHJhdGlvbkNvbXBhbnkFFFJlZ2lzdHJhdGlvbkZ1b mN0aW9uBRFSZWdpc3RyYXRpb25FbWFpbAURUmVnaXN0cmF0aW9 uUGhvbmUFE1JlZ2lzdHJhdGlvbkNvbW1lbnQFBWN0bDQ5BQxQY W5lbENhcHRjaGEFBWN0bDUzBRZSZWdpc3RyYXRpb25WYWxpZGF 0aW9uBRJSZWdpc3RyYXRpb25CdXR0b24FBWN0bDYxksmG78dcU AcPiSXv2lHEpOMgf0kdy/yyrMibXvF056I=" />
</div>

<script type="text/javascript">
//<![CDATA[
var theForm = document.forms['form1'];
if (!theForm) {
theForm = document.form1;
}
function __doPostBack(eventTarget, eventArgument) {
if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
theForm.__EVENTTARGET.value = eventTarget;
theForm.__EVENTARGUMENT.value = eventArgument;
theForm.submit();
}
}
//]]>
</script>


<div class="aspNetHidden">

<input type="hidden" name="__VIEWSTATEGENERATOR" id="__VIEWSTATEGENERATOR" value="635AEA9C" />
<input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="/wEdAAKf5/lgTlya7Bh29sEC9dRTBUdYWMLkI/tXuqI0HQ389Bu2YYYKIq28s7LsMh6BzaOkMGbWLQcM8yAMYwc1 cYyC" />
</div>






<div id="GridPanel1_Content" class="x-hidden"></div><div id="PanelParameter_Content" class="x-hidden"></div>

<Ext.v1Net.InitScript>
<script type="text/javascript" src="/project_name/extjs/adapter/ext/ext-base-js/ext.axd?v=26213"></script>
<script type="text/javascript" src="/project_name/extjs/ext-all-js/ext.axd?v=26213"></script>
<script type="text/javascript" src="/project_name/extnet/extnet-core-js/ext.axd?v=26213"></script>
<script type="text/javascript" src="/project_name/extnet/locale/ext-lang-fr-js/ext.axd?v=26213"></script>
<script type="text/javascript" src="/project_name/WebResource.axd?d=BQ_qNswYDEBNq0xgd5atcau920jOAjI1 ZTIkUE84Zm8E9qx1zj-FM4OylR0ePmPG1J190O4cQVlRM_RdI7KTmwewwZnS9T38G3SiN ZauxFBcADu2M0k7NYTXhoR6KKkfS7YTm5OyX4JnIFuNpHV2JGh 2jzKWWsmZRz3HwTMIT801&amp;t=635496752358720000"></script>
<script type="text/javascript">
//<![CDATA[
Ext.v1net.ResourceMgr.init({id:"ResourceManager1",BLANK_IMAGE_URL:"/project_name/extjs/resources/images/default/s-gif/ext.axd",aspForm:"form1",theme:"blue",appName:"project_name",icons:["Lock","Lightning","Disk","Cancel"]});Ext.onReady(function(){Ext.QuickTips.init();Ext .apply(Ext.v1net.DirectMethods, { GenerateValidation:function(config){Ext.v1net.Dire ctMethod.request("GenerateValidation",Ext.applyIf(config || {}, {}));} });this.StoreLanguage=new Ext.ux.data.PagingStore({proxyId:"StoreLanguage",autoLoad:true,reader:new Ext.data.JsonReader({fields:[{name:"Key",type:"int"},{name:"Value",type:"string"}],idProperty:"Key"}),directEventConfig:{},proxy:new Ext.data.PagingMemoryProxy([{"Key":2,"Value":"Anglais"},{"Key":1,"Value":"Fran?ais"}], false)});this.StoreClient=new Ext.ux.data.PagingStore({proxyId:"StoreClient",autoLoad:true,reader:new Ext.data.JsonReader({fields:[{name:"Id",type:"int"},{name:"Name",type:"string"}],idProperty:"Id"}),directEventConfig:{},proxy:new Ext.data.PagingMemoryProxy([{"Id":0,"Name":"GEOPLC"}], false)});new Ext.Window({id:"WindowLogin",renderTo:Ext.get("form1"),height:150,width:350,items:[{id:"Login",xtype:"textfield",fieldLabel:"Identifiant",autoFocus:true,listeners:{specialkey:{fn:function (item,e){if (e.getKey() == e.ENTER) { Button1.ajaxListeners.click.fire(); }}}}},{id:"Pwd",xtype:"textfield",fieldLabel:"Mot de Passe",inputType:"password",listeners:{specialkey:{fn:function(item,e){if (e.getKey() == e.ENTER) { Button1.ajaxListeners.click.fire(); }}}}}],layout:"form",closable:false,buttonAlign:"center",buttons:[{id:"Button1",iconCls:"icon-lightning",text:"Connexion",directEvents:{click:{fn:function(item,e){var params=arguments;Ext.v1net.DirectEvent.confirmRequ est({eventMask:{showMask:true,msg:"V?rification en Cours..."},userFailure:function(response,result,el,type,act ion,extraParams,o){WindowError.show();},control:th is});},delay:20}}}],draggable:false,iconCls:"icon-lock",padding:20,title:"Login",tools:[{id:"gear",handler:generateValidation,qtip:"Demande Inscription ou Information"},{id:"help",handler:function(event,toolEl,panel){WindowAbout. show();},qtip:"A propos"}],hidden:false,resizable:false});new Ext.Window({id:"WindowError",labelWidth:5,hidden:true,renderTo:Ext.get("form1"),height:150,width:350,items:[{id:"ctl07",xtype:"label",html:"<div class='text-red'>...div>"},{id:"ctl09",xtype:"label",html:"<div class='text-red'>...</div>"}],layout:"form",closable:false,buttonAlign:"center",buttons:[{id:"Button2",text:"Fermer",listeners:{click:{fn:function(item,e){Login.clear (); Pwd.clear(); WindowError.hide();}}}}],draggable:false,padding:10,resizable:false});new Ext.Window({id:"WindowAbout",labelWidth:5,hidden:true,renderTo:Ext.get("form1"),height:200,width:350,items:[{id:"Label1",xtype:"label",html:"<div class='text-blue-normal'>...</div>"},{id:"Label2",xtype:"label",html:"<div class='text-blue-spec'>...</div>"},{id:"Label3",xtype:"label",html:"<div class='text-blue-normal'>Version : 1.0</div>"}],layout:"form",closable:false,buttonAlign:"center",buttons:[{id:"Button3",text:"Fermer",listeners:{click:{fn:function(item,e){WindowAbout .hide();}}}}],draggable:false,padding:10,resizable:false});new Ext.Window({id:"Window1",hidden:true,renderTo:Ext.get("form1"),height:420,width:450,items:{id:"TabPanel1",xtype:"tabpanel",width:400,items:[{store:this.Store1=new Ext.ux.data.PagingStore({proxyId:"Store1",autoLoad:{params:{"start":0,"limit":15}},reader:new Ext.data.JsonReader({fields:[{name:"Id"},{name:"Name"}],idProperty:"Id"}),directEventConfig:{},proxy:new Ext.data.PagingMemoryProxy({}),beforeLoadParams:fu nction(store,options){if (!options.params){options.params = {};};Ext.apply(options.params,{});Ext.applyIf(opti ons.params,{"start":0,"limit":15});}}),id:"GridPanel1",xtype:"netgrid",autoWidth:true,height:290,bbar:{id:"PagingToolbar1",xtype:"ux.paging",pageSize:15,hideRefresh:true,prependButtons:true} ,title:"Connexion",autoExpandColumn:"Name",hideHeaders:true,loadMask:{showMask:true},sm:this .RowSelectionModel1=new Ext.grid.RowSelectionModel({proxyId:"RowSelectionModel1",singleSelect:true}),stripeRows:true,view:this.Gri dView1=new Ext.grid.GridView({proxyId:"GridView1",scrollOffset:2}),selectionMemory:false,cm:this.Co lumnModel1=new Ext.grid.ColumnModel({proxyId:"ColumnModel1",columns:[{align:"center",dataIndex:"Name",header:"Client",id:"Name"}]}),directEvents:{rowclick:{fn:function(item,rowInd ex,e){var params=arguments;Ext.v1net.DirectEvent.confirmRequ est({eventMask:{showMask:true,msg:"Connexion en cours..."},control:this,action:'RowClick'});},delay:20}}},{ id:"PanelParameter",monitorValid:true,labelWidth:150,height:440,items :[{id:"Id",xtype:"hidden"},{id:"FirstName",xtype:"textfield",anchor:"100%",fieldLabel:"Nom"},{id:"LastName",xtype:"textfield",anchor:"100%",fieldLabel:"Pr?nom"},{id:"Company",xtype:"textfield",anchor:"100%",fieldLabel:"Entreprise"},{id:"FunctionInCompany",xtype:"textfield",anchor:"100%",fieldLabel:"Fonction"},{id:"Language",xtype:"combo",anchor:"100%",fieldLabel:"Langue",selectOnFocus:true,displayField:"Value",hiddenName:"Language_Value",mode:"local",queryDelay:10,selectOnFocus:true,triggerAction:"all",valueField:"Key",store:StoreLanguage,submitValue:true},{id:"Log",xtype:"textfield",anchor:"100%",fieldLabel:"Identifiant",dataIndex:"Login",readOnly:true},{id:"Password",xtype:"textfield",anchor:"100%",fieldLabel:"Mot de passe",inputType:"password"},{id:"ConfirmPassword",xtype:"textfield",anchor:"100%",fieldLabel:"Confirmer Mot de passe",inputType:"password"},{id:"Email",xtype:"textfield",anchor:"100%",fieldLabel:"Email",vtype:"email"},{id:"RegisteringDate",xtype:"datefield",anchor:"100%",fieldLabel:"Date d'enregistrement",dataIndex:"RegisteringDate",readOnly:true,vtype:"daterange",hideTrigger:true,format:"d/m/Y"},{id:"LastConnection",xtype:"datefield",anchor:"100%",fieldLabel:"Derni?re Visite",dataIndex:"LastConnection",readOnly:true,vtype:"daterange",hideTrigger:true,format:"d/m/Y"},{id:"ProfileName",xtype:"textfield",anchor:"100%",fieldLabel:"Profil",dataIndex:"ProfileName",readOnly:true}],layout:"form",buttonAlign:"center",buttons:[{id:"ButtonSave",iconCls:"icon-disk",text:"Enregistrer",directEvents:{click:{fn:function(item,e){var params=arguments;Ext.v1net.DirectEvent.confirmRequ est({userSuccess:function(response,result,el,type, action,extraParams,o){Ext.Msg.alert('Sauvegarde',' ...');},userFailure:function(response,result,el,ty pe,action,extraParams,o){Ext.Msg.alert('Erreur','. ..');},control:this});},delay:20}}}],frame:true,padding:10,title:"Mon Compte"}],activeTab:0},layout:"fit",closable:false,draggable:false,title:"Utilisateur",resizable:false});new Ext.Window({id:"Registration",hidden:true,renderTo:Ext.get("form1"),height:480,width:450,items:[{id:"RegistrationClient",xtype:"combo",anchor:"100%",fieldLabel:"Client",displayField:"Name",hiddenName:"RegistrationClient_Value",triggerAction:"all",valueField:"Id",store:StoreClient,submitValue:true},{id:"RegistrationLanguage",xtype:"combo",anchor:"100%",fieldLabel:"Langue",displayField:"Value",hiddenName:"RegistrationLanguage_Value",triggerAction:"all",valueField:"Key",store:StoreLanguage,submitValue:true},{id:"RegistrationLastName",xtype:"textfield",anchor:"100%",fieldLabel:"Nom"},{id:"RegistrationFirstName",xtype:"textfield",anchor:"100%",fieldLabel:"Pr?nom"},{id:"RegistrationCompany",xtype:"textfield",anchor:"100%",fieldLabel:"Organisme"},{id:"RegistrationFunction",xtype:"textfield",anchor:"100%",fieldLabel:"Fonction"},{id:"RegistrationEmail",xtype:"textfield",anchor:"100%",fieldLabel:"Email",vtype:"email"},{id:"RegistrationPhone",xtype:"textfield",anchor:"100%",fieldLabel:"T?l?phone"},{id:"ctl46",xtype:"container",labelAlign:"top",items:{id:"RegistrationComment",xtype:"textarea",anchor:"100%",fieldLabel:"Message",height:70},layout:"form"},{id:"RegristrationAntiBot",xtype:"container",style:"margin-bottom: 5px;",items:[{id:"ctl49",columnWidth:0.5,unstyled:true},{id:"PanelCaptcha",height:60,width:300,items:{id:"Captcha",xtype:"netimage",height:60,width:300},layout:"auto"},{id:"ctl53",columnWidth:0.5,unstyled:true}],layout:"netcolumn"},{id:"RegistrationValidation",xtype:"textfield",anchor:"100%",fieldLabel:"Validation"},{id:"ctl57",xtype:"container",items:{id:"RegistrationSuccess",xtype:"label",html:"Inscription enregistr? avec succ?s",hidden:true},layout:"form"}],layout:"form",closable:false,buttonAlign:"center",buttons:[{id:"RegistrationButton",iconCls:"icon-disk",text:"Enregistrer",directEvents:{click:{fn:function(item,e){var params=arguments;Ext.v1net.DirectEvent.confirmRequ est({eventMask:{showMask:true,msg:"Eneregistrement en cours",removeMask:true},userSuccess:function(response,re sult,el,type,action,extraParams,o){manageRegistrat ion(result.extraParamsResponse);},userFailure:func tion(response,result,el,type,action,extraParams,o) {Ext.Msg.alert('Erreur', 'Erreur non g?r?');},control:this});},delay:20}}},{id:"ctl61",iconCls:"icon-cancel",text:"Fermer",listeners:{click:{fn:function(item,e){Registratio n.hide();}}}}],draggable:false,padding:10,title:"Inscription",resizable:false});new Ext.v1net.Viewport({id:"Viewport1",renderTo:"form1",monitorResize:true,layout:"fit",listeners:{resize:{fn:resize}}});});
//]]>
</script>
</Ext.v1Net.InitScript><Ext.v1Net.InitStyle>
<link rel="stylesheet" type="text/css" href="/project_name/extjs/resources/css/ext-all-embedded-css/ext.axd?v=26213" />
</Ext.v1Net.InitStyle><Ext.v1Net.InitScript.Warning><script type="text/javascript">Ext.onReady(function(){Ext.Msg.show({title:'Warnin g',msg:'The <code>web.config</code> file for this project is missing the required DirectRequestModule.<br /><br /><div style="margin-left:48px;"><b>Example</b><br /><br /><code>&lt;system.web><br />&nbsp;&nbsp;&lt;httpModules><br />&nbsp;&nbsp;&nbsp;&nbsp;&lt;add name="DirectRequestModule" type="Ext.v1Net.DirectRequestModule, Ext.v1Net" /><br />&nbsp;&nbsp;&lt;/httpModules><br />&lt;/system.web></code><br /><br />More information available at "<a href="http://examples2.ext.net/?/Getting_Started/Introduction/Overview/">Getting Started</a>".</div><br />',buttons: Ext.Msg.OK,icon: Ext.MessageBox.WARNING});});</script></Ext.v1Net.InitScript.Warning>
</form>
</body>
</html>

Daniil
Oct 28, 2014, 5:07 PM
There are two things.

This

<script type="text/javascript" src="/project_name/WebResource.axd?d=BQ_qNswYDEBNq0xgd5atcau920jOAjI1 ZTIkUE84Zm8E9qx1zj-FM4OylR0ePmPG1J190O4cQVlRM_RdI7KTmwewwZnS9T38G3SiN ZauxFBcADu2M0k7NYTXhoR6KKkfS7YTm5OyX4JnIFuNpHV2JGh 2jzKWWsmZRz3HwTMIT801&amp;t=635496752358720000"></script>

It is the "extnet-data..." JavaScript file. Though, the URL should be something like this:

<script type="text/javascript" src="/extnet/extnet-data-js/ext.axd?v=26213"></script>

It needs to determine why it doesn't render the URL with "ext.axd".


the path has already been changed. Every Ext.Net is Ext.v1Net now.


extNetDataItem = new ClientScriptItem(
"Ext.v1Net.Build.Ext.v1Net.extnet.extnet-data.js",
"Ext.v1Net.Build.Ext.v1Net.extnet.extnet-data-debug.js",
"/extnet/extnet-data.js",
"/extnet/extnet-data-debug.js");

Are you sure the embedded path is correct here? I guess you have not renamed the "Build\Ext.Net" folder to "Build\Ext.v1Net".

Another thing is:

<Ext.v1Net.InitScript.Warning>
<script type="text/javascript">
Ext.onReady(function(){Ext.Msg.show({title:'Warnin g',msg:'The <code>web.config</code> file for this project is missing the required DirectRequestModule.<br /><br /><div style="margin-left:48px;"><b>Example</b><br /><br /><code>&lt;system.web><br />&nbsp;&nbsp;&lt;httpModules><br />&nbsp;&nbsp;&nbsp;&nbsp;&lt;add name="DirectRequestModule" type="Ext.v1Net.DirectRequestModule, Ext.v1Net" /><br />&nbsp;&nbsp;&lt;/httpModules><br />&lt;/system.web></code><br /><br />More information available at "<a href="http://examples2.ext.net/?/Getting_Started/Introduction/Overview/">Getting Started</a>".</div><br />',buttons: Ext.Msg.OK,icon: Ext.MessageBox.WARNING});});
</script>
</Ext.v1Net.InitScript.Warning>

It looks the DirectRequestModule is not attached.

slavina
Oct 28, 2014, 5:41 PM
I guess everything is ok :

15911

15921

For the second point, you can see in the webconfig that DirectRequestModule looks good.

Daniil
Oct 28, 2014, 5:58 PM
If you provide a test project, I can review. Please see 7. D):
Forum Guidelines For Posting New Topics (http://forums.ext.net/showthread.php?3440)

slavina
Oct 29, 2014, 8:26 AM
How can I send you a test of ext.v1Net?
Because my project works fine with Ext.Net (since 4 years), the error is not on the project itself but in Ext.v1Net.

Daniil
Oct 29, 2014, 10:30 AM
the error is not on the project itself but in Ext.v1Net

Yes. I just need to reproduce it locally. The test project should contain the custom Ext.v1Net.dll. I might also need all the sources to debug.

slavina
Oct 29, 2014, 11:32 AM
I sent to you on PM the source of Ext.v1Net. Do you need a sample test project?

slavina
Oct 29, 2014, 4:26 PM
It works now... I built again and again... and it works with no reason.
Next step, add Ext.Net 2.x to the project.

I have a question for this : Ext.Net 1.7 use Ext.Net.Utilities and Json, but Ext.Net 2.x use newer version... Can I use only the last version of Json and Utilities with Ext.v1Net?

Daniil
Oct 29, 2014, 4:58 PM
It works now... I built again and again... and it works with no reason.

Probably, the project was scared of the chance to be reviewed by Ext.NET team:)


I have a question for this : Ext.Net 1.7 use Ext.Net.Utilities and Json, but Ext.Net 2.x use newer version... Can I use only the last version of Json and Utilities with Ext.v1Net?

You can try. Please, just keep in mind that we didn't the the latest with Ext.NET v1, so, theoretically, issues are possible. Though, there is also a chance that everything will work flawlessly. I just cannot guarantee that.

slavina
Oct 31, 2014, 4:52 PM
Hello!

I just try to publish a first version but I have the message "Unlicensed" at the bottom page.
Should I change something?
Before we were on 1.4 and now the Ext.v1Net is built on 1.7.

Daniil
Oct 31, 2014, 5:33 PM
Maybe, the license key is not pulled from Web.config? I can suggest to search for "licenseKey" in Ext.NET sources and find the place where it is pulled from Web.config and debug.

slavina
Nov 04, 2014, 4:12 PM
To solve this problem, I just commented the code that shows the message ;)

I have a question about the fact to have both Ext.Net (v1 and v2) because I have an error (like this one link (http://forums.ext.net/showthread.php?26247-Mvc-View-Rendering-Text-Only)) and I dont know how to combine this lines with v1 and v2:


<httpModules>
<add name="DirectRequestModule" type="Ext.v1Net.DirectRequestModule, Ext.v1Net" />
</httpModules>


<httpHandlers>
<add path="*/ext.axd" verb="*" type="Ext.v1Net.ResourceHandler" validate="false" />
</httpHandlers>


<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
<modules runAllManagedModulesForAllRequests="true">
<add name="DirectRequestModule" preCondition="managedHandler" type="Ext.v1Net.DirectRequestModule, Ext.v1Net" />
</modules>
<handlers>
<add name="DirectRequestHandler" verb="*" path="*/ext.axd" preCondition="integratedMode" type="Ext.v1Net.ResourceHandler" />
</handlers>
<defaultDocument>
<files>
<clear />
<add value="default.aspx" />
</files>
</defaultDocument>
</system.webServer>

Do i have to write 2 DirectRequestModule : DirectRequestModule and DirectRequestModulev1 ?

geoffrey.mcgill
Nov 04, 2014, 4:44 PM
To solve this problem, I just commented the code that shows the message ;)

Please un-comment that code.

slavina
Nov 05, 2014, 7:21 AM
I don't understand why but I did it. I don't find any restrictions about that, sorry!
Do you have a solution for my last message? Should I have two directRequestmodule in webserver?

Daniil
Nov 05, 2014, 2:33 PM
I don't understand why but I did it. I don't find any restrictions about that, sorry!

There might be something in the license agreement:) Probably, it doesn't state that you should not remove that piece of code, though removing it means that you remove the check that you actually has the license. I assume it should not be a problem to still read the license keys (for both v1 and v2) from Web.config, is that correct?


Do you have a solution for my last message? Should I have two directRequestmodule in webserver?

I just compared the Core\DirectRequestModule.cs of v1 and v2. There is some difference. Though, this difference might be not significant to you (you decide that), so, you can probably try with the only DirectRequestModule in Web.config.

slavina
Nov 05, 2014, 3:53 PM
Ok for the first point. I think that we had a problem with the license, can you send it again by email?

For the second point, I don't understand.
I code that in the web.config :


<configSections>
<section name="extnetv1" type="Ext.v1Net.GlobalConfig" requirePermission="false"/>
<section name="extnet" type="Ext.Net.GlobalConfig" requirePermission="false"/>
</configSections>


<httpModules>
<add name="DirectRequestModule" type="Ext.v1Net.DirectRequestModule, Ext.v1Net" />
<add name="DirectRequestModule" type="Ext.Net.DirectRequestModule, Ext.Net" />
</httpModules>


<httpHandlers>
<add path="*/ext.axd" verb="*" type="Ext.v1Net.ResourceHandler" validate="false" />
<add path="*/ext.axd" verb="*" type="Ext.Net.ResourceHandler" validate="false" />
</httpHandlers>

But I can't make two line on this :



<system.webServer>
<modules runAllManagedModulesForAllRequests="true">
<add name="DirectRequestModule" preCondition="managedHandler" type="Ext.v1Net.DirectRequestModule, Ext.v1Net" />
</modules>
<handlers>
<add name="DirectRequestHandler" verb="*" path="*/ext.axd" preCondition="integratedMode" type="Ext.v1Net.ResourceHandler" />
</handlers>
</system.webServer>

With this, I have an error "Ext is undefined" on the Iframe with an Ext.Net v2.4 page.

Daniil
Nov 06, 2014, 8:23 AM
Do you think the main problem is with DirectRequestModules? I doubt "Ext undefined".

I guess the main problem is with ResourceHandlers. You attach two ResourceHandler on the same path

path="*/ext.axd"

So, I assume the only one is used for all - v1 and v2 - requests.

I am not what would be the best here. There are some options. At first, I would try not to attach ResourceHandlers at all. In this case WebResource.axd will be used and, maybe, it will be good enough. Though, I am not sure.

Interesting, what @betamax did with ResourceHandlers? You could ask him. Maybe, he answers something.

By the way, there is also an important note about DirectRequestModules.
http://forums.ext.net/showthread.php?26299&p=117881&viewfull=1#post117881

slavina
Nov 06, 2014, 9:14 AM
I will try some case and I will give you some news.

But if I replace this :



<httpModules>
<add name="DirectRequestModule" type="Ext.v1Net.DirectRequestModule, Ext.v1Net" />
<add name="DirectRequestModule" type="Ext.Net.DirectRequestModule, Ext.Net" />
</httpModules>

<httpHandlers>
<add path="*/ext.axd" verb="*" type="Ext.v1Net.ResourceHandler" validate="false" />
<add path="*/ext.axd" verb="*" type="Ext.Net.ResourceHandler" validate="false" />
</httpHandlers>

By this



<httpModules>
<add name="DirectRequestModule" type="Ext.v1Net.DirectRequestModule, Ext.v1Net" />
</httpModules>

<httpHandlers>
<add path="*/ext.axd" verb="*" type="Ext.v1Net.ResourceHandler" validate="false" />
</httpHandlers>

I don't have the "Ext is undefined" error anymore by I still have a problem on the Iframe with WebResource. So I will try to solve the problem with ResourceHandler first.

slavina
Nov 19, 2014, 8:14 AM
Hello, I'm trying to solve this problem


By the way, there is also an important note about DirectRequestModules.
link (http://forums.ext.net/showthread.php?26299&p=117881&viewfull=1#post117881)

But I don't know how to identify which version of Ext.Net the request comes from. Is there an attribute in HttpApplication or HttpRequest?

Daniil
Nov 20, 2014, 6:42 AM
Yes, that is interesting how @betamax resolved it.

I assume he did the following or similar.

If look at this file - trunk\Ext.Net\Build\Ext.Net\extnet\src\direct\Dire ctEvent.js, there is

o.headers = Ext.apply(o.headers || {}, { "X-Ext-Net" : "delta=true" });

It is a label of Ext.NET direct request. There is the same label in v1.

If change to

o.headers = Ext.apply(o.headers || {}, { "X-Ext-Net1" : "delta=true" });
or so, you should be able to determine the version inside the DirectRequestModule.

slavina
Nov 20, 2014, 3:54 PM
I already changed this parameter but the key "X-Ext-Net" is not always in the headers keys on directEvent.
Is the javascript event "beforerequest" (in DirectEvent.js) always run on directEvent? (click on a button for example).

Actually, both DirecRequestModule (v1 and v2) are run on event.

Daniil
Nov 20, 2014, 7:00 PM
I already changed this parameter but the key "X-Ext-Net" is not always in the headers keys on directEvent.

I would say any Ext.NET DirectEvent and DirectMethod request must have this header. If some request doesn't have this header, it is either not an Ext.NET DirectEvent/DirectMethod or it is a defect. We would appreciate if you provide us with a test case.


Is the javascript event "beforerequest" (in DirectEvent.js) always run on directEvent? (click on a button for example).

I would say, yes, it runs for any DirectEvent unless it is a defect.

slavina
Nov 21, 2014, 3:59 PM
I will make a test case next week but I need to send to you ext.net v1 (I dont change v2) too.

But I found that the problem is with Iframe.
I have a center panel where I change the iframe with a menu.
On the first Iframe (default one), if I have a button with a directEvent, the event throw the parameter in the header (the key 'X-Ext-Net'). But when I change the iframe (on center panel) and if I click on a button with a directEvent, there is not the key in the header.
I will try to make a simple case because I can't send my project but if you have an idea, I will try ;)

Daniil
Nov 21, 2014, 4:03 PM
I will make a test case next week but I need to send to you ext.net v1 (I dont change v2) too.

Please clarify is the problem reproducible with a regular Ext.NET build without modifications?

slavina
Nov 24, 2014, 3:39 PM
I make a simplified test case and I don't have any error (with v1 alone, v2 alone and both together).
I'll be back as soon as I find a solution.

slavina
Dec 03, 2014, 4:57 PM
After a little break, I came back on this problem.

For a directEvent on a button click (not for all directEvent, I don't understand why), I did not have the key "X-Ext-v1Net" in the headers of the request.
So i wanted to detail the request.

This is the function called on the button click:



protected void test(object sender, DirectEventArgs e)
{
Element head = X.Head();
string key = head.Page.Request.Headers.AllKeys[10];
}


In many Buttons click, I have the key="X-Ext-v1Net" but not here.
I put a " debugger" in the javascript function "beforerequest" in extnet-core.js and everything is ok, the key "X-Ext-v1Net" is added to headers every time.

So I don't know when the key disappears. Do you have an idea?
Is it in js or in c#?

When I try to make a test case, I did not find any errors.

Daniil
Dec 07, 2014, 10:52 PM
We have a guess. Is any file upload or download happening with the problematic Button? Is there a FileUploadField in the form that is submitted during the DirectEvent? Does the DirectEvent have the IsUpload="true" setting?

The "X-Ext-Net" header marker is not the only marker that might go with a DirectEvent. It is not possible to use that marker for download and upload requests. So, a hidden field marker is used in such cases. Also there might be a Flash request initiated by a MultiUpload control.

There is the following method in RequestMagager.cs I would recommend to review. It should help you to determine what to do next.

public static bool IsAjaxRequest
{
get
{
if (HttpContext.Current != null && HttpContext.Current.Request != null)
{
if (HttpContext.Current.Items["__Ext.Net.SuppressAjaxRequestMarker"] != null)
{
return false;
}

return RequestManager.HasXHeader(HttpContext.Current.Requ est) || RequestManager.HasInputFieldMarker(HttpContext.Cur rent.Request) || RequestManager.IsSwfUploadRequest(HttpContext.Curr ent.Request);
}

return false;
}
}

slavina
Dec 08, 2014, 3:02 PM
The problem has been solved by replacing "__ExtNetDirectEventMarker" by "__Extv1NetDirectEventMarker" in js and c# of the v1 version.
If I find an other conflict, I will come back here. We are testing

slavina
Dec 18, 2014, 2:01 PM
I found an other conflict with trigger (combobox, datefield,...)
When I click on the trigger, nothing appears. I have values in store (for the combobox).
I put some debugger in the source code and all the function are called (getTrigger, expand).
Do you have any idea what is the cause?

EDIT : I found that the problem comes from a custom css. With the v1.7 version, we use 3 custom css for the website but with the V2 version, there is this problem with pickers. If I comment the line where I had the css file, it works.

Daniil
Dec 21, 2014, 3:15 PM
I found an other conflict with trigger (combobox, datefield,...)
When I click on the trigger, nothing appears. I have values in store (for the combobox).
I put some debugger in the source code and all the function are called (getTrigger, expand).
Do you have any idea what is the cause?

EDIT : I found that the problem comes from a custom css. With the v1.7 version, we use 3 custom css for the website but with the V2 version, there is this problem with pickers. If I comment the line where I had the css file, it works.

Please clarify do you still need our assistance on that?

slavina
Dec 22, 2014, 10:50 AM
Yes, I do.
If I disable this line :



if (_session.Theme != null) this.Page.Header.Controls.Add(new LiteralControl("<link href='" + Request.ApplicationPath + "/Themes/css/xtheme-" + _session.Theme + ".css' rel='stylesheet' type='text/css' />"));

All pickers work.
This line works with v1.7 and there is no conflict.
Do you change something in the css rule for the picker which can make a conflict?

Daniil
Dec 22, 2014, 2:06 PM
Just to clarify: is the problem reproducible only if there is your custom CSS on the page?


Do you change something in the css rule for the picker which can make a conflict?

Hard to say. All our CSS resources are available in SVN, you could review.

Also I guess that a problem might be reproducible with a regular Ext.NET build, not with the "v1 + v2" build only?

slavina
Dec 23, 2014, 4:40 PM
Yes this is only with our custom.

I use a project with v1 and v2 :
The iframe with v1 : the css works and the dateField works.
The iframe with v2 : the css doesn't work and the dateField too.

in both case, I had this in c# in the iframe:


this.Page.Header.Controls.Add(new LiteralControl("<link href='./Themes/css/xtheme-emeraude.css' rel='stylesheet' type='text/css' />"));

Can we apply the css from v1 to v2?

Daniil
Dec 23, 2014, 5:36 PM
Can we apply the css from v1 to v2?

It depends on what exactly CSS it is.

The CSS part has been quite reworked in v2 since v1. So, the changes in your custom CSS might be required.

You can remove CSS rules step by step to narrow down the problem to some specific CSS rule(s).