Iis 获取AccessToken,VerifySstoken mscorlib“;无法连接到远程服务器";,

Iis 获取AccessToken,VerifySstoken mscorlib“;无法连接到远程服务器";,,iis,server,configuration,token,verify,Iis,Server,Configuration,Token,Verify,我通过邮递员投递邮件时出现此错误。 其他方法也能很好地工作。仅此方法存在错误,该方法处理用户验证,其响应为访问令牌 我认为字符串标记的长度是错误的根源 邮递员回应: "StackTrace": " at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)\r\n at System.Threading.Tasks.Task`1.GetResultCore(Boo

我通过邮递员投递邮件时出现此错误。
其他方法也能很好地工作。仅此方法存在错误,该方法处理用户验证,其响应为访问令牌

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

邮递员回应:

    "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 

}谢谢你们所有人,你们的信息对我没有帮助,而且离我的要求相去甚远。 我指出这个错误只发生在验证和生成令牌字符串方法时。其他方法工作完美且正确

令牌方法本身有一个自查询。因此,当您的查询转到服务器Kaarix.work时,IIS无法从内部访问相同的地址。解决方法:只需定义重定向
本地url
,并重定向从机器内部调用的查询

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


控制器中未处理的异常应由您处理。这通常是500个错误的产生和修复方式。不,这个方法和代码在其他服务器上运行得很好,我用几个服务器对它进行了多次测试,这是一个弱语句。不同机器之间的服务器通信不同,因为DNS/HTTPS/代理和其他太多因素可能会出错。如果您可以访问有问题的服务器,网络跟踪应该会显示更多详细信息。如果没有,请与服务器管理员联系。
        "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
        }
    }
}