cancel
Showing results for 
Search instead for 
Did you mean: 
SOLVED

Connecting to datalayer in appbuild enviroment

Connecting to datalayer in appbuild enviroment

ArcherThompson
Established Member

I am developing in dotnet and trying to connect to the datalayer while in the app build enviroment. So for example using the datalayer.client example in samples-net running the program will yield the following.

ctrlX Data Layer system started.
ctrlX Data Layer client created.
Client is not connected -> exit

I believe this is probably a combo of the wrong values in the connection string and maybe the dataleyer not running. Any advice on getting this set up? 

 

Using Version: 1.18.1

4 REPLIES 4

CodeShepherd
Community Moderator
Community Moderator

So as you suggested probably data layer is not running, you have to give this answer. The Client example will try to connect to an existing data layer.

  • Is a ctrlX Data Layer running on your PC (in ctrlX COREvirtual) or on your network that can be reached with your settings?
  • What are the connection data you are using?
  • Are IP/usename/password/port fitting to your ctrlX CORE hosting the data layer?

nickH
Community Moderator
Community Moderator

@CodeShepherd is right, it depends on where the Data Layer (respectively the ctrlX CORE) is you want to connect to. The connection settings in the .Net sample datalayer.client can be modified in the line 49 (see my screenshot). 

nickH_0-1674462188891.png

Please put in here the ip, the user and password of the ctrlX CORE you want to connect to.

(If you want to connect to a ctrlX CORE virtual, which is running on your host with port forwarding you have to put in the ip: "10.0.2.2" and the sslPort: 8443)

Best regards, 

Nick

Nick, that got it most of the way, still cant get my connection to my virtual core to work but I can connect to my physical one so that works.

 
This works => var connectionString = new Remote(ip: "192.168.1.1", user: "boschrexroth", password: "boschrexroth", sslPort: 443).ToString(); //physical device
 
This did not work =>//var connectionString = new Remote(ip: "10.0.2.2", user: "boschrexroth", password: "boschrexroth", sslPort: 8443).ToString(); //virtual device
 
apprciate the answer, 
Archer
 
 

 

nickH
Community Moderator
Community Moderator

Hi Archer, 

great that you got the connection to the physical device running. 

Some hint regarding the connection to the ctrlX COREvirtual: There are two ways to run your control. 

  1. Network adapter: ip: 192.168.1.1 -> connection settings for Data Layer Client like with the physical ctrlX CORE
  2. Port forwarding: ip: 127.0.0.1:8443 -> ip: 10.0.2.2 and sslPort: 8443

image.png

 

 

Best regards, 

Nick

 

Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist