I'm having trouble applying authorizations on public pages. I have created a controller that holds all the private views. As soon as I apply authorize to the Controller as follows: [AbpMvcAuthorize] public class AboutController : WebPortalControllerBase { public ActionResult Index() { return View(); } } I get this error
An unhandled exception occurred while processing this request ArgumentNullException: Value cannot be null Parameter name: S system.covert.frombase64String(string s)
3 Answer(s)
-
0
Hi @mmorales,
I assume you are using ASP.NET Core version of AspNet Zero.
We only used Base64Decode in AccountController's Login action. I think when a user does not have permission to view a page, user is redirected to Account/Login on public website and it requires userId parameter to be passed.
So, correct solution here would be redirecting user to admin website's login page because users of public website logins on admin website.
I have created an issue for this <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero-core/issues/417">https://github.com/aspnetzero/aspnet-ze ... issues/417</a>, you can follow it.
Thanks.
-
0
I found the issue:
the solution is to move the if null statement before it converts to Int 64.
-
0
Thanks @mmorales.