DataSnap REST problem

Hello,

I'm playing around with DataSnap REST for the first time using XE8.
I can generate a blank application with the two sample methods and call
it via browser. I get the JSON reply fine, but everytime I either close
the browser or the application I get either a WSAECONNRESET (closing the
browser, IE11) or a EIDNotConnected exception (closing the application).

So somebody is holding on to a TCP connection I guess. I think this
shouldn't happen but I don't know what to do about it.

I have a TDatamodule as ServerContainer which has just the auto
generated components and în the DSTCPServerTransport I set
KeepAliveEnablement to kaDisabled. In the DSHTTPService I set the
SessionTimeout to 1000. In the DSServerClass I set the LiveCycle to
Invocation.

Nothing did help so far. What's wrong? Which concept didn't I understand
yet?

Greetings

Markus
0
Markus
5/25/2015 11:12:26 AM
embarcadero.delphi.webservices 976 articles. 0 followers. Follow

9 Replies
1645 Views

Similar Articles

[PageSpeed] 7

Can you check if this only when you use the (IE..) browser and the DataSnap server on one machine/windows.
Try to access the Datasnap server with a browser from another device/machine on your LAN.
Also try to use another browser like Chrome or FireFox on the same machine as the DataSnap Server.
0
Robert
5/26/2015 8:47:12 AM
Am 26.05.2015 um 10:47 schrieb Robert Triest:
> Can you check if this only when you use the (IE..) browser and the DataSnap server on one machine/windows.
> Try to access the Datasnap server with a browser from another device/machine on your LAN.
> Also try to use another browser like Chrome or FireFox on the same machine as the DataSnap Server.
> 

Will do.

Greetings

Markus
0
Markus
5/26/2015 8:21:45 PM
Am 26.05.2015 um 10:47 schrieb Robert Triest:
> Can you check if this only when you use the (IE..) browser and the DataSnap server on one machine/windows.
> Try to access the Datasnap server with a browser from another device/machine on your LAN.
> Also try to use another browser like Chrome or FireFox on the same machine as the DataSnap Server.
> 

Hello,

I did a simple short test with Firefox 236 now (I had the full installer
of that lying around). That one works.

So this is another flaw of IE? Is it widely known?
Why does he keep the connection open? Does he try to optimize something
by this? (I want to understand the background of a technology which is
new to me)

Greetings

Markus
0
Markus
5/27/2015 5:36:41 PM
Hello,

now I get it with Firefox when I called the ReverseString demo function
(unaltered) and close the application a few seconds after that call
finished. In this case it's the EIDNotConnected exception.

What can this be? Is the connection from the browser still active?
Netstat doesn't show anything unusual.

Greetings

Markus
0
Markus
5/27/2015 8:31:35 PM
Hello,

now I get it with Firefox when I called the ReverseString demo function
(unaltered) and close the application a few seconds after that call
finished. In this case it's the EIDNotConnected exception.

What can this be? Is the connection from the browser still active?
Netstat doesn't show anything unusual.

The exception happens in the context of Indy's
TIdCustomHTTPServer.DoExecute method. If the AContext passed is valid it
contains data for an IPv6 connection?!

This Win7 32 Bit VM where it is running in is a plain standard setup and
the URL I try to open is
localhost:8080/datasnap/rest/tservermethods1/ReverseString/test

Greetings

Markus
0
Markus
5/27/2015 8:36:40 PM
Hello,

now I get it with Firefox when I called the ReverseString demo function
(unaltered) and close the application a few seconds after that call
finished. In this case it's the EIDNotConnected exception.

What can this be? Is the connection from the browser still active?
Netstat doesn't show anything unusual.

The exception happens in the context of Indy's
TIdCustomHTTPServer.DoExecute method. If the AContext passed is valid it
contains data for an IPv6 connection?!

This Win7 32 Bit VM where it is running in is a plain standard setup and
the URL I try to open is
localhost:8080/datasnap/rest/tservermethods1/ReverseString/test

