When I add Microsoft.AspNetCore.Mvc in ApplicationService solution and use RedirectAction, it causes server error. I also tried installing AbpAspNetCore package but still no luck.
Is there any other way to perform a redirect?
6 Answer(s)
-
0
Please show:
your code, and
the error log. Can you also find out whether the error occurs when you:
create a RedirectAction, or
return it? You can do this by assigning it to a variable and setting a breakpoint before you return it.
If it's Case 1, you can create and inject IRedirectionDelegate interface in Application project. Then implement and register that in Web.Mvc project where the action (and controller) exists.
-
0
Ah, you said RedirectAction in this post, but you're getting the url string from _shopifyManager in that post. Since you're not redirecting to a controller action, that suggestion may not be relevant in solving your issue.
Please avoid creating multiple posts for the same issue. Update the same post so that we can all further understand. Not receiving replies does not mean we're ignoring it. There isn't enough information to reproduce it and offer a solution.
-
0
Hi @aaron,
For the previous post, the issue was resolved by removing Microsoft.AspNetCore.Mvc. I thought it would be better to create a new post as it is a simple clear thing. Earlier post was a mess. Apologies for that.
I am facing this issue.
public async Task GetShopifyInstall(string shop) { var redirectUrl = _shopifyManager.GetAuthRedirectUrl(shop); //********** How to redirect here?********** }
-
0
How are you currently calling this method from client side?
-
0
Hi @ajayak,
As far as I know, you cannot return RedirectAction to angular, you must return JsonResult.