I have just started developing using the ASP.Net Iteration Zero and have added a few entities. I do an Ajax call to get an entity. When I get an error on the browser, it is just a popup with a big "X" saying [object Object] Internal Server Error
Is there a configuration parameter to allow me to display more information on the popup while debugging? I have to use Firebug in Firefox or the developer tools in Google Chrome to get more information. In this case the error from the POST is "The 'ObjectContent`1' type failed to serialize the response body for content type 'application/json; charset=utf-8'"
7 Answer(s)
-
0
Hi. I have the same problem. Do you find any solution?
-
0
Please someone help?
-
0
Hi all,
I am in a similar situation, but my problem comes from DTO Data Validation failed on the server side, however, all I have got from the pop-up windows is "Your request is not valid."
I have added all the DataAnnotations to the Input DTO with ErrorMessage set, but I can't get them to be displayed in that big pop-up.
The following is a sample of one Property from the AddressInput (DTO):
[Required(ErrorMessage = "Unit in Address is required")] [StringLength(5 , ErrorMessage = "Unit in Address can not be longer then 5 characters")] public string Unit { get; set; }
So what do we need to do to get these messages displayed in that pop-up?
-
0
I faced with this problem (object object internal server error) and I cant find any effective solution. Please help me Halil İbrahim Kalkan.
-
0
Hi,
Error popups for end users. So, no need to show every detail (like stacktrace) to end users. Detailed error and stack trace it logged to Logs folder of the web project (see exception handling doc: <a class="postlink" href="http://www.aspnetboilerplate.com/Pages/Documents/Handling-Exceptions">http://www.aspnetboilerplate.com/Pages/ ... Exceptions</a>).
You have several options here to find the actual error reason and details.
check logs.
add an exception event to your project (<a class="postlink" href="http://www.aspnetboilerplate.com/Pages/Documents/Handling-Exceptions#DocExceptionEvent">http://www.aspnetboilerplate.com/Pages/ ... ptionEvent</a>) and add a breakpoint here to debug de exceptions handled by ABP.
Set customErrors to Off (or better to RemoteOnly). In this case ABP does not handle errors. Thus, you can open Chrome Dev Tools Network tab and see ASP.NET's raw exception in the response.
For showing validation errors;
We think that validation should be done in the client side. So, showing validations are not needed normally. Server-side validation is most related to data integrity and security. For better user experience, apply all validation also in the client side. So, server always should receive valida data normally. If you want to show validations errors, you can override normal behaviour. ABP sends validation errors to the client. Which client do you use? If it's AngularJs, you can override abp.ng.http.showError method:
abp.ng.http.showError = function(error) { ... }
See default implementation: <a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate/blob/master/src/Abp.Web.Resources/Abp/Framework/scripts/libs/angularjs/abp.ng.js#L19">https://github.com/aspnetboilerplate/as ... .ng.js#L19</a>
You can check receiving error object to see it's structure (it will be JSON format of <a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate/blob/master/src/Abp.Web/Web/Models/ErrorInfo.cs">https://github.com/aspnetboilerplate/as ... rorInfo.cs</a>)
-
0
thank for your response. I set option RemoteOnly and recived this error: {"message":"An error has occurred.","exceptionMessage":"ComponentActivator: could not proxy Abp.WebApi.Controllers.Dynamic.DynamicApiController`1[[ISIRISampleDistribution.Laboratories.ILaboratoryAppService, ISIRISampleDistribution.Application, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]","exceptionType":"Castle.MicroKernel.ComponentActivator.ComponentActivatorException","stackTrace":" at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.CreateInstance(CreationContext context, ConstructorCandidate constructor, Object[] arguments)\r\n at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.Instantiate(CreationContext context)\r\n at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.InternalCreate(CreationContext context)\r\n at Castle.MicroKernel.ComponentActivator.AbstractComponentActivator.Create(CreationContext context, Burden burden)\r\n at Castle.MicroKernel.Lifestyle.AbstractLifestyleManager.CreateInstance(CreationContext context, Boolean trackedExternally)\r\n at Castle.MicroKernel.Lifestyle.AbstractLifestyleManager.Resolve(CreationContext context, IReleasePolicy releasePolicy)\r\n at Castle.MicroKernel.Handlers.DefaultHandler.ResolveCore(CreationContext context, Boolean requiresDecommission, Boolean instanceRequired, Burden& burden)\r\n at Castle.MicroKernel.Handlers.DefaultHandler.Resolve(CreationContext context, Boolean instanceRequired)\r\n at Castle.MicroKernel.Handlers.AbstractHandler.Resolve(CreationContext context)\r\n at Castle.MicroKernel.DefaultKernel.ResolveComponent(IHandler handler, Type service, IDictionary additionalArguments, IReleasePolicy policy)\r\n at Castle.MicroKernel.DefaultKernel.Castle.MicroKernel.IKernelInternal.Resolve(Type service, IDictionary arguments, IReleasePolicy policy)\r\n at Castle.MicroKernel.DefaultKernel.Resolve(Type service, IDictionary arguments)\r\n at Castle.Windsor.WindsorContainer.Resolve(Type service)\r\n at Abp.Dependency.IocManager.Resolve(Type type)\r\n at Abp.Dependency.IocResolverExtensions.ResolveAsDisposable[T](IIocResolver iocResolver, Type type)\r\n at Abp.WebApi.Controllers.AbpControllerActivator.Create(HttpRequestMessage request, HttpControllerDescriptor controllerDescriptor, Type controllerType)\r\n at System.Web.Http.Controllers.HttpControllerDescriptor.CreateController(HttpRequestMessage request)\r\n at System.Web.Http.Dispatcher.HttpControllerDispatcher.
-
0
I find it. You can enable angularjs directive debugging with below right after "var app = angular.module('app');" app.config(function($logProvider){ $logProvider.debugEnabled(true); }); with this command you can debug directives in browser's console window.