Visual Studio 2015 Ent. emulator cannot connect with OneDrive, why?

  • Thread starter Thread starter Windows Central Question
  • Start date Start date
W

Windows Central Question

Visual Studio 2015 Ent. emulator cannot connect with OneDrive

Good morning, I created with Visual Studio 2015 Enterprise an universal app that can store both LocalStorage than on OneDrive. On Pc everything works well, it connects with OneDrive; creates folders, files, etc. When I try the app on phone emulator cannot connect with OneDrive. It presents the connection mask and strangely, unlike the PC, also asks me the security code; at the end it says: We're having trouble signing in ! (Value does not fall within the expected range). With the physical device I cannot prove why Windows 8.1 is incompatible with Windows 10 . From what can it depend ?

Public Async Function LogIn() As Task(Of Integer)
Dim MyScopes As String() = New String() {"wl.signin", "wl.basic", "wl.offline_access", "onedrive.appfolder", "onedrive.readwrite"}
Try
MyOneDriveClient = OneDriveClientExtensions.GetClientUsingOnlineIdAuthenticator(MyScopes)
If MyOneDriveClient.IsAuthenticated = False Then
Await MyOneDriveClient.AuthenticateAsync()
MyDriveOne = Await MyOneDriveClient.Drive.Request().GetAsync()
MyRootItemOne = Await MyOneDriveClient.Drive.Root.Request().GetAsync()
MyFolderOne = Await MyOneDriveClient.Drive.Special.AppRoot.Request().GetAsync()
End If
Catch ex As OneDriveException
AspettaMessaggio("Non ? possibile connettersi con OneDrive.")
Return 0
Catch ex As Exception
AspettaMessaggio("Non ? possibile connettersi con OneDrive.")
Return 0
End Try
Return 1
End Function
 
Re: Visual Studio 2015 Ent. emulator cannot connect with OneDrive

I maybe mistaken, but I thought you need pair your microsoft account to the phone in order for onedrive to work. The last time I tried I couldn't pair my account from within the emlulator. I haven't tried with 10, things may have changed. See if you can access onedive from within emulator first before testing your app.