Base solution for your next web application

Activities of "bowlvan"

<cite>ismcagdas: </cite> Hi,

You can check this issue <a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate/issues/769">https://github.com/aspnetboilerplate/as ... issues/769</a>.

So I need import Abp.Web.MVC into my Application project to using AbpJson? Possible to give a code sample for application function for reference? Thanks!

Hi,

Any action attribute can disable automatic camel case conversion of return Json result? Thanks.

If I enable UnitOfWork on Action, anyway to complete UOM in "Catch Exception"? So default UOM will not be trigger after Action done.

Just tried use JsonResult but not working. still got code 500 & yellow page.

So if I want to use UOM in controller i have to initialize UOM in action instead?

<cite>ismcagdas: </cite> Hi,

Can you try to add this attribute to your action ?

[UnitOfWork(IsDisabled = true)]

If that does not work, can you send your project to <a href="mailto:[email protected]">[email protected]</a>.

Thanks.

It's working now. So I guess it's due to Post Commit of UOM after action done?

Anyone can help on this?? I already catch the exception in action why still jump to Abp OnException process??

Yes,i tried but still not working.

The exception I got is as expected. I try to delete an record which has key constraint. The problem is I can't get a Json result with error message. Always asp.net yellow page html (error page) instead. The same code tested on default ASP.NET MVC project and working. Does any Abp function to intercept error and return error?

I've tried below configuration but still not working.

Configuration.Modules.AbpMvc().IsValidationEnabledForControllers = false;

btw: My Abp version is 1.0

I'm using ASP.NET MVC. I've tried to On/Off Custom Errors but always return Error Page when exception occurs.

Btw, same code has tested on classic MVC project and working. Not sure why error still pops after exception catched and processed. In this case I need to reture error message to client. After action executed, I also traced running into Application_Error in global.ascx.cs. Please help to verify, thanks.

[DontWrapResult]
        [AcceptVerbs(HttpVerbs.Post)]
        [AbpMvcAuthorize(AppPermissions.Pages_Master_Location_Delete)]
        public ActionResult Destroy([DataSourceRequest] DataSourceRequest request, LocationViewModel item)
        {
            try
            {
                if (item != null && item.Id.HasValue)
                {
                    _locationManager.Delete(item.Id.Value);
                }
            }
            catch (Exception ex)
            {
                ModelState.AddModelError("DeleteError", "error");
            }
            
            return Json(new[] { item }.ToDataSourceResult(request, ModelState));
        }

Response is not json but Asp.net exception instead. Please advice how to resolve.

Server Error in '/' Application.

The DELETE statement conflicted with the REFERENCE constraint "FK_dbo.AppStockAmount_dbo.AppLocation_LocationId". The conflict occurred in database "Demo", table "dbo.AppStockAmount", column 'LocationId'. The statement has been terminated.

Showing 1 to 10 of 12 entries