Quantcast
Channel: Remoting SDK - RemObjects Talk
Viewing all 1575 articles
Browse latest View live

Is it possible to add a second server channel to a code-first project?

$
0
0

@toddmgochronic wrote:

HI,

I have an existing code-first Data Abstract sever I was wondering how I could setup additional ServerChannel's? For instance an additional one that could incorporate SSL\TLS. This is what I am working with:

    public static int Main(string[] args)
    {
        ApplicationServer server = new ApplicationServer("MyRODAServer");
        //
        // Some optional setup for your server:
        //

        // TLS
        //server.AutoCreateSelfSignedCertificate = true;                         // Create a certificate on first run
        //                                                                       // Self-signed certificates are rejected by default so additional code
        //                                                                       // might be needed client-side to properly handle them. Please refer to
        //                                                                       // https://docs.remotingsdk.com/Clients/Tasks/HandlingSelfSignedCertificates/
        //                                                                       // for more details
        //server.NetworkServer.UseTLS = true;                                    // Enable traffic encryption
        //server.NetworkServer.CertificateFileName = "</path/to/certificate>";   // Optionally, load certificate from file
        //server.NetworkServer.CertificateThumbprint = "XX XX XX ...";           // or load certificate with provided thumbprint from the system certificate store
        //server.NetworkServer.Certificate = <certificate instance>              // or load certificate from elsewhere and provide it directly

        server.NetworkServer.ServerChannel = new IpHttpServerChannel();
        server.NetworkServer.Port = 8099;
        server.NetworkServer.ServerMessages[0].Envelopes.Add(new RemObjects.SDK.AesEncryptionEnvelope(@"45454545"));

	server.Run(args);
     }

Please advise.

Posts: 3

Participants: 1

Read full topic


A general question about maintenance/extending functionality of a service

$
0
0

@parsecstrap wrote:

Hello,

assumed I have a running service. And it is being accessed continuously, i.e. there are some writing operations into a database which can't be interrupted.

What is the best practice to take out this service for a maintenance or extending functionality?
How could I say to the service to reject the incomming connections and at the same time to execute the running operations until the end?

Is it possible in the SDK to see the number of connected clients?

Thank you for your help!

Best regards!

Posts: 2

Participants: 1

Read full topic

Recovery from disconnect

$
0
0

@Mark_Sulkowski wrote:

How well does (or can) Remoting SDK recover from a server disconnect? Let's say that the server app is killed? Or that someone pulls out a network Cable?

It looks like there is some sort of heartbeat feature, but is there any sort of Disconnect event that a client may subscribe to? Perhaps some Reconnect feature if the heartbeat discovered an unavailable server? And how does that work? Are there any examples anywhere?

Posts: 2

Participants: 1

Read full topic

Remoting SDK Project source codes lost some files

$
0
0

@XIE_FANG wrote:

In Remobjects.SDK.2015 Solution, I can't found below files, How can I get its?

RemObjects.SDK.Server.2015/Attributes/DocumentationAttribute.cs
RemObjects.SDK.2015/RemObjects.SDK.2012.ruleset

Posts: 2

Participants: 1

Read full topic

RemObjects SDK Beginners Guide -- no server channel components?

$
0
0

@Mark_Sulkowski wrote:

I've been following the "crash course" example in RemObjects SDK Beginners Guide (for .NET), and everything works well until step 7 of Server Application.

It tells me to add components to my server application form. I was able to add BinMessage without any troubles. It is easily seen in the component list for RemObjects SDK. However, I don't see any ServerChannel components.

For instance, I see "IpHttpClientChannel", but not "IpHttpServerChannel".

Could I have done something wrong? I think that I've followed every instruction step by step.

Posts: 4

Participants: 1

Read full topic

IXMLNode.GetNodeByName does not return the node

$
0
0

@jveatch wrote:

Hi,

We recently upgraded from version 3 to version 9 of the Remoting SDK (I know...large jump :slight_smile:). Anyway, the behavior of IXMLNode.GetNodeByName has changed. It is no longer returning a node like it used to. I've been able to track this down to the new version of MSXML that is being used (6.0). Previously it was using 3.0. It has to do with how namespaces are handled now. There is a good explaination of this same problem that exists in C# at https://msdn.microsoft.com/en-us/library/h0hw012b(v=vs.110).aspx#Anchor_2.

