Zdenek
Dec 13, 2016, 6:39 AM
OK
probably there is easier soution to that
So I have one big application written in last years using Ext.net and now I'm starting to write small application usine Ext.Mobile. I would like to have direct calls from mobile application to be called on the bigger one (so technically I want to change url of direct methods. After some fights with CORS it seems to work using simple trick:
function beforeAjaxRequest(con, options, eOpts, params,request) {
request.url = http://kilkelly/bigapplication/WindowsApp/ALAMobile.aspx";
request.headers['X-Ext-Net'] = request.headers['X-Ext-Net-Mobile'];
}
it works fine if I run mobile application using
http://kilkelly/mobileapplication
Hovewer it doe not work when I load mobile application using different cookie domain like
http://localhost/mobileapplication
Direct methods are called hovewer the authentication cookies are not passed
Note that at the end I would like to have following 3 applications
a) separate mobile application
b) mobile and web application on IIS application( this one works fine now)
c) mobile hybryd" application, packed using cordoba or xamarin accessed from localhost/mobileapplication directly on device and connecting to bigapplication on IIS
c) is bit out of scope of this discussion, if I'm sucesfull I will write details to another thread soon
probably there is easier soution to that
So I have one big application written in last years using Ext.net and now I'm starting to write small application usine Ext.Mobile. I would like to have direct calls from mobile application to be called on the bigger one (so technically I want to change url of direct methods. After some fights with CORS it seems to work using simple trick:
function beforeAjaxRequest(con, options, eOpts, params,request) {
request.url = http://kilkelly/bigapplication/WindowsApp/ALAMobile.aspx";
request.headers['X-Ext-Net'] = request.headers['X-Ext-Net-Mobile'];
}
it works fine if I run mobile application using
http://kilkelly/mobileapplication
Hovewer it doe not work when I load mobile application using different cookie domain like
http://localhost/mobileapplication
Direct methods are called hovewer the authentication cookies are not passed
Note that at the end I would like to have following 3 applications
a) separate mobile application
b) mobile and web application on IIS application( this one works fine now)
c) mobile hybryd" application, packed using cordoba or xamarin accessed from localhost/mobileapplication directly on device and connecting to bigapplication on IIS
c) is bit out of scope of this discussion, if I'm sucesfull I will write details to another thread soon