I have an ASP.NET MVC 3 site that works without error in the debugger and on a few other PCs. However on some clients/pc's I just get an error message when trying to access information:
Error.An error occurred while processing your request.
Any ideas why this doesn't happen all the time and any idea how to track down the problem?
Related
In my ASP.NET Core MVC application, I'm trying to catch and isolate 503 error which is coming from the API project, we are intentionally stopping the app pool for the API in order to get the error and instead of this screen:
I want to redirect to a specific view, for example /Home/Error, is there an option to do that in the configuration of the ASP.NET Core MVC project?
Your application running in (or being accessed through) the ASP.NET Core Module is the service that is reported to be unavailable by this error page.
The 503 is returned by IIS, not by your application. The whole reason the 503 is returned, is because your application doesn't respond to IIS, so even if you wanted to, you can't return it from your application.
See Custom Error Page for Http Error 503 to change the IIS 503 error page.
I deploy my Laravel + vue project on the Digitalocean apps and some of my api are working but some are not.
When I look into the api response I received message: "Server Error",
But the api is working on localhost and gives error after the deployment.
Is there a way to view the actual error message of the api reponse? so that I can easily understand what causing the error and fix it.
But I really find it weird that it causing error in the digitalocean apps, but works on my local machine.
I've tried searching for hours how to view the errors but I can't find it.
please help me. Thank you!
You can log in to your server and look in the file storage/logs/laravel.log.
Otherwise, I would suggest using a service such as Bugsnag or Sentry, which have integrations with laravel and will give you a dashboard with all your errors
Some people suggest putting APP_DEBUG to true, but that is a security risk as your customers will be able to see the error as well, and you should never do this on a production server
Is it possible to show the request validation error message in the error page of my ASP.NET Core app when for instance Identity Server sends a: Requested scope not allowed: {myscope} ?
As it is now, all validation errors just show the /home/error?errorId=12345 page without further information.
So basically my question is: How do I get more details of the validation error?
You are not supposed to show detailed error messages to the end user - this is a security risk.
Use the log to find out exactly what is wrong.
i have an MVC3 application and i'm using Elmah to store the errors in a mysql database and even send those errors by email. This is working perfectly, now i have this javascript code in my main layout:
$(document).ajaxError(function (e, xhr, settings, exception) {
//SEND BACK TO SERVER THE EXCEPTION
});
Now, what i want to do is to get the catched exception (the ajax exception) and send back to server to a method that stores that exception with Elmah. Is that possible? If it isn't what choice do i have?
This following article shows some good guidance on how to log JavaScript errors back to Elmah:
Logging Errors with ELMAH in ASP.NET MVC 3 – Part 5 – (JavaScript)
I know the mechanism to report the error to the server is specific to MVC, but it should be easily adaptable to ASP.NET Web Forms as well if needed.
I have an ASP.NET MVC application that works fine most of the time. Occasionally, users complain that they submit an action request and the application appears to hang (i.e. no response is received by the browser even after several minutes and eventually the browser times out.) I can see from HttpWatch that the request is being submitted, IIS logs show the server receiving the request and the application logs show the request action being invoked and completing normally. HttpWatch gives an error which is usually 'ERROR_INTERNET_CONNECTION_RESET' or 'NS_ERROR_NET_RESET'.
The application also does a number of Ajax requests to the same server which all appear to function normally - the 'hang' situation only occurs on full HTTP page loads (i.e. not Ajax requests.)
At first I thought this was browser related, but it happens both with IE8 and IE9 and with FireFox 17, which may be the reason for the two different error messages posted above.c
Does anyone have any idea what the problem is?