1

I'm using Xamarin.Forms application with Azure Mobile App as backend service. How can I debug with local instance of the service?

Tried following, but returns error :

    public const string applicationURL = @"http://192.168.0.4:59996/";
    public const string gatewayURL = @"";
    public const string applicationKey = @"Overridden by portal settings";

    public static MobileServiceClient client = new MobileServiceClient (
        Constants.applicationURL, Constants.gatewayURL,
        Constants.applicationKey);

Error thrown is :

System.Net.WebException: Error: ConnectFailure (Connection refused) ---> System.Net.Sockets.SocketException: Connection refused

Following are the keys in Mobile App service:

<add key="MS_MobileServiceName" value="XXXMobileApp" />
<add key="MS_ApplicationKey" value="Overridden by portal settings" />
<add key="MS_MasterKey" value="Overridden by portal settings" />
<add key="MS_SigningKey" value="Overridden by portal settings" />
<add key="EMA_MicroserviceID" value="XXXMobileApp" />
<add key="EMA_RuntimeUrl" value="https://groupa2edxxx.azurewebsites.net" />
<add key="EMA_Secret" value="Overridden by portal settings" />

How should I define the client in Xamarin?

PS: The local host service is running in debug mode.

4
  • Try hitting the url from another computer. Your computer might be blocking connections from other devices. Commented Jul 21, 2015 at 16:31
  • have you tested your service using a proxy like fiddler Commented Jul 21, 2015 at 16:31
  • Is your local service on a different machine? If so, check out stackoverflow.com/questions/31360068/… Commented Jul 21, 2015 at 19:40
  • @acastr7, yeah, I was not able to access the url from another machine. Commented Jul 22, 2015 at 4:10

1 Answer 1

1

My issue was that the localhost IISExpress was not accessible from any other device. Had to configure IISExpress based on following article: https://azure.microsoft.com/en-us/documentation/articles/mobile-services-dotnet-backend-how-to-configure-iis-express/

I'm still facing an error but this could be unrelated to this question. (More update on this later perhaps)

Microsoft.WindowsAzure.MobileServices.MobileServiceInvalidOperationException: The request could not be completed. (Unauthorized)

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.