Greetings

Markus
0
Markus
5/27/2015 8:38:48 PM
Am 27.05.2015 um 22:31 schrieb Markus Humm:
> Hello,
> 
> now I get it with Firefox when I called the ReverseString demo function
> (unaltered) and close the application a few seconds after that call
> finished. In this case it's the EIDNotConnected exception.
> 
> What can this be? Is the connection from the browser still active?
> Netstat doesn't show anything unusual.
> 
> Greetings
> 
> Markus
> 

Hello,

another test seems to indicate that this exception is only shown if run
with debugging. If I run the exe from outside the IDE it looks like it
is simply swallowed for good by it.

While I can live with it I don't think this is a really good design
though. I'm still eager to learn why this happens etc.

Greetings

Markus
0
Markus
5/27/2015 8:44:53 PM
Hello Markus,

 
> now I get it with Firefox when I called the ReverseString demo function
> (unaltered) and close the application a few seconds after that call
> finished. In this case it's the EIDNotConnected exception.
Is FireFox on the same machine as DataSnap?

I think IE is hooking into the WinOS in a special way and DataSnap also.

I never had a problem when the Browser is on another machine but
I also wondered about the error when using IE and DataSnap on the 
same machine/WinOS.

Maybe Remy knows something about this as an Indy expert!?
0
Robert
5/28/2015 3:31:37 PM
Am 28.05.2015 um 17:31 schrieb Robert Triest:
> Hello Markus,
> 
>  
>> now I get it with Firefox when I called the ReverseString demo function
>> (unaltered) and close the application a few seconds after that call
>> finished. In this case it's the EIDNotConnected exception.
> Is FireFox on the same machine as DataSnap?
> 
> I think IE is hooking into the WinOS in a special way and DataSnap also.
> 
> I never had a problem when the Browser is on another machine but
> I also wondered about the error when using IE and DataSnap on the 
> same machine/WinOS.
> 
> Maybe Remy knows something about this as an Indy expert!?
> 

Hello,

FF is on the same machine: my development VM.

Greetings

Markus
0
Markus
5/28/2015 6:25:34 PM
Reply:

Similar Artilces:

Delphi XE2/DataSnap problem
I have run into a problem that completely mystifies me: An application that worked ok in Delphi XE fails in XE2 in a most peculiar way. A simple SaveToFile for a TComboBox which normally works ok fails if attempted after data transfer using DataSnap callback has been done to the owning module. The data transfer (of a StringList) does not relate to the combobox in any way, The error message is"Exception class $C0000005 with message 'access violation at 0x00000000: read of address 0x00000000". On the net I have found numerous notes of "class $C0000005" errors in XE2 but...

Delphi XE / Datasnap / https problem?
Hello, I have a working Datasnap application connected on an IIS website on http. The server has a officially signed SSL certificate and I changed the CommunicationProtocol of my connexion to https. Now when I try to communicate with the server (the connexion is established) I got an: EIdOSSLUnderlyingCryptoError "Error Connecting with SSL." Error: 1408F10B: SSL Routines:SSL3_GET_RECORD:wrong version number I also tried to connect directly to the https web page in a browser and nothing seems wrong. Thank you for your help! Eric Hi Eric, > I have a working D...

Delphi DataSnap/REST CURD for database
any good example of delphi datansap Curd like IBMastApp so we can easly understand functionality of datasnap server. Currentlyonly one or two example running all over the world Echostring or ReverseString. is that sufficiant for understand datasnap /REST server ? ...

