View Full Version : first try 50% success
franco
10-Aug-2016, 11:19 AM
hello
I made the first test after installed plug in using
[df4wp-webapp apppath="//df4wp.dataaccess.com/MyMusic"height=800]
and this work perfectly on my wordpress site. I can see the dataflex application on my wordpress page. That was the first step to see.
but I still not able to do the same with on my web dataflex application.
Should be possible to download the source project of one of your test demo application? so I can try to compile and run on my webserver and if it work I can understand what is wrong
I follow all steps including the changes to web.config and to optionsVerbHandles within IIs. I did all changes suggested here http://df4wp.dataaccess.com/index.php/about-dataflex-for-wordpress-plugin/
I then tried using the standard df order mobile app changing all class wpviews and wpdialogs but with same result
After all changes I tried with [df4wp-webapp apppath="//dataflex.it/WebOrderMobile_18_2"]
but the same the page remain empty.
this is the web.config I changed under apphtml the word press site is located to https://www.dinastycoin.com (https://www.dinastycoin.com/)
<httpProtocol>
<customHeaders>
<add name="Access-Control-Allow-Origin" value="https://www.dinastycoin.com" />
<add name="Access-Control-Allow-Headers" value="content-type" />
<add name="Access-Control-Allow-Methods" value="GET, POST" />
<add name="Access-Control-Allow-Credentials" value="true" />
</customHeaders>
</httpProtocol>
regards
Franco Spinella
Mike Peat
11-Aug-2016, 03:27 AM
Franco
Let's see if we can get you to 100% success ASAP! :)
Firstly, the use of a fully qualified path in the "apppath" setting (like "//df4wp.dataaccess.com/MyMusic") is only required if the webapp is running on a different server from the WordPress site. If the webapp is running on the same server as WordPress then apppath would only need to be something like: "/WebOrderMobile_18_2", or even just "WebOrderMobile_18_2" (the plugin checks that the first character is a "/" and if it is not, inserts one). So the first question is: are you running WordPress on the same server (dataflex.it) as the DataFlex webapp? (If you are, then all the CORS complexities - the web.config stuff - are unneeded.)
Mike
franco
11-Aug-2016, 04:18 AM
FrancoLet's see if we can get you to 100% success ASAP! :)Firstly, the use of a fully qualified path in the "apppath" setting (like "//df4wp.dataaccess.com/MyMusic") is only required if the webapp is running on a different server from the WordPress site. If the webapp is running on the same server as WordPress then apppath would only need to be something like: "/WebOrderMobile_18_2", or even just "WebOrderMobile_18_2" (the plugin checks that the first character is a "/" and if it is not, inserts one). So the first question is: are you running WordPress on the same server (dataflex.it) as the DataFlex webapp? (If you are, then all the CORS complexities - the web.config stuff - are unneeded.)Mike
hello Mike
my wordpress site is on a LInux web server.
in this Linux wordpress site I created a new page and add [df4wp-webapp apppath="//df4wp.dataaccess.com/MyMusic"height=800] and it work (50% that work)
Both the wordpress site and dataflex server using https: protocol
I understand that the problem is within my dataflex web server.
Something is wrong I suppose else if I think to have did everything as explained with the documentation.But my final application have undreds of views and dialog, so before I tried to modified WebOrderMobile_18_2 [df4wp-webapp apppath="//dataflex.it/WebOrderMobile_18_2"], but the page when open is empty just show me the wordpress stuff...
I think that if I can have one of the project like MyMusic to compile and run on my dataflex seb server could help to better understand what is wrong.
Mike Peat
11-Aug-2016, 08:31 AM
Franco
OK, your WordPress being on Linux is exactly the scenario that the CORS stuff is designed to cater for. It is a bit complicated (the CORS aspect, not the plugin, which is fairly simple), so I'm not surprised that you didn't get it working first time around.
About the sample sources - I don't think that would help, but in any case I will await Chip's say-so before letting you have them (or perhaps making them public) - his call, not mine.
The problem is most likely in your CORS set-up on the server with your web app on it, however when I try to load the sample you mention from your site - https://dataflex.it/WebOrderMobile_18_2/ - I get an HTTP 500 error, with DataFlex error 5120 and "Unhandled Program Error on the client" - that can't be good.
Mike
franco
12-Aug-2016, 02:14 AM
hello Mike
Yes of course https://dataflex.it/WebOrderMobile_18_2/ is stopped now I just activate it to test... My web app server is one application license, and already work with one main application. it was just to test it. but if you want to try I can reactivate it I hope Chip allow me to run 2 applications on the one application webapp license for a short time. :rolleyes: ....
...Ok it now is up you can try it
Mike Peat
12-Aug-2016, 04:35 AM
Franco
OK, I see your Web Order Mobile app working now. Leave it up for the moment while we work out this issue (Chip will not mind - I am sure :)).
First off, when I try embedding it in a WordPress page (which will not work, because you have only set it up for https://www.dinastycoin.com, but was worth looking at anyway), I get a 301 "Moved Permanently" error from the CORS "preflight" OPTIONS request, which suggests to me that the problem lies there.
Just to explain (and I cover this in more depth in this article (http://www.unicorninterglobal.com/Company-White-Papers-Cross-Origin-Resource-Sharing-CORS-816)), CORS works by the browser first making a "preflight" HTTP(S) OPTIONS request (i.e. using the OPTIONS verb, rather than GET or POST) of the remote server (the one the web app is on, in this case), the response to which tells it whether it can go ahead with allowing the remote resource to be accessed. Now one of the crucial elements in making that work is to ensure that the IIS "OPTIONS" handler is the one which actually grabs that request, which involves reordering the default sequence of the handlers within IIS. That is not something you can do by just by editing the web.config file (well technically you could, but it would be tricky, tedious and extremely error-prone, since the default hander order is not initially in there); instead you need to work in IIS Manager for the virtual directory your web app is in: in the "Features View", select the "Handler Mappings" feature; in that click on the "View Ordered List" option in the right-hand pane; in that scroll down to the "OptionsVerbHandler" entry in the list and select it, then repeatedly click "Move Up" in the right-hand pane until it is at the top (saying "OK" to the initial warning about reordering the list).
Have you done that?
If that isn't the issue, you could send me your web.config file (to mpeat at unicorninterglobal dot com) and I will look to see if I can spot anything wrong.
Mike
Chip Casanave
12-Aug-2016, 08:47 AM
Franco,
Yes, I approve your temporary use of an additional application for testing DF4WP and, thanks for jumping in and working with it!
Let me also take this opportunity to make sure that everyone understands the flexibilities we've extended for testing applications running on DataFlex WebApp Server. In 2014, we defined the server provided with DataFlex Studio license as a "Testing Server" so it could be used in a variety of real-world, pre-production testing scenarios. Below is an excerpt of the eNews article published at the time:
New entitlements available for DataFlex WebApp Server testing use
In response to customer requests for more flexible licensing to test DataFlex web applications, we are pleased to announce a change to the terms of the Software License Agreement (SLA). The section of the agreement that defines DataFlex WebApp Server testing use has been modified as follows:
The server included with the DataFlex Studio license is now called the DataFlex WebApp Testing Server
Solely for testing use, developers with a Studio license are entitled to install the Testing Server on an application tester accessible Server Instance (physical server or virtual machine)
The number of application testers that access the Testing Server is not restricted
Production use of the Testing Server is prohibited
The above is an informal summary. As always, the current SLA defines the precise entitlements, terms, conditions and use of the DataFlex WebApp Testing Server.
<end of eNews article clip>
The language specific to the use of the Testing Server is in the second paragraph of section 1.1 of the Software License Agreement (http://www.dataaccess.com/Resources/Licensing/DataFlex-License-Agreement-909).
franco
12-Aug-2016, 03:30 PM
yes I did I think right here the screen shot for the webordermobile18.2 I did the same also for my appication of course
10257
web.config file is located on apphtml folder
<httpProtocol>
<customHeaders>
<add name="Access-Control-Allow-Origin" value="https://www.dinastycoin.com" />
<add name="Access-Control-Allow-Headers" value="content-type" />
<add name="Access-Control-Allow-Methods" value="GET, POST" />
<add name="Access-Control-Allow-Credentials" value="true" />
</customHeaders>
</httpProtocol>
and after i moved up the OptionsVerbHandler internet IIs autoamtically added to the web.config all handlers access
<handlers accessPolicy="Read, Execute, Script">
<clear />
<add name="OPTIONSVerbHandler" path="*" verb="OPTIONS" type="" modules="ProtocolSupportModule" scriptProcessor="" resourceType="Unspecified" requireAccess="None" allowPathInfo="false" preCondition="" responseBufferLimit="4194304" />
<add name="rules-Integrated" path="*.rules" verb="*" type="System.ServiceModel.Activation.HttpHandler, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" modules="ManagedPipelineHandler" scriptProcessor="" resourceType="Unspecified" requireAccess="Script" allowPathInfo="false" preCondition="integratedMode,runtimeVersionv2.0" responseBufferLimit="4194304" />
<add name="xoml-Integrated" path="*.xoml" verb="*" type="System.ServiceModel.Activation.HttpHandler, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" modules="ManagedPipelineHandler" scriptProcessor="" resourceType="Unspecified" requireAccess="Script" allowPathInfo="false" preCondition="integratedMode,runtimeVersionv2.0" responseBufferLimit="4194304" />
<add name="svc-Integrated" path="*.svc" verb="*" type="System.ServiceModel.Activation.HttpHandler, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" modules="ManagedPipelineHandler" scriptProcessor="" resourceType="Unspecified" requireAccess="Script" allowPathInfo="false" preCondition="integratedMode,runtimeVersionv2.0" responseBufferLimit="4194304" />
<add name="rules-Integrated-4.0" path="*.rules" verb="*" type="System.ServiceModel.Activation.ServiceHttpHandlerF actory, System.ServiceModel.Activation, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" modules="ManagedPipelineHandler" scriptProcessor="" resourceType="Unspecified" requireAccess="Script" allowPathInfo="false" preCondition="integratedMode,runtimeVersionv4.0" responseBufferLimit="4194304" />
<add name="xoml-Integrated-4.0" path="*.xoml" verb="*" type="System.ServiceModel.Activation.ServiceHttpHandlerF actory, System.ServiceModel.Activation, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" modules="ManagedPipelineHandler" scriptProcessor="" resourceType="Unspecified" requireAccess="Script" allowPathInfo="false" preCondition="integratedMode,runtimeVersionv4.0" responseBufferLimit="4194304" />
.................................
I have also question if I use something like
<add name="Access-Control-Allow-Origin" value="https://www.dinastycoin.com" />
in my webconfig
how I can use the application in other wordpress site not just dinastycoin.com... for example. I ask that since I could test with success the demo application in a couple of different my wordpress site... How I can do the same
I need to open some view on one wordpress site and some other view on another wordpress site located also on a different linux server with different domain... but using always the same Web dataflex application. Exactly Ho I did with the Demo application open itt with success on 2 different word press site. So I know that it should be possible.
regards
Franco
franco
12-Aug-2016, 05:58 PM
I tried to read carefully your page http://www.unicorninterglobal.com/Company-White-Papers-Cross-Origin-Resource-Sharing-CORS-816 it is really well explained also how to embed the application on any word press site. it is clear.
But anyway I still cannot open the dataflex app... I unerstand that is quite complex CORS so it is clear that the problem is there.
Wim Schimmel
14-Aug-2016, 09:05 AM
Hi Franco
If you add [df4wp-webapp apppath="//df4wp.dataaccess.com/MyMusic"height=800] to your own website, is the Mymusic webapp from DA working on your website. (50% success)
So the DA mymusic app runs from every WP site with the DF4WP plugin?
I try it from a strato server and get no response from this or my own test webapp
Wim
franco
14-Aug-2016, 05:20 PM
Hello Wim
yes. with [df4wp-webapp apppath="//df4wp.dataaccess.com/MyMusic"height=800] it work .. I just installed the dataflex word press plugin on a Linux based word press. it' s ok...
I just need to can do the same with my web app ... There is something to do on my web server... setup problems I think.
Regards
Franco
Mike Peat
15-Aug-2016, 12:25 PM
Franco
Can you send me your web.config file (to mpeat at unicorninterglobal dot com) so I can have a look for what might be wrong.
Mike
franco
16-Aug-2016, 02:38 AM
You mean the web.config that is located on apphtml directory?
Mike Peat
22-Aug-2016, 01:10 PM
Yes.
Wim Schimmel
22-Jan-2017, 07:07 AM
Hi Frank
are you up to 100% , i have then same problem and stop a couple of months ago
Today i try again and check all (CORS) but still the same a empty page but only the color of my menu changed
Wim
Mike Peat
23-Jan-2017, 03:51 AM
Wim
Can you send me the web.config file from your AppHTML directory so I can take a look?
TIA
Mike
Mike Peat
24-Jan-2017, 05:53 AM
Wim
I assume that the WordPress site is at: http://www.sleutelit.nl (which I can see - nice looking site! ;)). I can see that you have a couple of the www.dataflex4wordpress.com (http://www.dataflex4wordpress.com) (or df4wp.dataaccess.com - same thing) samples working there, so the problem would indeed seem to be in your CORS set-up. Looking at that site, I see it gets redirected to just plain http://sleutelit.nl (no "www"), which of course is not the same as http://www.sleutelit.nl. Try changing that in your web.config and see how it goes. Let us know the result here please.
Mike
Wim Schimmel
24-Jan-2017, 04:18 PM
Mike,
Today I removed and add the page from the menu (wordpress) and now everything works (happy)
I changed nothing on the webapp site (my web.config was correct)
Wim
Wim Schimmel
25-Jan-2017, 02:37 AM
Hi,
The layout is different, fields are to short and buttons to big and combo not the right height
also with [df4wp-webapp apppath="//df4wp.dataaccess.com/MyMusicMobile" height=800]
Is this a wordpress css problem ?
10598
10599
10600
10602
Wim
Mike Peat
25-Jan-2017, 03:56 AM
Wim
I am afraid so - you will have to tweak CSS things (I usually do it in application.css in the AppHTML\CssStyle directory).
I can try and help, but you will have to do the CSS tweaking. I use Firefox/FireBug or Chrome/Developer Tools to look at the offending elements and dynamically fiddle with them until it looks OK, then place those changes in application.css.
Mike
Powered by vBulletin® Version 4.2.5 Copyright © 2023 vBulletin Solutions Inc. All rights reserved.