Skip to content
This repository has been archived by the owner on Jul 31, 2019. It is now read-only.

Sample does not work on Azure Website it does hovever work perfect locally #59

Open
Pelago opened this issue Sep 18, 2017 · 14 comments
Open

Comments

@Pelago
Copy link

Pelago commented Sep 18, 2017

No description provided.

@Pelago
Copy link
Author

Pelago commented Sep 18, 2017

When publishing this on Azure webapp and select any menu option needing Authorization I ends up in a never ending logon loop.
Everything works perfectly locally.

Am I missing something? Do I need to change anything in the sample to get it to work on Azure?

I did follow the instruction in the sample to connect and publish to Azure but...

@Pelago Pelago changed the title Saa Sample does not work on Azure Website it does hovever work perfect locally Sep 18, 2017
@jmprieur
Copy link
Contributor

Would you be using Edge?

@Pelago
Copy link
Author

Pelago commented Sep 18, 2017

Hi,
I usually develop using Firefox for local debug. But I have tested both locally and on Azure with FireFox, Edge, Chrome, Opera and IE to. The same results in all of them. Working Perfect locally. When on Azure I do sign in and my username is visible. If I select any of the menu options for instance Userlist there is a Authentication problem showing the following statement
"You have to sign-in to see Users. Click here to sign-in".
When selecting the "here" the never ending logon lopp is starting. Same in all Browsers.
I Have not for the purpose of this altered any of your used nuget package versions.

@jmprieur
Copy link
Contributor

Thanks for disambiguating, @Pelago
Did you add the URL of your deployed application to the Reply URLs in the Azure AD application (in the Azure portal)? Also did you change the PostLogoutRedirectUri in the Web.Config?

@Pelago
Copy link
Author

Pelago commented Sep 18, 2017

yes i did!

Actually when in the looping logon in Firefox and I hit the go back button, I get this on the screen
IDX10301: The 'nonce' found in the jwt token did not match the expected nonce.
expected: '636413446339051586.NzFmYTgzZTEtNTM5Ni00NjI3LTk5NWMtZmMyNTdkOGI3MjI5YzJhZjI1YTItZjdjNi00MzQ4LThmZmQtMzliZTk5YWMzMTky'
found in jwt: '636413446346708022.ZTliOWFiODQtNzExYS00NTE4LTg2Y2MtNTJhMGVkZWE2MDgyMjUxOGQ3OGItYWZjYS00OWQxLWIxZjYtZjM0M2RmYWU0Mzg1'. + a lot of info of the user i have.
and this seems to be the problem..

I have tried to update the application with newer Nuget packages with no luck especially the JWT is causing problems in my mind.. and the code.

@Pelago
Copy link
Author

Pelago commented Sep 18, 2017

I did do one change in the Web.Config, I added
customErrors mode="Off"
in the
</system.web>
section
to se the error above

@jmprieur
Copy link
Contributor

@Pelago : for the JWT nuget, can you please try with the previous major version ? (I think I remember that the latest is 4.x, can you try with 3.x) ?

@Pelago
Copy link
Author

Pelago commented Sep 18, 2017

@jmprieur The same result with JWT Nuget 3.x. There is also a 5.x that do not work eigther.

@Pelago
Copy link
Author

Pelago commented Sep 18, 2017

Sorry missed that it did not install the Nuget 3.x

Unable to resolve dependencies. 'System.IdentityModel.Tokens.Jwt 3.0.2' is not compatible with 'Microsoft.IdentityModel.Protocol.Extensions 1.0.4.403061554 constraint: System.IdentityModel.Tokens.Jwt (>= 4.0.4.403061554)', 'Microsoft.Owin.Security.OpenIdConnect 3.1.0 constraint: System.IdentityModel.Tokens.Jwt (>= 4.0.0)'. 0

@Pelago
Copy link
Author

Pelago commented Sep 18, 2017

Same result after altering through all nuget versions of 'Microsoft.IdentityModel.Protocol.Extensions too..

@Pelago
Copy link
Author

Pelago commented Sep 21, 2017

@jmprieur I hope you did not misstake my misstake above as if everything is working... :)

@Pelago
Copy link
Author

Pelago commented Oct 22, 2017

@jmprieur do you have any other suggestions to get your sample working on Azure?

@Pelago Pelago closed this as completed Oct 22, 2017
@Pelago Pelago reopened this Oct 22, 2017
@subhasisjha
Copy link

I am facing the same issue pelego facing can somebody help me on this

@subhasisjha
Copy link

@Pelago did you able to fix that issue then please let me know the solution.Or anybody else please help me on this issue

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

No branches or pull requests

3 participants