Problems Consuming Delphi 2010 Webservices
Hi there, i created a simple test webservice in delphi 2010 and published it on an IIS Webserver. By consuming the wsdl in various clients (c#-client, intalio, soap-ui) there are a couple of problems. The +soapenc:arraType+ can not be found and so i can not consume my webservice with this clients. Consuming the wsdl by a delphi client works very well. To compare the wsdl files i created the same web service in visual studio 2010 (c#). Here the arrayType is supported and i can consume the wsdl in various clients. The functions of both web services are exactly the same. For comparison her...

PROBLEMS, PROBLEMS, PROBLEMS.
Name: Product: Firefox Summary: PROBLEMS, PROBLEMS, PROBLEMS. Comments: Does Google's Chrome browser block out Firefox? Am having a lot of trouble getting Firefox to run after I run Chrome. No trouble what-so- ever before running Chrome. Browser Details: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/532.5 (KHTML, like Gecko) Chrome/4.1.249.1064 Safari/532.5 From URL: http://hendrix.mozilla.org/ Note to readers: Hendrix gives no expectation of a response to this feedback but if you wish to provide one you must BCC (not CC) the sender for them to see ...

Problems Problems Problems
So, I have OpenSUSE installed on my laptop and everything is working well, except the wireless. It almost seems that every time I run a KDE distro I can not get the internet to work. I've run YaST and used iwconfig. nothing is working for me. Please help -ZAD -- zadnik18 ------------------------------------------------------------------------ someone is going to tell you to supply some more information 'My wireless doesn't work - a primer on what I should do next - openSUSE Forums' (http://tinyurl.com/6peanc) this is one of the stick...

Problems, problems, problems
Name: Product: Firefox Summary: Problems, problems, problems Comments: I use FF all the time for work - I'm a software tester - the add-ons are invaluable. But v3.5 really has been a disappointment. It just keeps hanging all the time. And when Internet Explorer windows pop up, FF often just dies. It can't even restart itself - I have to manually kill the process every time; every update, every add-on that updates, "restart" fails - it's so frustrating. I hope v3.6 will be addressing this - PLEASE! Browser Details: Mozilla/4.0 (compatible; MSIE 7....

Linking problem Delphi Android DataSnap Midas
Hey, I have this error when I compile my project under XE5. Previously worked. Probably some update is the problem. [DCC Error] E2597 C:\Users\Public\Documents\RAD Studio\12.0\PlatformSDKs\android-ndk-r8e\toolchains\arm-linux-androideabi-4.6\prebuilt\windows\bin\arm-linux-androideabi-ld.exe: error: cannot find -lstlport_static C:\Users\Public\Documents\RAD Studio\12.0\PlatformSDKs\android-ndk-r8e\toolchains\arm-linux-androideabi-4.6\prebuilt\windows\bin\arm-linux-androideabi-ld.exe: c:\\program files (x86)\\embarcadero\\rad studio\\12.0\\lib\\Android\\Release/libmidas.a(alchemy.o): in f...

Problems problems and problems.
Name: A.A. Product: Firefox Summary: Problems problems and problems. Comments: I am not specific, but in short I can not use This site to listen music anymore, while I can in IE explorer. Just to let you guys know, new version messed something up. http://hypem.com/ Browser Details: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.0.5) Gecko/2008120122 Firefox/3.0.5 From URL: http://hendrix.mozilla.org/ Note to readers: Hendrix gives no expectation of a response to this feedback but if you wish to provide one you must BCC (not CC) the sender for them to see it. ...

Problems, problems, problems
Name: Hans Halvorsen Email: capricorn_at_online.no Product: Thunderbird Summary: Problems, problems, problems Comments: Hi, I downloaded Thunderbird some time ago, and I was over-satisfied whit it and how well it worked. In fact it worked 100% PERFECTLY UNTIL I got an newer update version of it. Since then I' ve had nothing BUT trouble! I've checked adresses, notes, password, deleted accounts and made new one's, checked sign-ins and sign-outs, passwords inside and out, upside and down, so many times that my frustration now is about to turn into pure and major ...

How to use TDateTime parameters in Delphi XE5 DataSnap Rest
Hi all I create a Delphi XE5 DataSnap Rest server (using FireDac components). All working ok so far except RECEIVING TDATETIME as parameter. After some research I understand that this Type of Data is not usable in DataSnap (at least direct). So I want to make a basic function like this: InsertCustomer(aID : Integer; aDateOfBirth : TDateTime) : Integer; How can I make this function because I cannot use the TDateTime... My idea (request) is to put something similar(identic) with the field that is exported from TDataSet. when a column TDateTime from a TDataSet is exported is lik...

How to access .NET WCF REST webservice from Delphi XE?
Hi, I have built a Visual Studio .NET WCF RESTful webservice with C#. I also added SSL encryption (HTTP/S) and user authorization. From browser I can Access the Server. Now I want to access that Server from a Delphi XE Client application, too. I tried the DataSnap REST Client modul, but I cannot connect ("socket error 10054 - Socket was resetted by peer"). Maybe the Delphi wizzard expects DataSnap possibilities which of course are not included in my Standard .NET Server? So, how can I access it? Does anybody know? Regards, Patrick > {quote:title=Patrick Krause wr...

Delphi xe datasnap rest server and serverside scripting
Hi all, I'm trying to use serverside scripting using the standard datasnap rest server produced automatically by Delphi but I can't figure out how to do that. Here is what I do: I create a new DataSnap Rest Application (standalone vcl app.) with all the standard choices selected. After that I want to change the ReverseString.html code so that it writes (for example) "hello word" To do that I Insert inside the html file the following script: <%= hello word %> I also set the scriptengine field of the pageproducer of the html page to the Jscript value (so that it...

C++ Builder XE3 SP1 DataSnap REST Application problems and solutions [Edit]
Created new DataSnap REST Application with latest C++ Builder XE3 SP1 Trial: got errors at runtime: 1. Start, Open Browser: "Project DSREST1.exe raised exception class TDSProxyException with message 'No proxy meta data'." (at TWebModule1::WebFileDispatcher1BeforeDispatch) Reason: WebModule component "DSServerMetaDataProvider1" property "Server" was not set by DataSnap REST Application Wizard (same with Delphi XE3 Trial). Solution: added DSServerMetaDataProvider1->Server = DSServer(); Setting DSServerMetaDataProvider1 Server property at design...

Web resources about - DataSnap REST problem - embarcadero.delphi.webservices

Companies Directory - Job Fusion
D1 Locker D2L D4D Technologies DAA Deutsche Auftragsagentur Dabble Dabble DB Dabee Dabizmo DabKick Dabo Health Dacentec Dachis Group ...

Embarcadero Webinars
Advanced software tools for application developers and database professionals. Cross-platform solutions for database design, development and ...

David I - Head is in the cloud, feet planted firmly in the ground
... I’s (David Intersimone) Embarcadero blog about programming, languages, databases, history, and more. , and filed under Cloud Computing , DataSnap ...

RAD Studio 2015 Roadmap
Rad Studio, Delphi, C++Builder, and Appmethod 2015 Technology Roadmap from JT at EmbarcaderoTechnologies

FireMonkey Q&A
Questions and answers from a FireMonkey webinar

Contact Us - Ginktage
Home Privacy Policy Contact Us Home .NET Events Microsoft Office SQL Server Tools Gadgets Technology Tips&Tricks Contact Us Ginktage Learn , ...

News Briefs: December 15, 2008 - SD Times: Software Development News
AccuSoft creates an SDK for Web imaging software, while Artisan releases a free version of Artisan Studio. Also, Bredex, Embarcadero, Ilog and ...

Craig Stuntz’s Weblog : Site Map
Craig Stuntz’s Weblog F# • Compilers • Programming Languages • Functional Programming • Web Skip to content Home About Site Map Site Map Share ...

iBeacon Hack Makes It More Efficient To Wait Tables
Here at the 2014 TechCrunch Disrupt SF hackathon two-man hack team, Ray Ho and Mark Watson, showed off a simple but promising concept that combines ...

Te Waka o Delphi · Poll Archives
Keeping Delphi afloat in Aotearoa

Resources last updated: 11/29/2015 3:14:37 AM