Is there anyway to get this working in Delphi with RemObjects? I don't see a way to give the default namespace a prefix to use when calling GetNodeByName.

Thanks for the help!

Posts: 4

Participants: 2

Read full topic

RoSDK 9.1.99.1273

ServiceBuilder License Dowload not Working


Extended File Transfer Threads[i].Resume Deprecated

$
0
0

@kbripleyindcom wrote:

An excerpt from the Extended File Transfer of the download button click on the client is included below. I have copied the methods from the sample into my application and have been using them successfully for some time. However, the example uses Threads[i].Resume. From the delphi help:

Warning: The Resume and Suspend methods should only be used for debugging purposes. Suspending a thread using Suspend can lead to deadlocks and undefined behavior within your application. Proper thread synchronization techniques should be based on TEvent and TMutex.

Has anyone updated the example to be based on TMutex? Or do I not need to worry about the deprecated warning? I realize that I could educate myself and figure this out on my own, but it would save me many hours if I could leverage the knowledge of someone with more expertise in this area. Thanks in advance.


procedure TClientForm.btDownloadClick(Sender: TObject);
var
  threads: array of TDownloadThread;
  numThreads: integer;
  i: integer;
  curChunk: integer;
  chunkCount: integer;
  allDone: boolean;
begin
  if not Assigned(lvFileList.Selected) then ShowMessage('Please select a file!')
  else begin
    edLog.Lines.Clear;
    fOutFile := TFileStream.Create(lvFileList.Selected.Caption, fmCreate);
    try
      chunkCount := StrToInt(edChunkCount.Text);
      numThreads := StrToInt(Trim(edThreadCount.Text));
      if numThreads <= 0 then numThreads := 1;
      SetLength(threads, numThreads);
      curChunk := 1;

      LogMessage('Starting download process...');
      SetControlsEnabled(false);

      for i := 0 to numThreads - 1 do begin
        if curChunk <= chunkCount then begin
          threads[i] := TDownloadThread.Create(i + 1, lvFileList.Selected.Caption,
            curChunk, GetPartSize, edTargetURL.Text);
          inc(curChunk);
          {$IFDEF DELPHI2010UP}
          threads[i].Start;
          {$ELSE}
          threads[i].Resume;
          {$ENDIF}
        end
        else threads[i] := nil;
      end;

      // Loading chunks using available threads in the pool
      while curChunk <= chunkCount do begin
        for i := 0 to numThreads - 1 do
          if Assigned(threads[i]) and threads[i].Done then begin
            threads[i].Free;
            threads[i] := nil;
            if curChunk <= chunkCount then begin
              threads[i] := TDownloadThread.Create(i + 1, lvFileList.Selected.Caption,
                curChunk, GetPartSize, edTargetURL.Text);
              inc(curChunk);
              {$IFDEF DELPHI2010UP}
              threads[i].Start;
              {$ELSE}
              threads[i].Resume;
              {$ENDIF}
            end;
          end;
        if curChunk <= chunkCount then Application.ProcessMessages;
      end;

Posts: 6

Participants: 4

Read full topic

Mono/Xamarin iOS - ipv6 problems

$
0
0

@smethnersalesp wrote:

Hello everyone,

our App got rejected by Apple today because it is not working with ipv6. After a bit of research i have the feeling that it comes down to WinInetHttpClientChannel.

