Skip to content

.NET user won't authorize #3674

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
PunkStarStudios opened this issue Mar 28, 2017 · 9 comments
Closed

.NET user won't authorize #3674

PunkStarStudios opened this issue Mar 28, 2017 · 9 comments

Comments

@PunkStarStudios
Copy link

Issue Description

I am able to authorize a user via REST and OSX just fine. But I am building VB.NET application (VS2015) to no avail.
I am greeted "Invalid response from server"

Steps to reproduce

Imports Parse
....
Private Async sub fromMain_Load(sender as Object, e As EventArgs) Handles Me.Load
Dim myConfig as ParseClient.Configuration
myConfig.ApplicationId = "myid"
myConfig.WindowsKey = "mydotnetkey"
myConfig.Server = "https://myserver/myapp"
ParseClient.Initialize(myConfig)
Try
Await ParseUser.LogInAsync("Dave","dave")
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub

If I add a "/" to the end of the server address I get an "unauthorized" message back.

Expected Results

CurrentUser to be set

Actual Outcome

ex.Message = "Invalid response from server" after the LogInAsync is called

Environment Setup

  • Server

    • parse-server version (Be specific! Don't say 'latest'.) : 2.3.7
    • .net SDK installed via nuget 1.7
    • Operating System: Win10, VS2015, VB,
    • Hardware: Asus desktop
    • Localhost or remote server? Server running on Ubuntu 14.04
  • Database

    • MongoDB version: 3.0.14
    • Storage engine: Mongo locally installed
    • Hardware: ASUSTeK rack server X86_64, P9D-M Series
    • Localhost or remote server? (AWS, mLab, ObjectRocket, Digital Ocean, etc): Local

Logs/Trace

Include all relevant logs. You can turn on additional logging by configuring VERBOSE=1 in your environment.
Cleaned out logs, ran .NET program again. no logs

Again - it works fine via REST and OSX (using same ApplicationID and server - albeit different client keys of course).

@PunkStarStudios
Copy link
Author

Bump

@flovilmart
Copy link
Contributor

What keys did you set on parse-server? did you provide a dotNetKey?

@PunkStarStudios
Copy link
Author

Use use the "clientKey" for OSX, "restAPIKey" for RESTful, and the "dotNetKey" for the .Net app.
I also tried using the clientKey for the .Net app as well - just in case - but no luck.

(The example above I just put in placeholders - but in real life ;P ... I Copy/Paste the correct keys into the app directly from the Index.JS file setup for that parse server instance)

I assume the "WindowsKey" in the configuration parameter that is supposed to be filled in with the dotNetKey from the server instance.

@PunkStarStudios
Copy link
Author

Bump

@PunkStarStudios
Copy link
Author

Can someone post a "Startup" project for VB or c# that works with pointing to your own parse server?
All the sample projects in the code base are 1= years ago and are made to point to parse.com.

@PunkStarStudios
Copy link
Author

Well - something just started working.
Like really? ;P
I did have to add a "/" to the end of the server address btw.

@vladrad
Copy link

vladrad commented Apr 18, 2017

Damn you beat me to it!!!!!

You need to add "/" at the end. In the sdk all calls append the remaning url to the server url.
So if you have https://myserver/myapp it will turn it to https://myserver/myappclass/Test/post instead of https://myserver/myapp/class/Test/post.

@PunkStarStudios
Copy link
Author

I swear - I swear I tried that before.
I know I did.
But I also found an error in my parse server configuration at one point... I had the variable name dontnetKey instead of dotnetKey.
I crapped a brick when I saw that and was looking for a way to get up on the roof after missing that for 2 weeks.
But after fixing that and trying both with and without the "/" - I still couldn't authenticate. (yes - I stopped and stopped the parse server - but maybe something was cached somewhere)

BUT.... here we are here today. It's all working now.

@vladrad
Copy link

vladrad commented Apr 18, 2017

Hahaha yas!!!!
Weird i just type random stuff into the dotnetkey string and it works. Maybe its different because you are not a unity project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants