Click here to Skip to main content
15,885,985 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,

I have an Asp.Net 4.5.2 web application client that makes calls to a OAuth 2.0 application running on my server Core 2.0 website. It works without a problem.

The problem is when it returns from an authorization call to the server, it does not execute the return method specified in the redirect url.

When I take it through the Visual Studio 2017 debugger, the authorization string sent to the server is the same as when I run it in the .Net 4.5.2 version of the client.

When it returns from the server in the .Net 4.5.2 client, it executes a method.

When it returns from the server in the .Net Core 2.0 client, it does not executes that method. It just hangs up with no error message.

Is there anyone that can help me to migrate my web client from Asp.Net 4.5.2 to Asp.Net Core 2.0?

I would appreciate it if anyone can tell me how to find out what the server is returning to the client. I can't figure out how to do that. If I knew that, I might be able to know what is causing the hangup.

Thanks,
Tony

What I have tried:

I have read numerous documents, some more than once, on OAuth 2.0 and Routing and other technologies related to the client side.

I created the client application in C#, Core 2.0 code, but cannot get it to work the way the .Net 4.5.2 client does.
Posted
Updated 18-Jun-18 4:14am
v4
Comments
[no name] 16-Jun-18 13:19pm    
Could it be that you forgot to describe what the problem is?
Tony Girgenti 16-Jun-18 13:56pm    
The problem is when it returns from an authorization call to the server, it does not execute the return method specified in the redirect url.

When I take it through the Visual Studio 2017 debugger, the authorization string sent to the server is the same as when I run it in the .Net 4.5.2 version of the client.

When it returns from the server in the .Net 4.5.2 client, it executes a method.

When it returns from the server in the .Net Core 2.0 client, it does not executes that method. It just hangs up with no error message.

Thanks,
Tony
[no name] 16-Jun-18 14:10pm    
Ok, please use "Improve question" and add this there. It would help others to help you ;)
Afzaal Ahmad Zeeshan 16-Jun-18 13:30pm    
What is the problem?
Tony Girgenti 16-Jun-18 14:13pm    
The problem is when it returns from an authorization call to the server, it does not execute the return method specified in the redirect url.

When I take it through the Visual Studio 2017 debugger, the authorization string sent to the server is the same as when I run it in the .Net 4.5.2 version of the client.

When it returns from the server in the .Net 4.5.2 client, it executes a method.

When it returns from the server in the .Net Core 2.0 client, it does not executes that method. It just hangs up with no error message.

 
Share this answer
 
Comments
Tony Girgenti 17-Jun-18 9:03am    
Hello,

Yes, I did read that several times. Although it contains a good explanation of the OAuth flow, I don't see anything in there related to my problem of not executing the method in the redirect Url.

Thanks,
Tony
To fix this issue, I added this route to the Startup.cs file:
C#
routes.MapRoute(
   name: "token",
   template: "token",
   defaults: new { controller = "API", action = "GetAccessToken" });
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900