簡體   English   中英

Xamarin:在Azure移動應用程序服務上使用本地實例調試應用程序

[英]Xamarin : debugging application with local instance on Azure Mobile App Service

我正在將Xamarin.Forms應用程序與Azure移動應用程序一起用作后端服務。 如何使用服務的本地實例進行調試?

嘗試以下操作,但返回錯誤:

    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);

引發的錯誤是:

System.Net.WebException:錯誤:ConnectFailure(連接被拒絕)---> System.Net.Sockets.SocketException:連接被拒絕

以下是移動應用程序服務中的鍵:

<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" />

如何在Xamarin中定義客戶端?

PS:本地主機服務正在調試模式下運行。

我的問題是,本地IISExpress無法從任何其他設備訪問。 必須根據以下文章配置IISExpress: https ://azure.microsoft.com/zh-cn/documentation/articles/mobile-services-dotnet-backend-how-to-configure-iis-express/

我仍然遇到錯誤,但這可能與此問題無關。 (稍后可能會對此進行更多更新)

Microsoft.WindowsAzure.MobileServices.MobileServiceInvalidOperationException:無法完成請求。 (未授權)

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM