PDA

View Full Version : [CLOSED] EXT.NET and EXT.NET Mobile together



ADV
Sep 16, 2016, 11:46 PM
Hello,
it is possible in some way bring together EXT.NET and EXT.NET Mobile in the same project (visual studio 2015, and Web Forms)?

Of course I mean not together on the same page, but used in different pages.


Thank you

geoffrey.mcgill
Sep 17, 2016, 12:40 AM
It may be possible somehow, but this is not something we have tested, nor support as a feature of the Ext.NET frameworks.

unicorn64
Mar 18, 2017, 1:39 PM
Hi @ADV,
could you achieve to run Ext.Net and Ext.Net.Mobile together on same project?
we are trying on mvc project but we couldnt. i had post a topic also,
https://forums.ext.net/showthread.php?61820-Ext-Net-amp-Ext-Net-Mobile-in-same-project-ItemTag-validation-(_tkn_1)-Reference-token-(ext-net-global-icons)-was-not-found

Would you please share your experiences, which configs did you have changed?

sveins12
Jun 13, 2017, 8:18 PM
I actually got it working by setting cleanResourceUrl="false" on both configs (extnet and extnetmobile).

( And handling some conflicts in namespaces by using includes and mvc-areas )

:)

unicorn64
Jun 14, 2017, 7:19 AM
Hi @sveins12,

Thanks for your answer, let me ask you some details,
Did you faced "ItemTag validation (_tkn_1): Reference token (ext.net.global.icons) was not found." error.
Did you set cleanResourceUrl="false" to get rid of this error or something else?
Is your project WebForms or Mvc, which versions of Ext.Net.dll did you used?
Could you please post your web.config's extnet sections.

thanks for your help

sveins12
Jun 14, 2017, 3:37 PM
I am using Ext.NET 4.2 and Ext.NET.Mobile 4.1. I pointed to the DLLs directly without using Nuget package.

Here are the config sections:


<extnet scriptMode="Release" cleanResourceUrl="false" theme="Gray" sourceFormatting="false" ...
<extnetmobile scriptMode="Release" cleanResourceUrl="false" sourceFormatting="false"...


I set cleanResourceUrl="false" to avvoid something that seems like a conflict between these modules/handlers:


<system.webServer>
<modules>
<add name="DirectRequestModule" preCondition="managedHandler" type="Ext.Net.DirectRequestModule, Ext.Net" />
<add name="DirectRequestModuleM" preCondition="managedHandler" type="Ext.Net.Mobile.DirectRequestModule, Ext.Net.Mobile" />
</modules>
<handlers>
<add name="DirectRequestHandler" verb="*" path="*/ext.axd" preCondition="integratedMode" type="Ext.Net.ResourceHandler" />
<add name="DirectRequestHandlerM" verb="*" path="*/ext-mobile.axd" preCondition="integratedMode" type="Ext.Net.Mobile.ResourceHandler" />
</handlers>
</system.webServer>


It seems like Ext.NET and Ext.NET.Mobile are using different version of Newtonsoft.Json, so I had to make a binding redirect in web.config to get around it, like this:


<runtime>
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" culture="neutral" publicKeyToken="30ad4fe6b2a6aeed" />
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
</dependentAssembly>
</runtime>


I am using MVC so I haven't faced the "ItemTag" problem which you are mentioning, at least not yet, but it sounds like you have several namespaces included. Check in your "web.config"s for elements like this:



<pages>
<namespaces>
<add namespace="Ext.Net" />
<add namespace="Ext.Net.MVC" />


They will cause conflicts between Ext.NET and Ext.NET.Mobile if the descending files (forms and views) are using both mobile and classic Ext. My recommendation is to delete them first, and include the needed namespaces in your form.

sveins12
Jul 03, 2017, 4:20 PM
Now I suddenly get a bunch of these errors:

ItemTag validation (_tkn_3): Reference token (ext.net.global.script.before) was not found.
ItemTag validation (_tkn_1): Reference token (ext.net.global.icons) was not found.

I am not sure what has changed.

Did you find a work around for it?

unicorn64
Jul 04, 2017, 1:13 PM
hi @sveins12,

i still couldnt achive to get work them together,
i downloaded Ext.NET.MVC.4.2.0 and Ext.NET.Mobile.MVC.4.1.0,
i created a new fresh asp.net mvc project, added references to dlls, made web.config changes as you mentioned,
created an area for mobile.

but for example if Ext.NET.MVC Panel has Icon it gives "ItemTag validation (_tkn_1): Reference token (ext.net.global.icons) was not found." error, if i remove Panel's Icon it shows correctly.

Any idea's from Ext.Net team? any suggestions, any guidance?

I think lots of Ext.NET.Mobile users is using it for mobile interface of an existing application or develop both mobile and webUI,
i dont think they develop only mobile UI so lots of us is facing this problem, and need them to work together. am i wrong?


For now we seperated mobile and web UI and created 3 projects,
- Common base Controller project, controllers and actions, has minimum Ext.Net spesific codes with some if controls
- WebUI project, has Ext.NET.MVC based Views and controllers derived from base controllers
- Mobile project, has Ext.NET.Mobile.MVC based Views and controllers derived from base controllers