Xamarin and CSLA #3348
-
Hi, |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 3 replies
-
It isn't really a CSLA issue, it is an issue with an Android emulator accessing localhost. I've never figured out how to do it myself - I just host my service in Azure so my emulator can access the endpoint. |
Beta Was this translation helpful? Give feedback.
-
Conveyor is a great tool for this, it exposes a URL that can be used to test from remote devices on the same network. Once the application is running look for the snap in which will contain the localhost url, and a LAN accessible one. |
Beta Was this translation helpful? Give feedback.
-
If it's to do with the localhost address, then I can think of two other tools that might help as well: Visual Studio Dev Tunnels (new in VS 17.5) Both of these tools allow you to expose a local service using a public address. If you use Visual Studio then the integration into the development environment makes Dev Tunnels a slightly simpler choice. |
Beta Was this translation helpful? Give feedback.
-
I've managed to expose AppServer's URL and I'm able to connect to it via Android Emulator (I get response when getting /api/dataportal - database connection is also valid). Similar problem was described in #3325, but I'm not able to solve it the way it was mentioned in the issue, |
Beta Was this translation helpful? Give feedback.
-
The problem lies in More precisely in this snippet. For some reason
and in my case
Any idea why the response of |
Beta Was this translation helpful? Give feedback.
-
I solved this problem by running both my database and my app server in docker, so I could access it locally through Android emulator. The other thing was to use http instead of https, and to use text serialization in my Xamarin app and App server |
Beta Was this translation helpful? Give feedback.
I solved this problem by running both my database and my app server in docker, so I could access it locally through Android emulator. The other thing was to use http instead of https, and to use text serialization in my Xamarin app and App server
UseTextSerialization = true
. This was good enough for my needs.