PDA

View Full Version : [CLOSED] Developer Exception Page not working



plok77
Jul 09, 2021, 8:50 AM
How to reproduce:


Create a new Ext.NET Core web application from a developer command prompt using the command 'dotnet new extnet'
Change one of the pages (e.g. GridPanel.cshtml.cs) to throw an exception on page load
Press F5 to run the application in developer mode and navigate to the page that throws the exception
Check the server response. A 500 error will be returned with no page output.


Contrast this with creating a new empty Razor Pages app via the command 'dotnet new webapp' and throwing an exception on the loading of a page. The developer exception page will be returned to the user.

Is this a known issue with Ext.NET v7?

Thanks

Paul

fabricio.murta
Jul 10, 2021, 1:51 AM
Hello Paul!

Yes, we internally noticed this problem but at the time it seemed the benefit of live reload outstaged this side effect, which may not really have been a good choice. This is not really an Ext.NET issue, but live reload library it uses. The way they inject code to the page makes it so it does not handle exceptions, and simply outputs nothing in case there is one. Simply disabling live reload enables proper exception display. You want to comment out Startup.cs lines 61 and 74:



61: //services.AddLiveReload();
74: //app.UseLiveReload();


We've created issue #1861 (https://github.com/extnet/Ext.NET/issues/1861) to track this problem and we will post a follow-up here as soon as the problem is fixed in the template or library (would require at least a library version update from the template).

Hope this helps!

plok77
Jul 16, 2021, 5:44 PM
Thanks, removing Live Reload fixed it

fabricio.murta
Jul 19, 2021, 1:17 PM
Oh, glad it helped, and thanks for the feedback!