[英]Asp.Net Core I'm getting 404 error problem
I'm getting a 404 error but the problem is solved when I refresh the page. 我收到404错误,但刷新页面后问题已解决。
This url is being called by a service. 服务正在调用此URL。 In this case it always gets error.
在这种情况下,它总是会出错。 If I refresh the page the problem is getting better.
如果刷新页面,问题会变得越来越好。 The page opens.
页面打开。
Where is the problem? 问题出在哪儿? Can you help me?
你能帮助我吗?
My Callback Parameter: 我的回调参数:
CallbackUrl = $"{httpContext.Request.Scheme}://{httpContext.Request.Host}{httpContext.Request.PathBase}/company/payment/callbackpayments/?data=" + model.Transaction.Id.ToString()
IActionResult: IActionResult:
[HttpGet]
[AllowAnonymous]
public IActionResult CallbackPayments(string data)
{
return RedirectToAction("Index","Dashboard",new { area="Company"});
}
try changing 尝试改变
[HttpGet]
to this: 对此:
[HttpGet("company/payment/callbackpayments/?data={data}")]
or make sure your controller has /company/payment
in a route attribute [Route("company/payment")]
或确保您的控制器的路径属性
[Route("company/payment")]
具有/company/payment
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.