Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 10 of 11 total
Thread HTTP_None
Thu, Sep 3 2015 2:34 AMPermanent Link

Petter Topp

My server module receives a request from TServerRequest and do it's processing and finally sends a a response using  Request.SendContent(Result).

The Result string is not empty, but at the client side I just get HTTP_None (0)
I'm lost, what am I missing?

This setup was originally written using EWB1 and corresponding server module version. I have now rewritten (copy/paste) the project using EWB 2.01 software.

Br
Petter
Thu, Sep 3 2015 3:56 AMPermanent Link

Walter Matte

Tactical Business Corporation

I don't think anyone could answer this without see code.  But have you tried running Fiddler to watch the HTTP traffic to actually see the string being returned?

If you don't I would start by checking server code.

Walter
Thu, Sep 3 2015 4:30 AMPermanent Link

Petter Topp

Walter Matte wrote:

I don't think anyone could answer this without see code.  But have you tried running Fiddler to watch the HTTP traffic to actually see the string being returned?

If you don't I would start by checking server code.

Walter


Hi Walter.

Your suggestion is perfect, I was stuck...
I have started Fiddler, but I'm a novise, however, here is what I can see:

In the large window to the left (requests?), I could see my request was sent.
When I select the request, I can see the querystring in the webforms pane.
If I click the TextView pane in the lower right window, I can see the response I was expecting.

As far as I can tell thing seem to work, only I don't get any response in the OnComplete event for the TServerRequest.

Any ideas?
Thu, Sep 3 2015 4:41 AMPermanent Link

Matthew Jones

Petter Topp wrote:

> If I click the TextView pane in the lower right window, I can see the
> response I was expecting.
>
> As far as I can tell thing seem to work, only I don't get any
> response in the OnComplete event for the TServerRequest.

Okay, next step is to use the F12 debug tools in Chrome to watch the
traffic. You can also single step the javascript if you want, which
will match the EWB code quite nicely. One thing I've done in the past
is put "myVar := 'FINDME'" in key functions, and then you can find that
in the debugger and put in a breakpoint.

--

Matthew Jones
Thu, Sep 3 2015 5:20 AMPermanent Link

Petter Topp

"Matthew Jones" wrote:

Petter Topp wrote:

> If I click the TextView pane in the lower right window, I can see the
> response I was expecting.
>
> As far as I can tell thing seem to work, only I don't get any
> response in the OnComplete event for the TServerRequest.

>> Okay, next step is to use the F12 debug tools in Chrome to watch the
>> traffic. You can also single step the javascript if you want, which
>> will match the EWB code quite nicely. One thing I've done in the past
>> is put "myVar := 'FINDME'" in key functions, and then you can find that
>> in the debugger and put in a breakpoint.

>>--

>>Matthew Jones

Ok - Started Chrome debug tool. Selected the Console Pane and found the following:

XMLHttpRequest cannot load http://192.168.207.29/modules/Admin?Action=Login&Name=Petter&Pass=password. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost' is therefore not allowed access.

Not sure what this means, but things are working when I deploy to my server.

Duh. Second post in two days that makes me feel quite lost...

Petter
Thu, Sep 3 2015 7:59 AMPermanent Link

Matthew Jones

Petter Topp wrote:

> No 'Access-Control-Allow-Origin' header is present on the requested
> resource.

Once you are into the browser sphere of operation, you have a world of
resources to help you, as you can just google the errors etc, and
anyone else with this in javascript land will be able to help you. Have
a look at
http://stackoverflow.com/questions/20035101/no-access-control-allow-orig
in-header-is-present-on-the-requested-resource which explains why this
is happening - you are accessing one server from another, and that is a
security issue. Thus you have to take steps to allow it, or just run
from your main server all the time.

--

Matthew Jones
Thu, Sep 3 2015 8:06 AMPermanent Link

Uli Becker

Wrong thread, Matthew Smile

Uli
Thu, Sep 3 2015 8:09 AMPermanent Link

Uli Becker

Sorry Matthew, my newsreader's treeview was obviously messed up.
Your post appeard in another thread.

Uli
Thu, Sep 3 2015 8:26 AMPermanent Link

Matthew Jones

Uli Becker wrote:

> Sorry Matthew, my newsreader's treeview was obviously messed up.
> Your post appeard in another thread.

It appeared okay in mine, but if not in others, apologies. I just
replied as usual in XanaNews.

--

Matthew Jones
Thu, Sep 3 2015 9:10 AMPermanent Link

Raul

Team Elevate Team Elevate

On 9/3/2015 5:20 AM, Petter Topp wrote:
> Ok - Started Chrome debug tool. Selected the Console Pane and found the following:
> XMLHttpRequest cannot load http://192.168.207.29/modules/Admin?Action=Login&Name=Petter&Pass=password. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost' is therefore not allowed access.

This error is also Chrome internal and not surfaced for javascript -
hence the http_none

> Not sure what this means, but things are working when I deploy to my server.

It means that EWB app and data are coming from different sources (for
example different servers (in terms of host name) or even if on same
host the ports are different.

With server you either load the EWB app and data from same source (same
host + port) or your server includes the

> Duh. Second post in two days that makes me feel quite lost...

This has been discussed in newsgroups (Search for
Access-Control-Allow-Origin) but in general your server where data comes
from has to return a Access-Control-Allow-Origin header for this to work.

When using EWB Web Server then setting on Content page "Enable
Cross-Origin Resource Sharing" does it for you for there.

Raul
Page 1 of 2Next Page »
Jump to Page:  1 2
Image