获取AccessToken,VerifySmsToken mscorlib“无法连接到远程服务器”,

时间:2018-09-02 10:34:45

标签: iis server configuration token verify

通过邮递员发帖时出现此错误。
其他方法也可以正常工作。只是这种解决用户验证并且其响应是访问令牌的方法才出错。

我认为字符串标记的长度是错误的根源。

邮递员回复:

    "StackTrace": "   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)\r\n   at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)\r\n   at System.Threading.Tasks.Task`1.get_Result()\r\n   at FactoryJaApi.Controllers.UserController.<Login>d__14.MoveNext() \r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at 

System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\ r \ n在FactoryJaApi.Controllers.UserController.d__12.MoveNext()         “ TargetSite”:{             “ Name”:“ ThrowIfExceptional”,             “ AssemblyName”:“ mscorlib,版本= 4.0.0.0,文化=中性,

        "ClassName": "System.Threading.Tasks.Task",
        "Signature": "Void ThrowIfExceptional(Boolean)",
        "Signature2": "System.Void ThrowIfExceptional(System.Boolean)",
        "MemberType": 8,
        "GenericArguments": null
    },
    "ErrorLine": null,
    "ExceptionType": "System.AggregateException",
    "ExceptionUrl": null,
    "InnerException": {
        "DateTime": "0001-01-01T00:00:00",
        "Message": "An error occurred while sending the request.",
        "HelpLink": null,
        "Source": null,
        "StackTrace": null,
        "TargetSite": null,
        "ErrorLine": null,
        "ExceptionType": null,
        "ExceptionUrl": null,
        "InnerException": {
            "DateTime": "0001-01-01T00:00:00",
            "Message": "Unable to connect to the remote server",
            "HelpLink": null,
            "Source": null,
            "StackTrace": "   at System.Net.HttpWebRequest.EndGetRequestStream(IAsyncResult asyncResult, TransportContext& context)\r\n   at System.Net.Http.HttpClientHandler.GetRequestStreamCallback(IAsyncResult ar)",
            "TargetSite": null,
            "ErrorLine": null,
            "ExceptionType": null,
            "ExceptionUrl": null,
            "InnerException": null
        }
    }
}

}

1 个答案:

答案 0 :(得分:0)

谢谢大家,您的信息无济于事,离我的要求还很远。 我指出此错误仅发生在验证和生成令牌字符串方法时。和其他方法可以完美正确地工作。

Token方法本身具有自我查询功能。因此,当您查询到服务器Kaarix.work时,IIS无法从内部访问相同的地址。解决:仅需要定义重定向local url并重定向从计算机内部调用的查询。

如果需要答案,请查看屏幕截图。

enter image description here