Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 10 of 24 total
Thread Trying to deploy app
Sun, Mar 10 2013 10:13 PMPermanent Link

Jeff Newlin

Lightspeed

I've written a simple database app using an EDB database. I am running the LocalWebServer on port 8080 since I get an error message for port 80. When I run my project in the IDE it shows the URL http://localhost:8080/newdb.html - everything works when I run it in the IDE. I deployed the app using the "copy" method. The dataset component is named UTest1

Now I need to see it run on an actual sever. I have a virtual server from Amazon EC2 that I'm testing this with.  I copied all of the files created in the deployment to my virtual server and put them into my c:\inetpub\wwwroot folder.  There is also a "themes" folder that is copied there too.

Then I uploaded the datafiles to the virtual server and put them into a folder called c:\inetpub\wwwroot\data  
I started EWBSrvr and and add the data set (called UTest) and set it's configuration path to C:\inetpub\wwwroot\data   - I click on "Test Connection" and  it says the connection is good.

When I finally try it out through the web it loads my page nicely but when it goes to the line of code that says

DataBase.Load( DataForm.UTest1 ) ;

The Application Error says "404-File or directory not found. The resource you are looking for might have been removed.. etc" - and I get no data.

Maybe I don't quite understand the EWBsrver.exe file - I thought it would be supplying the data for the "load" method.

Or something else?

Thanks for your help!

jeff
Mon, Mar 11 2013 1:46 PMPermanent Link

Raul

Globestar Systems

Team Elevate Team Elevate

Jeff,


On 3/10/2013 10:13 PM, Jeff Newlin wrote:
> I've written a simple database app using an EDB database. I am running the LocalWebServer on port 8080 since I get an error message for port 80.
Just means you have somethign else already listening on port 80 (either
a web server or skype etc)


> Now I need to see it run on an actual sever. I have a virtual server from Amazon EC2 that I'm testing this with.  I copied all of the files created in the deployment to my virtual server and put them into my c:\inetpub\wwwroot folder.  There is also a "themes" folder that is copied there too.
OK - so you're planning to use IIS as the web server to serve up your
EWB app files (JS and HTTP).


> Then I uploaded the datafiles to the virtual server and put them into a folder called c:\inetpub\wwwroot\data
i personally would not do that since now you've made the files web
accessible direct from web browser (unless you specifically protected
the data subfolder).

All you're  really trying to accomplish is publish the data using
EWBServer so only EWBServer needs access to data files (so put them in
c:\data or such non web published location).

> I started EWBSrvr and and add the data set (called UTest) and set it's configuration path to C:\inetpub\wwwroot\data   - I click on "Test Connection" and  it says the connection is good.

OK - is the EWBSrvr listing on 8080 on this case as well ?


> When I finally try it out through the web it loads my page nicely but when it goes to the line of code that says
>
> DataBase.Load( DataForm.UTest1 ) ;
>
>   The Application Error says "404-File or directory not found. The resource you are looking for might have been removed.. etc" - and I get no data.

My 1st thought would be that your app is trying to load the data from
ISS side of things (from port 80) and not using EWB (8080 or whatever
port it's on).

> Maybe I don't quite understand the EWBsrver.exe file - I thought it would be supplying the data for the "load" method.

It's a web server that knows hot to respond to the dataset commands so
yes. However make sure your app uses the proper URL to get to EWB server
instead of it's own server.
In your case it's also technically cross domain scripting so make sure
you enable "Enable Cross-Origin Resource Sharing".

Or you can just use EWBServer to serve up everything - it can server up
both your app and data as it is a full web server

Raul
Mon, Mar 11 2013 3:28 PMPermanent Link

Matthew Jones

>  or skype etc)

I cannot understand why skype should ever be listening on port 80, other than being
incredibly cheeky. I disabled this new functionality in it. Terrible behaviour.

/Matthew Jones/
Mon, Mar 11 2013 3:55 PMPermanent Link

Jeff Newlin

Lightspeed

Thank you very much for the help

I moved my data folder as you suggested - thath makes a lot of sense.

I checked the "listening on" port of the EWNsrvr and it shows 8080

I enabled the Cross Orgin resources.

I'm still getting the same result so I'm suspecting that my app is not using port 8080 to make the connection to the EWBsrvr - and I don't know how to tell it to use port 8080 (I'm the biggest of web newbies here).

How do I tell it to use 8080 with  my app? The internlal webserver seems to stick a :8080 in the url - is that how or is it set somehow in the IDE?

Thanks again!
JEff
Mon, Mar 11 2013 4:10 PMPermanent Link

Raul

Globestar Systems

Team Elevate Team Elevate

Jeff,

Assuming it's 8080 on same host you can just modify the baseURL before
you call load:

For example something like this in your code:

Database.baseURL := 'http://'+ window.location.host+ ':8080/datasets/;
Database.load(myDS);