We have the following setup:
Xamarin iOS project. The iOS project references a project where we have all references to RemObjects libraries etc. To reproduce the problem be sure that the device is in an ipv6 environment. (https://developer.apple.com/library/content/documentation/NetworkingInternetWeb/Conceptual/NetworkingOverview/UnderstandingandPreparingfortheIPv6Transition/UnderstandingandPreparingfortheIPv6Transition.html#//apple_ref/doc/uid/TP40010220-CH213-SW1 -> Test for IPv6 DNS64/NAT64 Compatibility Regularly)

Inside we do the following:

private ClientChannel CreateChannel(Uri uri)
{
var channel = new WinInetHttpClientChannel();
channel.TargetUrl = uri.ToString();
if (CompatibilitySettings.RemObjectsIncreaseTimeout)
channel.Timeout = 120;
return channel;
}

If i pass "http://192.68.xxx.xxx:80/BIN" as uri i get the following on the first usage of the channel:

SocketException: Network is unreachable
at System.Net.Sockets.Socket.Connect (System.Net.EndPoint remoteEP) [0x000cb] in /Users/builder/data/lanes/3859/b638977c/source/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/System/System.Net.Sockets/Socket.cs:1313
at System.Net.WebConnection.Connect (System.Net.HttpWebRequest request) [0x001c2] in /Users/builder/data/lanes/3859/b638977c/source/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/System/System.Net/WebConnection.cs:195

WebException: Error: ConnectFailure (Network is unreachable)
at RemObjects.SDK.WinInetHttpClientChannel+AsyncState.get_Message () [0x0004e] in <43f87e2f3b25489f93e661a67852e8d3>:0
at RemObjects.DataAbstract.Server.SimpleLoginService_AsyncProxy.EndLogin (System.IAsyncResult __AsyncResult, RemObjects.DataAbstract.Server.UserInfo& aUserInfo) [0x00000] in <903f7027d1af4524a3fb11501a3f4c6c>:0
at RemObjectsServices.LoginService.m__0 (System.IAsyncResult r) [0x00005] in /Users/RemObjectsServices/LoginService.cs:32
at System.Threading.Tasks.TaskFactory1[TResult].FromAsyncCoreLogic (System.IAsyncResult iar, System.Func2[T,TResult] endFunction, System.Action1[T] endAction, System.Threading.Tasks.Task1[TResult] promise, System.Boolean requiresSynchronization) [0x00014] in :0

If i pass a normal URL like "https://mobile.xxx.com:1625/BIN" it works. I also tried to transform my ip4 address to ipv6 but same result.

Can you tell me how this should work? Does the flag in the iOS build settings of the Xamarin project influence that? (HttpClient implementation)?

Any help would be appreciated. I am completely stuck here.

Thank you!

Posts: 4

Participants: 2

Read full topic

Server refusing to accept new client connections

$
0
0

@mikeody wrote:

Our .NET server application (which is installed on a customer PC at a mine site) is displaying strange behaviour that I can neither explain nor reproduce. Clients, which are Windows Mobile devices running a .NET CF app, connect to the server over the site's WiFi network via a SuperTcp channel. We are currently using RO v8.0.82.1136.

All is well for a while after the server is started (i.e. clients can call open methods, or establish a session, etc) but after a variable amount of time (sometimes an hour, sometimes more), new clients that are not currently connected to the server are unable to call any methods. Every call is met with (most commonly) a SocketException:

System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it
at System.Net.Sockets.Socket.ConnectNoCheck(EndPoint remoteEP)
at System.Net.Sockets.Socket.Connect(EndPoint remoteEP)
at RemObjects.InternetPack.Connection.DataSocketConnect(EndPoint endPoint)
at RemObjects.InternetPack.Connection.Connect(IPAddress address, Int32 port)
at RemObjects.InternetPack.Client.GetConnection(IPAddress host, Int32 port)
at RemObjects.InternetPack.Client.Connect(IPAddress host, Int32 port)
at RemObjects.InternetPack.Client.Connect(String hostname, Int32 port)
at RemObjects.SDK.IpSuperTcpClientChannel.DoStart()
at RemObjects.SDK.IpSuperTcpClientChannel.set_Active(Boolean value)
at RemObjects.SDK.IpSuperTcpClientChannel.BeforeDispatch(IMessage message)
at RemObjects.SDK.ClientChannel.Dispatch(IMessage message)
at [...]

Occasionally we've seen SocketExceptions with different messages, such as "A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond."

Clients that are already connected or that have established a session are not affected. They can continue to call methods on the server without error. The issue only affects new clients that are trying to connect. The number of simultaneously connected clients is small, usually no more than 5.

Once this issue has begun to occur, it makes no difference whether new clients try to connect via WiFi or via a USB/RNDIS connection - all method calls fail. However, it is still possible to ping the server from a client device, and vice versa.

The only workaround we've come up with is to close and reopen the server channel, or quit and restart the server app completely. This is not always convenient or possible, as it requires someone to interact with the server PC, and there isn't always someone available. Meanwhile, the users of the client devices, who may be some distance away, are forced to work in offline mode until a server restart is performed.

The users have noticed that the problem occurs most often first thing in the morning, after the server PC has been locked overnight with the server app running, but it also occurs during the day. It is happening multiple times a day sometimes.

I cannot reproduce this behaviour under controlled conditions, and I have no idea what could be causing it. Does it sound like any known issues which may have been fixed in a later version of RO?

Posts: 6

Participants: 2

Read full topic

How to maintain the solution created with Code-First in Builder Service?

ROSDK Client example for Oxygene and Cocoa

$
0
0

@Benjamin_Keffer_EP wrote:

Hello,

im trying to find out how to use the ROSDK for oxygene and cocoa using fire. I want to create a simple app which contacts a Delphi 7 written server. The Server is ready but I have no ideas about how to build the client. Would be great if you could help!

Thanks and best regards

Benjamin Keffer

Posts: 1

Participants: 1

Read full topic

RemObjects SDK for .NET connect DataBase The best way

C++Builder _Intf code with 9.1.99.1273 is not usable

$
0
0

@rgomezc wrote:

Hello,

I've just updated to 9.1.99.1273, and when rebuilding the _Intf and so on, I'm getting several compile errors with the _Intf unit (at least.

For instance:

[bcc32 Error] tsInfo1_Intf.cpp(525): E2285 Could not find a match for 'TUsoSistemas_Proxy::TUsoSistemas_Proxy(TROUri * const,UnicodeString)'
  Full parser context
    tsInfo1_Intf.cpp(523): parsing: _di_IUsoSistemas _fastcall CoUsoSistemas::Create(TROUri * const,UnicodeString)
[bcc32 Error] tsInfo1_Intf.cpp(538): E2285 Could not find a match for 'TUsoSistemas_Proxy::TUsoSistemas_Proxy(const UnicodeString,UnicodeString)'
  Full parser context
    tsInfo1_Intf.cpp(536): parsing: _di_IUsoSistemas _fastcall CoUsoSistemas::Create(const UnicodeString,UnicodeString)
[bcc32 Error] tsInfo1_Intf.cpp(565): E2285 Could not find a match for 'TUsoSistemas_AsyncProxy::TUsoSistemas_AsyncProxy(TROUri * const,UnicodeString)'
  Full parser context
    tsInfo1_Intf.cpp(563): parsing: _di_IUsoSistemas_Async _fastcall CoUsoSistemas_Async::Create(TROUri * const,UnicodeString)
[bcc32 Error] tsInfo1_Intf.cpp(656): E2316 'SetAutoGeneratedNamespaces' is not a member of '_di_IROMessage'
  Full parser context
    tsInfo1_Intf.cpp(651): parsing: int _fastcall TUsoSistemas_Proxy::RegistrarUsoSistema(const TipoSistema,const int,const int,const int,const AnsiString,const int,const UnicodeString,const TDateTime,const TDateTime,const AnsiString)
[bcc32 Error] tsInfo1_Intf.cpp(693): E2316 'SetAutoGeneratedNamespaces' is not a member of '_di_IROMessage'
  Full parser context
    tsInfo1_Intf.cpp(688): parsing: bool _fastcall TUsoSistemas_Proxy::GetFechaMinimaLicencia(const TipoSistema,const int,TDateTime &)
[bcc32 Error] tsInfo1_Intf.cpp(724): E2285 Could not find a match for 'TROProxy::TROProxy(TROUri * const)'
  Full parser context
    tsInfo1_Intf.cpp(723): parsing:  _fastcall TUsoSistemas_Proxy::TUsoSistemas_Proxy(TROUri * const)
[bcc32 Error] tsInfo1_Intf.cpp(729): E2285 Could not find a match for 'TROProxy::TROProxy(const UnicodeString)'
  Full parser context
    tsInfo1_Intf.cpp(728): parsing:  _fastcall TUsoSistemas_Proxy::TUsoSistemas_Proxy(const UnicodeString)

I can try to fix the first few (just commenting the aDefaultNamespace parameter on the CoService::Create method, but the others are, I think somewhat more complex to find, and being that this are the _Intf units that are regenerated all the time, the only real solution is to fix the templates.

Have you tried to compile the C++Builder generated units with the latest version? Any simple service will produce this errors

Posts: 8

Participants: 3

Read full topic


uRODataSnap_intf generated with wrong/old RODL

$
0
0

@estebanp wrote:

Hi guys,

Please review the code that is included as part of the DataSnap support. If I generate the code from the uRODataSnap.RODL, it is different than the one included on the DataSnap directory.

The problem is that code generation has changed and now the Async interfaces are included on a single file, while before they were on different so everytime I generate a RODL that has a dependency on uRODataSnap it points to i.e. uRODataSnap_intf.IAppServer_Async, which is not included on the .pas included on the installation, but that is generated with the .RODL file.

Now lets say I use the one generated by the RODL file, that one will cause a problem because uRODataSnapConnection requires three parameters
''CoAppServer.Create(fServerName, fMessage, fChannel);''

But the generated file will not include a call with those three parameters.

Im right now manually changing things, but definitely needs to be reviewed.

Posts: 1

Participants: 1

Read full topic

Disconnect channel after inactivity for a given duration

$
0
0

@obones wrote:

Hello,

I'm using a TROSynapseSuperHTTPChannel to communicate with my server and to avoid saturating it, I Create/Destroy between each "high level" operation, that can be made of multiple calls to the server.
I know this is not ideal because there is a delay in establishing the connection, or even more frequently, in closing it. I have noticed it spends quite some time in the SetInactive method when freeing the channel.

To avoid this, I would like to create a system that would be a bit more intelligent, by keeping the connection open for a given duration after the last transfer occurred on the channel.
In regular HTTP, this is the keep-alive option but I could not find anything along those lines in the channel itself.

I thus went looking at the server where I use a TROIpSuperHTTPServer and I see that it sets the KeepAlive property of its fSocket to True.

I saw the IdleTimeout property on TIPAsyncHTTPServer but I'm not sure this is what I'm looking for nor how I could access it from my TROIpSuperHTTPServer instance.

Thus, is the KeepAlive property what I'm looking for? And if yes, is there a way to set the associated timeout?

Regards,
Olivier

Posts: 2

Participants: 2

Read full topic

Remoting SDK Use Case

$
0
0

@nader_shalabi wrote:

Hello,

Is it possible to use Remoting SDK to build a server application for macOS using Elements Cocoa Oxygene (Fire and/or Visual Studio)?

Regards

Posts: 1

Participants: 1

Read full topic

WSDL import in service builder yields "Unknown type: unknown"

$
0
0

@jbw wrote:

Hi

I've recently upgraded from an older version of Remobjects (which I was using with Delphi 7!) to Remobjects SDK 9 with Delphi 2010. The previously generated interface file has a number of (now compatible) changes so I need to regenerate the interface file from the WSDL (SOAP 1.1 WSDL) for the latest version of Remobjects with D2010.

Importing the WSDL in to the service builder works fine however when it goes to generate the Delphi interface code it throws a rather unhelpful error "Unknown type: unknown". Given there's an unknown unknown I don't really know where to begin diagnosing this one. Can anyone point me in the right direction? I checked all the attributes looking for anything which may resemble something 'unknown' but can't find any. Any help here would be greatly appreciated.

On the service builder WSDL import it says SOAP 1.2 preferred - why is it 1.2 preferred ? are there some unsupported elements from SOAP 1.1 which is the reason why 1.2 is preferred or is it just that SOAP 1.2 is the latest in the SOAP standard and so that's why it's 'preferred' ?

Regards
Jason

Posts: 5

Participants: 3

Read full topic

Unable to update interface files(.remoteRODL) over SSL

Viewing all 1575 articles
Browse latest View live