Base solution for your next web application

Activities of "korigoth"

Ok, thx a lot for your answer and time :)

It will help to explain this to other while trying to convert them to ASP.Net Boilerplate!

Hey,

Can i get some help to understand why do i get this default error each time that I throw a UserFriendlyExceptionException in an MVC Controller with abp.ajax method.

i did a simple code to show the problem! (version 0.10.0.1)

public async Task<JsonResult> TestMethod()
{
            throw new UserFriendlyException("Test1", "Test2");
}

abp.ui.setBusy(
  $('#paneltest'),
  abp.ajax({
    url: abp.appPath + 'Home/TestMethod',
    type: 'POST',
    data: JSON.stringify({}),
    error: function (error, jqXHR) {
      console.log(error);
      console.log(jqXHR);
    }
  })
);

image to show the result of the Error in Browser : <a class="postlink" href="https://postimg.org/image/45edyyagl/">https://postimg.org/image/45edyyagl/</a>

sorry i didn't find a way to upload it here :(

So is there anything i'm doing wrong ?

EDIT:

I updated the project to 0.10.3.1 and the same problem happen.

The error was not logged in the log.txt file.

But it was a noob mistake.... doing ajax call and returning View() was my error. When i switched to PartialView or JsonResult it worked again.

bump, still trying to figure out, what is the use case for the validation to hit before the controller.

Because it cause dead code for MPA in template and it's not userfriendly (cannot use ValidationSummary anymore), so it could be cool if we can get the reason behind the feature and how it is suppose to be used!

thx

By the way the DeadCode with this validation is in ControllerBase -> CheckModelState is now useless for MPA

Question

Hey,

Can i know what is the use case for the Validation in MVC to hit before we even get in the controller? (version 10.0.1)

I cannot understand the use case or i cannot see how it should be used ? Is there a place where the error are logged ? Or is there a place where we can get them?

Thx

Hey,

I have a simple action that i removed all code except the RedirectToAction method and it's provoking an error each time i call it.

Can i know what i'm doing wrong ?

Error: An error has occured! Error detail not send by server. I have no log registred and AbpHandledExceptionData doesn't get fired.

[HttpPost]
        [AbpMvcAuthorize]
        public ActionResult CreateModel(CreateModelViewModel model)
        {
                return RedirectToAction("CreateModel");
        }

        [HttpGet]
        [AbpMvcAuthorize]
        public ActionResult CreateModel()
        {
            var model = AsyncHelper.RunSync(() => _modelService.GetModel());

            return View(model);
        }


js file

            abp.ui.setBusy(
                $('#ModelPanel'),
                abp.ajax({
                    url: abp.appPath + 'Model/CreateModel',
                    type: 'POST',
                    data: JSON.stringify({})
                })
            );

Hey,

I didn't know how to do SEO with SPA so I'm migrating the website that I've made with ABP SPA to ABP MPA. If anyone did SEO with ABP SPA, I 'd be sincerely grateful for some help! ;)

But here is the question for the ApplicationService. Like I said it was a SPA website, so all my logic is in ApplicationServices.

Can I use Application layer like I was using it with AJAX request? Because i think that all the filters that are configured will be useless by directly calling the application service if i'm not mistaken?

I will need IPermissionChecker and IAbpSession and implement my logic in each controller action ? Or do I lack knowledge about ABP and MVC Controller?

thx!

EDIT: Apparently, the AbpAuthorize filter is called when I Injected the IMyService in MVC Controller then using it in my childaction. How can it be called if I directly use the method and it's not called by ABP?

like _myService.Execute() in MVC is firing the AbpAuthorize! am I right?

Showing 11 to 17 of 17 entries