首页 新闻 会员 周边

[.NET-Core]关于登陆后,跳转到重定向页面出现 500错误的问题

0
悬赏园豆:30 [已解决问题] 解决于 2017-02-13 19:05

1、问题描述

部署在本地有两个IIS站点,分别是一个负责我主项目的比如(a.butter.com),另外一个是负责登陆,注册的(passport.butter.com)。我之前因为在测试项目的功能,闲麻烦。就直接在本地发送一个请求来获取Cookie 进行所谓的模拟假登陆。今天,我想把我的假登陆去除,却发现了一个问题。就是我点击登陆,登陆成功后。正确跳转到了 ReturnUrl,但是页面却显示 500 Internal Server Error错误

2、日志错误信息

[Error] Connection id ""0HL2JU00MCUG0"": An unhandled exception was thrown by the application.
System.AggregateException: One or more errors occurred. (Response status code does not indicate success: 500 (Internal Server Error).) ---> System.Net.Http.HttpRequestException: Response status code does not indicate success: 500 (Internal Server Error).

3、用PostMan模拟请求的错误信息

Message": "An error has occurred.",
"ExceptionMessage": "在执行加密操作时出错。",
"ExceptionType": "System.Security.Cryptography.CryptographicException",


BUTTERAPPLE的主页 BUTTERAPPLE | 老鸟四级 | 园豆:3190
提问于:2017-02-13 17:48
< >
分享
最佳答案
0

找到原因啦,因为加密解密是通过MachineKey 来的。原因是在 passport.butter.com中的MachineKey 的配置和其他站点不同,导致加密解密错误。


BUTTERAPPLE | 老鸟四级 |园豆:3190 | 2017-02-13 19:05
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册