(you might need to experiment a bit as this is from memory)

Raul

On 3/11/2013 3:55 PM, Jeff Newlin wrote:
> Thank you very much for the help
>
> I moved my data folder as you suggested - thath makes a lot of sense.
>
> I checked the "listening on" port of the EWNsrvr and it shows 8080
>
> I enabled the Cross Orgin resources.
>
> I'm still getting the same result so I'm suspecting that my app is not using port 8080 to make the connection to the EWBsrvr - and I don't know how to tell it to use port 8080 (I'm the biggest of web newbies here).
>
> How do I tell it to use 8080 with  my app? The internlal webserver seems to stick a :8080 in the url - is that how or is it set somehow in the IDE?
>
> Thanks again!
> JEff
>
Mon, Mar 11 2013 10:41 PMPermanent Link

Jeff Newlin

Lightspeed

>>Raul wrote:

>>For example something like this in your code:

>>Database.baseURL := 'http://'+ window.location.host+ ':8080/datasets/;
>>Database.load(myDS);

Well I think I'm in the ballpark. I used this example and  the message it's returning is is different :

Uncaught Error:Dataset load response error.
Line:5128

But I can tell that it did make contact with the EWBsrvr in that I when I try to turn the EWBsrvr off I get the message "There are active connections and stopping the Elevate Web Builder Web Server will terminate these connections....."

So I guess I'm making contact with it at least.

ALso noticed that I get the same message "Uncaught error:dataset load response error" whether I have the EWBsrvr running or not.

It's got me Vexed to be so close. In the forums it says to keep the BaseURL relative to folder the app is in and I tried setting the base url =  ':8080/datasets'   but I get back the ol' error 404 as before.

Guess I could work the other way and try to figure out what's blocking port 80 and see if that works any better?

Looking forward to being able to get at this data!
Jeff
Tue, Mar 12 2013 12:37 AMPermanent Link

Raul

Globestar Systems

Team Elevate Team Elevate


Jeff,

> But I can tell that it did make contact with the EWBsrvr in that I when I try to turn the EWBsrvr off I get the message "There are active connections and stopping the Elevate Web Builder Web Server will terminate these connections....."

I took a quick look and you should not include the forward slash since
the load method actually adds it as well as dataset name so try

Database.baseURL := 'http://'+ window.location.host+ ':8080/datasets';

as that should work.


To test that EWBsrvr works try accessing the EWBsrvr data from browser.
The URL is

http://<server ip>:8080/datasets/<datasetname>?method=rows

(e.g. http://localhost:8080/datasets/Customer?method=rows)


> It's got me Vexed to be so close. In the forums it says to keep the BaseURL relative to folder the app is in and I tried setting the base url =  ':8080/datasets'   but I get back the ol' error 404 as before.

You cannot really use relative path since you're using different web
server in this case.

Raul
Tue, Mar 12 2013 4:17 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Jeff,

<< How do I tell it to use 8080 with  my app? The internlal webserver seems
to stick a :8080 in the url - is that how or is it set somehow in the IDE?
>>

See Raul's response about the BaseURL for your application.

However, as an added mention: if you want to run your application against
that external web server in the IDE, just make sure to register it as a new
web server in the Environment/Options dialog (Web Servers tab):

http://www.elevatesoft.com/manual?action=viewtopic&id=ewb1&topic=Environment_Options

and then select it in the IDE using the web servers combo box on the main
toolbar.  After that, when you hit the F9 key to run the application, EWB
will run the application from the external web server instead of the local
web server.  If you want to have the application automatically deploy also
(after compilation, but before the run), then just be sure to set up the FTP
deployment in the Project/Options dialog (Deployment tab):

http://www.elevatesoft.com/manual?action=viewtopic&id=ewb1&topic=Project_Options

Just make sure the Deploy on Run check box is checked.

If you have any other questions, please let me know.

Tim Young
Elevate Software
www.elevatesoft.com
Wed, Mar 13 2013 3:04 AMPermanent Link

Jeff Newlin

Lightspeed

Thanks very much for all the help guys - I've got it communicating and I think I understand how it's supposed to work. Right now I can finally see my data - just getting a "commit  error" when I try to update it - works if I run it locally (of course!) - but I'll work on that for a bit. I'm pretty excited to get this far tonight! Thanks for the information !
Wed, Mar 13 2013 4:46 AMPermanent Link

Jeff Newlin

Lightspeed

After a few more hours I got it all working. A fun experience for me. I played around with changing the IIS "webserver" to a different port (it  doesn't seem to want me to remove or disable it) - then I changed EWBsrvr to port 80 and set the content folder - and that seems to make things easier. But I'm glad to finally understand it !!

Very happy with EWB - thanks again!
Jeff
Page 1 of 3Next Page
Jump to Page:  1 2 3
Image