我想在> net Framework 2.0中实现AUth 2.0。执行授权时出现错误。 我已经尝试了下面的代码,但是给出了错误“ 404 Not found”。
Dim strExchange = "response_type=authorization_code"
strExchange += "&redirect_uri=http://localhost:49366/Default.aspx"
strExchange += "&client_id=********"
strExchange += "&scope=connectapi.*****"
strExchange += "&client_secret=******&grant_type=authorization_code"
Dim url As String = "https://dev-auth.test.com/connect/authorize?"
Dim tokenurl As String = "https://dev-auth.test.com/connect/token?"
Dim webClient As New System.Net.WebClient
System.Net.ServicePointManager.SecurityProtocol = DirectCast(3072,
SecurityProtocolType)
Dim result As String = webClient.DownloadString(url & strExchange)
Response.Write(result)