Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Xamarin Project Run Error: communicate with the server #4780


User avatar
0
ramezani583 created

Hi, When I run the mobile project, the following error occurs. "A Problem occurred while trying to communicate with the server" How can I see the error text? Is there a log to view the error?


2 Answer(s)
  • User Avatar
    0
    gbadenhorst created

    Hi,

    Not sure if this is 100% the same scenario as I have just encountered today as well.

    For me it was part of the setup that i did not do: To be specific it was this segment -> To start debugging Xamarin app you need to configure host settings. You can use either Web.Mvc or Web.Host to feed the Xamarin app. Open Windows Command Prompt. Go to the folder where your Web.Host or Web.Mvc csproj file is located. Then run the commands below to start hosting your Web Api.

    SET ASPNETCORE_ENVIRONMENT=Development SET ASPNETCORE_URLS=http://*:22742 dotnet run

    <a class="postlink" href="https://aspnetzero.com/Documents/Development-Guide-Xamarin#debugging-xamarin-app">https://aspnetzero.com/Documents/Develo ... amarin-app</a>

    Also what was different was, my emulator was android 7.1 and my project was android 8. <- not sure if that can also lead to the same scenario.

    Hope this is helpfull

  • User Avatar
    0
    alper created
    Support Team

    Hi,

    Download the bat file which starts the host in command line. <a class="postlink" href="https://github.com/aspnetzero/documents/raw/master/doc/etc/start-host.zip">https://github.com/aspnetzero/documents ... t-host.zip</a>

    Run it to host your Web.Host

    [attachment=0:1v545id9]DebuggingXamarinApp.png[/attachment:1v545id9]