Asp.Net Core我遇到404错误问题 [英] Asp.Net Core I'm getting 404 error problem
本文介绍了Asp.Net Core我遇到404错误问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我收到404错误,但刷新页面后问题已解决。
I'm getting a 404 error but the problem is solved when I refresh the page.
该URL被服务调用。在这种情况下,它总是会出错。
如果刷新页面,问题会越来越好。页面打开。
This url is being called by a service. 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?
我的回调参数:
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"});
}
推荐答案
尝试更改
[HttpGet]
为此:
[HttpGet( company / payment / callbackpayments /?data = {data})]
或确保您的控制者的路径属性$ / company / payment
[Route( company /付款)
or make sure your controller has /company/payment
in a route attribute
[Route("company/payment")]
这篇关于Asp.Net Core我遇到404错误问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文