I have similar questions. In debug mode, how do I see the real exception message?
When I add my own applications (e.g. a POST for inserting a record into DB table), I first test it in swagger interface. Some times, I get a message in Response Body: "An internal error occurred during your request!" Usually, this message relates to an exception thrown from Database. It is very helpful for debugging, if I can read the exception message.
In release mode, I can read the exception details from Log.txt file. How do I find the similar Log file or "real exception message" while testing in swagger?
Thanks,
Understand now and tried this way. It works as expected!
Thank you very much!
I am trying Core + angular v4.1. The Web.Public is new on this version. Not sure how to "run mvc to seed data". Can you tell me more details?
Thanks,
I don't understand. Where does your quote come from?? What is the "interface for the 2nd DB entities"?
My situation is very similar to this topic. I searched on forum and read your code on GitHub, but still not clear.
I am using "ASP.NET Core & Angular2 v4.0". My case is almost same as your "phone book" example. The only difference is that I need a "Photo" property beside the "Name", "Surname", and "Email". The "Photo" is a jpg file with its file-name. The photo file should be saved in web server and the file name should be saved in database (like the Surname does).
This is a popular scenario in enterprise application. If you can modify the "phone book" example by adding a "Photo" property, many members will appreciate it a lot, I think.
Thanks,
Sorry for misunderstanding! Here are the content on IE console when I start or refresh:
DOM7011: The code on this page disabled back and forward caching. For more information, see: <a class="postlink" href="http://go.microsoft.com/fwlink/?LinkID=291337">http://go.microsoft.com/fwlink/?LinkID=291337</a>
HTML1300: Navigation occurred.
JQMIGRATE: Migrate is installed, version 3.0.0
ERROR TypeError: Unable to get property 'initialNavigation' of undefined or null reference "ERROR" { [functions]: , proto: { }, __zone_symbol__currentTask: { }, description: "Unable to get property 'initialNavigation' of undefined or null reference", message: "Unable to get property 'initialNavigation' of undefined or null reference", name: "TypeError", number: -2146823281, stack: "TypeError: Unable to get property 'initialNavigation' of undefined or null reference at t.prototype.isLegacyDisabled (<a class="postlink" href="http://dev1.bcnyintl.com/vendor.6de472b0d242e31b32de.bundle.js:455:2625">http://dev1.bcnyintl.com/vendor.6de472b ... s:455:2625</a>) at Anonymous function (<a class="postlink" href="http://dev1.bcnyintl.com/vendor.6de472b0d242e31b32de.bundle.js:455:1585">http://dev1.bcnyintl.com/vendor.6de472b ... s:455:1585</a>) at t.prototype.invoke (<a class="postlink" href="http://dev1.bcnyintl.com/polyfills.5200f14ee31dec345860.bundle.js:43:9702">http://dev1.bcnyintl.com/polyfills.5200 ... js:43:9702</a>) at onInvoke (<a class="postlink" href="http://dev1.bcnyintl.com/vendor.6de472b0d242e31b32de.bundle.js:371:8089">http://dev1.bcnyintl.com/vendor.6de472b ... s:371:8089</a>) at t.prototype.invoke (<a class="postlink" href="http://dev1.bcnyintl.com/polyfills.5200f14ee31dec345860.bundle.js:43:9702">http://dev1.bcnyintl.com/polyfills.5200 ... js:43:9702</a>) at n.prototype.run (<a class="postlink" href="http://dev1.bcnyintl.com/polyfills.5200f14ee31dec345860.bundle.js:43:4985">http://dev1.bcnyintl.com/polyfills.5200 ... js:43:4985</a>) at Anonymous function (<a class="postlink" href="http://dev1.bcnyintl.com/polyfills.5200f14ee31dec345860.bundle.js:43:2119">http://dev1.bcnyintl.com/polyfills.5200 ... js:43:2119</a>) at t.prototype.invokeTask (<a class="postlink" href="http://dev1.bcnyintl.com/polyfills.5200f14ee31dec345860.bundle.js:43:10359">http://dev1.bcnyintl.com/polyfills.5200 ... s:43:10359</a>) at onInvokeTask (<a class="postlink" href="http://dev1.bcnyintl.com/vendor.6de472b0d242e31b32de.bundle.js:371:7989">http://dev1.bcnyintl.com/vendor.6de472b ... s:371:7989</a>) at t.prototype.invokeTask (<a class="postlink" href="http://dev1">http://dev1</a>. Symbol(observable)_h.zpnj34hmwui: undefined, Symbol(rxSubscriber)_g.zpnj34hmwui: undefined }
ERROR Error: Uncaught (in promise): TypeError: Unable to get property 'initialNavigation' of undefined or null reference TypeError: Unable to get property 'initialNavigation' of undefined or null reference at t.prototype.isLegacyDisabled (<a class="postlink" href="http://dev1.bcnyintl.com/vendor.6de472b0d242e31b32de.bundle.js:455:2625">http://dev1.bcnyintl.com/vendor.6de472b ... s:455:2625</a>) at Anonymous function (<a class="postlink" href="http://dev1.bcnyintl.com/vendor.6de472b0d242e31b32de.bundle.js:455:1585">http://dev1.bcnyintl.com/vendor.6de472b ... s:455:1585</a>) at t.prototype.invoke (<a class="postlink" href="http://dev1.bcnyintl.com/polyfills.5200f14ee31dec345860.bundle.js:43:9702">http://dev1.bcnyintl.com/polyfills.5200 ... js:43:9702</a>) at onInvoke (<a class="postlink" href="http://dev1.bcnyintl.com/vendor.6de472b0d242e31b32de.bundle.js:371:8089">http://dev1.bcnyintl.com/vendor.6de472b ... s:371:8089</a>) at t.prototype.invoke (<a class="postlink" href="http://dev1.bcnyintl.com/polyfills.5200f14ee31dec345860.bundle.js:43:9702">http://dev1.bcnyintl.com/polyfills.5200 ... js:43:9702</a>) at n.prototype.run (<a class="postlink" href="http://dev1.bcnyintl.com/polyfills.5200f14ee31dec345860.bundle.js:43:4985">http://dev1.bcnyintl.com/polyfills.5200 ... js:43:4985</a>) at Anonymous function (<a class="postlink" href="http://dev1.bcnyintl.com/polyfills.5200f14ee31dec345860.bundle.js:43:2119">http://dev1.bcnyintl.com/polyfills.5200 ... js:43:2119</a>) at t.prototype.invokeTask (<a class="postlink" href="http://dev1.bcnyintl.com/polyfills.5200f14ee31dec345860.bundle.js:43:10359">http://dev1.bcnyintl.com/polyfills.5200 ... s:43:10359</a>) at onInvoke "ERROR" { [functions]: , proto: { }, description: "Uncaught (in promise): TypeError: Unable to get property 'initialNavigation' of undefined or null reference TypeError: Unable to get property 'initialNavigation' of undefined or null reference at t.prototype.isLegacyDisabled (<a class="postlink" href="http://dev1.bcnyintl.com/vendor.6de472b0d242e31b32de.bundle.js:455:2625">http://dev1.bcnyintl.com/vendor.6de472b ... s:455:2625</a>) at Anonymous function (<a class="postlink" href="http://dev1.bcnyintl.com/vendor.6de472b0d242e31b32de.bundle.js:455:1585">http://dev1.bcnyintl.com/vendor.6de472b ... s:455:1585</a>) at t.prototype.invoke (<a class="postlink" href="http://dev1.bcnyintl.com/polyfills.5200f14ee31dec345860.bundle.js:43:9702">http://dev1.bcnyintl.com/polyfills.5200 ... js:43:9702</a>) at onInvoke (<a class="postlink" href="http://dev1.bcnyintl.com/vendor.6de472b0d242e31b32de.bundle.js:371:8089">http://dev1.bcnyintl.com/vendor.6de472b ... s:371:8089</a>) at t.prototype.invoke (<a class="postlink" href="http://dev1.bcnyintl.com/polyfills.5200f14ee31dec345860.bundle.js:43:9702">http://dev1.bcnyintl.com/polyfills.5200 ... js:43:9702</a>) at n.prototype.run (<a class="postlink" href="http://dev1.bcnyintl.com/polyfills.5200f14ee31dec345860.bundle.js:43:4985">http://dev1.bcnyintl.com/polyfills.5200 ... js:43:4985</a>) at Anonymous function (<a class="postlink" href="http://dev1.bcnyintl.com/polyfills.5200f14ee31dec345860.bundle.js:43:2119">http://dev1.bcnyintl.com/polyfills.5200 ... js:43:2119</a>) at t.prototype.invokeTask (<a class="postlink" href="http://dev1.bcnyintl.com/polyfills.5200f14ee31dec345860.bundle.js:43:10359">http://dev1.bcnyintl.com/polyfills.5200 ... s:43:10359</a>) at onInvokeTask (<a class="postlink" href="http://">http://</a>", message: "Uncaught (in promise): TypeError: Unable to get property 'initialNavigation' of undefined or null reference TypeError: Unable to get property 'initialNavigation' of undefined or null reference at t.prototype.isLegacyDisabled (<a class="postlink" href="http://dev1.bcnyintl.com/vendor.6de472b0d242e31b32de.bundle.js:455:2625">http://dev1.bcnyintl.com/vendor.6de472b ... s:455:2625</a>) at Anonymous function (<a class="postlink" href="http://dev1.bcnyintl.com/vendor.6de472b0d242e31b32de.bundle.js:455:1585">http://dev1.bcnyintl.com/vendor.6de472b ... s:455:1585</a>) at t.prototype.invoke (<a class="postlink" href="http://dev1.bcnyintl.com/polyfills.5200f14ee31dec345860.bundle.js:43:9702">http://dev1.bcnyintl.com/polyfills.5200 ... js:43:9702</a>) at onInvoke (<a class="postlink" href="http://dev1.bcnyintl.com/vendor.6de472b0d242e31b32de.bundle.js:371:8089">http://dev1.bcnyintl.com/vendor.6de472b ... s:371:8089</a>) at t.prototype.invoke (<a class="postlink" href="http://dev1.bcnyintl.com/polyfills.5200f14ee31dec345860.bundle.js:43:9702">http://dev1.bcnyintl.com/polyfills.5200 ... js:43:9702</a>) at n.prototype.run (<a class="postlink" href="http://dev1.bcnyintl.com/polyfills.5200f14ee31dec345860.bundle.js:43:4985">http://dev1.bcnyintl.com/polyfills.5200 ... js:43:4985</a>) at Anonymous function (<a class="postlink" href="http://dev1.bcnyintl.com/polyfills.5200f14ee31dec345860.bundle.js:43:2119">http://dev1.bcnyintl.com/polyfills.5200 ... js:43:2119</a>) at t.prototype.invokeTask (<a class="postlink" href="http://dev1.bcnyintl.com/polyfills.5200f14ee31dec345860.bundle.js:43:10359">http://dev1.bcnyintl.com/polyfills.5200 ... s:43:10359</a>) at onInvokeTask (<a class="postlink" href="http://">http://</a>", name: "Error", originalStack: undefined, promise: { }, rejection: { }, stack: "Error: Uncaught (in promise): TypeError: Unable to get property 'initialNavigation' of undefined or null reference TypeError: Unable to get property 'initialNavigation' of undefined or null reference at t.prototype.isLegacyDisabled (<a class="postlink" href="http://dev1.bcnyintl.com/vendor.6de472b0d242e31b32de.bundle.js:455:2625">http://dev1.bcnyintl.com/vendor.6de472b ... s:455:2625</a>) at Anonymous function (<a class="postlink" href="http://dev1.bcnyintl.com/vendor.6de472b0d242e31b32de.bundle.js:455:1585">http://dev1.bcnyintl.com/vendor.6de472b ... s:455:1585</a>) at t.prototype.invoke (<a class="postlink" href="http://dev1.bcnyintl.com/polyfills.5200f14ee31dec345860.bundle.js:43:9702">http://dev1.bcnyintl.com/polyfills.5200 ... js:43:9702</a>) at onInvoke (<a class="postlink" href="http://dev1.bcnyintl.com/vendor.6de472b0d242e31b32de.bundle.js:371:8089">http://dev1.bcnyintl.com/vendor.6de472b ... s:371:8089</a>) at t.prototype.invoke (<a class="postlink" href="http://dev1.bcnyintl.com/polyfills.5200f14ee31dec345860.bundle.js:43:9702">http://dev1.bcnyintl.com/polyfills.5200 ... js:43:9702</a>) at n.prototype.run (<a class="postlink" href="http://dev1.bcnyintl.com/polyfills.5200f14ee31dec345860.bundle.js:43:4985">http://dev1.bcnyintl.com/polyfills.5200 ... js:43:4985</a>) at Anonymous function (<a class="postlink" href="http://dev1.bcnyintl.com/polyfills.5200f14ee31dec345860.bundle.js:43:2119">http://dev1.bcnyintl.com/polyfills.5200 ... js:43:2119</a>) at t.prototype.invokeTask (<a class="postlink" href="http://dev1.bcnyintl.com/polyfills.5200f14ee31dec345860.bundle.js:43:10359">http://dev1.bcnyintl.com/polyfills.5200 ... s:43:10359</a>) at onInvokeTask (", Symbol(observable)_h.zpnj34hmwui: undefined, Symbol(rxSubscriber)_g.zpnj34hmwui: undefined, task: { }, zone: { } }
I have emailed a link to <a href="mailto:[email protected]">[email protected]</a>.
Thank you!
I tried again by copy/paste your command in VS 2007 Package Manager Console, and got the error massage below:
PM> Add-Migration "Added_Customers_Table" -ConfigurationTypeName "App1DbContextConfigurer" Add-Migration : A parameter cannot be found that matches parameter name 'ConfigurationTypeName'. At line:1 char:39
~~~~~~~~~~~~~~~~~~~~~~
What did I miss?
By the way, how do I send you my project? Shall I zip all files in aspnet-core\src*.EntityFrameworkCore, and attach this zip file on email?
Thanks,
DEBUG 2017-06-16 09:48:03,440 [libuv] Microsoft.AspNetCore.Server.Kestrel - Connection id "0HL5KA9N3RQA3" started. INFO 2017-06-16 09:48:03,440 [31 ] soft.AspNetCore.Hosting.Internal.WebHost - Request starting HTTP/1.1 GET <a class="postlink" href="http://host.mydomain.com/AbpUserConfiguration/GetAll">http://host.mydomain.com/AbpUserConfiguration/GetAll</a> application/json INFO 2017-06-16 09:48:03,440 [31 ] entication.JwtBearer.JwtBearerMiddleware - Bearer was not authenticated. Failure message: No SecurityTokenValidator available for token: null DEBUG 2017-06-16 09:48:03,440 [31 ] NetCore.StaticFiles.StaticFileMiddleware - The request path /AbpUserConfiguration/GetAll does not match a supported file type DEBUG 2017-06-16 09:48:03,440 [31 ] Microsoft.AspNetCore.Routing.RouteBase - Request successfully matched the route with name 'defaultWithArea' and template '{area}/{controller=Home}/{action=Index}/{id?}'. DEBUG 2017-06-16 09:48:03,440 [31 ] .AspNetCore.Mvc.Internal.MvcRouteHandler - No actions matched the current request DEBUG 2017-06-16 09:48:03,440 [31 ] Microsoft.AspNetCore.Routing.RouteBase - Request successfully matched the route with name 'default' and template '{controller=Home}/{action=Index}/{id?}'. DEBUG 2017-06-16 09:48:03,445 [31 ] ore.Mvc.Internal.ControllerActionInvoker - Executing action Abp.AspNetCore.Mvc.Controllers.AbpUserConfigurationController.GetAll (Abp.AspNetCore) INFO 2017-06-16 09:48:03,446 [31 ] ore.Mvc.Internal.ControllerActionInvoker - Executing action method Abp.AspNetCore.Mvc.Controllers.AbpUserConfigurationController.GetAll (Abp.AspNetCore) with arguments ((null)) - ModelState is Valid DEBUG 2017-06-16 09:48:03,451 [31 ] ore.Mvc.Internal.ControllerActionInvoker - Executed action method Abp.AspNetCore.Mvc.Controllers.AbpUserConfigurationController.GetAll (Abp.AspNetCore), returned result Microsoft.AspNetCore.Mvc.JsonResult. INFO 2017-06-16 09:48:03,473 [29 ] matters.Json.Internal.JsonResultExecutor - Executing JsonResult, writing value Abp.Web.Models.AjaxResponse. INFO 2017-06-16 09:48:03,474 [29 ] ore.Mvc.Internal.ControllerActionInvoker - Executed action Abp.AspNetCore.Mvc.Controllers.AbpUserConfigurationController.GetAll (Abp.AspNetCore) in 28.9905ms DEBUG 2017-06-16 09:48:03,474 [29 ] Microsoft.AspNetCore.Server.Kestrel - Connection id "0HL5KA9N3RQA3" completed keep alive response. INFO 2017-06-16 09:48:03,474 [29 ] soft.AspNetCore.Hosting.Internal.WebHost - Request finished in 33.8824ms 200 application/json; charset=utf-8 INFO 2017-06-16 09:48:03,950 [26 ] soft.AspNetCore.Hosting.Internal.WebHost - Request starting HTTP/1.1 GET <a class="postlink" href="http://host.mydomain.com/api/services/app/Session/GetCurrentLoginInformations">http://host.mydomain.com/api/services/a ... formations</a> application/json; charset=UTF-8 DEBUG 2017-06-16 09:48:03,950 [26 ] NetCore.StaticFiles.StaticFileMiddleware - The request path /api/services/app/Session/GetCurrentLoginInformations does not match a supported file type DEBUG 2017-06-16 09:48:03,950 [26 ] osoft.AspNetCore.Routing.Tree.TreeRouter - Request successfully matched the route with name '(null)' and template 'api/services/app/Session/GetCurrentLoginInformations'. DEBUG 2017-06-16 09:48:03,956 [26 ] ore.Mvc.Internal.ControllerActionInvoker - Executing action SNet.Sessions.SessionAppService.GetCurrentLoginInformations (SNet.Application) INFO 2017-06-16 09:48:03,964 [26 ] ore.Mvc.Internal.ControllerActionInvoker - Executing action method SNet.Sessions.SessionAppService.GetCurrentLoginInformations (SNet.Application) with arguments ((null)) - ModelState is Valid DEBUG 2017-06-16 09:48:03,967 [29 ] ore.Mvc.Internal.ControllerActionInvoker - Executed action method SNet.Sessions.SessionAppService.GetCurrentLoginInformations (SNet.Application), returned result Microsoft.AspNetCore.Mvc.ObjectResult. DEBUG 2017-06-16 09:48:03,968 [29 ] etCore.Mvc.Internal.ObjectResultExecutor - Could not find an output formatter based on content negotiation. Accepted types were (application/json; charset=UTF-8) DEBUG 2017-06-16 09:48:03,968 [29 ] etCore.Mvc.Internal.ObjectResultExecutor - Selected output formatter 'Microsoft.AspNetCore.Mvc.Formatters.JsonOutputFormatter' and content type 'application/json' to write the response. INFO 2017-06-16 09:48:03,968 [29 ] etCore.Mvc.Internal.ObjectResultExecutor - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. INFO 2017-06-16 09:48:03,968 [29 ] ore.Mvc.Internal.ControllerActionInvoker - Executed action SNet.Sessions.SessionAppService.GetCurrentLoginInformations (SNet.Application) in 11.8885ms DEBUG 2017-06-16 09:48:03,968 [29 ] Microsoft.AspNetCore.Server.Kestrel - Connection id "0HL5KA9N3RQA3" completed keep alive response. INFO 2017-06-16 09:48:03,968 [29 ] soft.AspNetCore.Hosting.Internal.WebHost - Request finished in 18.1213ms 200 application/json; charset=utf-8
It is amazing! It works on many cases as my test. :o
However, it is still adding filters into url string. As my test, if the filters' value is too long (e.g. 2500 characters), it responses with 404 error code. :(
In my application, the search criteria contain multiple filters with complex objects. It is easy to over the url length limit. Do you have another way to pass filter object? :?:
Thanks,