All Questions
Tagged with error-handling asp.net
542
questions
0
votes
0
answers
73
views
Error handling in Azure function with custom class
My login function looks like this:
[Function("Loginxyz")]
public async Task<IActionResult> GenerateToken(
[HttpTrigger(AuthorizationLevel.Anonymous, "post", Route = &...
-6
votes
0
answers
39
views
this Code gives error of 'An error occurred while updating the entries. See the inner exception for details.' [closed]
[HttpPost]
public ActionResult AddApprovalStage(string Levels, string PlantCode)
{
try
{
var levelsList = JsonConvert.DeserializeObject<List<ApprovalStageViewModel>>(Levels)...
0
votes
0
answers
26
views
?aspxerrorpath= query string with invalid route breaks the custom error page in asp.net
If you setup your MVC web application to use a custom error page using the custom errors element in your web.config it works fine until you ask for a non-existent route with a very specific ...
0
votes
1
answer
75
views
Why does my error handler doesn't work in asp net?
I'm using a global error handler in ASP.NET Core 7.0:
public class ErrorHandlingMiddleware
{
private readonly RequestDelegate _next;
public ErrorHandlingMiddleware(RequestDelegate ...
0
votes
0
answers
107
views
Error response rewritten in Azure App Services even after disabling all custom errors
We have a website deployed to an Azure App Service, and for the most part it's working fine. The exception is an ASHX handler we've written to provide some pre-signup validation in our Azure B2C ...
0
votes
2
answers
153
views
Flexible way to handle exception in Web API
I'm currently making a web API with .NET 6.
The code bellow is my Exception handler class:
public class ExceptionsMiddleware
{
private readonly RequestDelegate requestDelegate;
...
0
votes
1
answer
1k
views
ProblemDetails response does not contain TraceId property
I am trying to setup .NET ProblemDetails Service
I have following code in Program.cs
var builder = WebApplication.CreateBuilder(args);
// Add services to the container.
builder.Services....
0
votes
1
answer
133
views
How to handle exceptions in razor.cs files and display them globally in the console? BlazorWebAssembly
I want to create a middleware that will catch an error in the program if it occurs and display its information in the brower console.
What I mean is a functionality that will make it so that if an ...
0
votes
0
answers
462
views
How Do I Disable IIS Error Pages And Handle Errors In Global.asax?
I've been trying to disable IIS error handling so I can capture all errors in Global.asax.
I am running Windows 2012 with IIS version 6.2.
For example, when I navigate to a missing image file such as:
...
-1
votes
3
answers
14k
views
HTTP Error 404.0 (Error Code 0x80070002) - IIS 10, .NET 4.0
I have an issue with my default error page. Currently, it keeps displaying the following error.
The custom error HTML page file is in the same folder as the web.config, I have tried changing the ...
0
votes
3
answers
341
views
Label is not visible . I need to show a message please wait when the user clicks login
Label is not visible in the following code . I need to show a message please wait when the user clicks login.It shows before but after adding the time interval its not showing
Private Sub ...
0
votes
1
answer
199
views
ASP.NET Formview Textbox value- Object reference not set to an instance of an object
I would like to know whether or not this control is null once the page loads before I perform another operation. At the moment it just throws the object reference error.
protected void ...
0
votes
1
answer
1k
views
.NET 5 - Correctly handling expected 404 or 400 errors in a web API
I'm looking for a correct way to handle the expected errors in my web API.
For example, i have a endpoint with 2 possible responses.
200 OK, with a result object
404 Not Found, with a ApiError object,...
2
votes
1
answer
339
views
Customize azure 403 Forbidden error page for ASP.Net web app
Please do help me to customize azure 403 forbidden error page for Asp.Net. below is the picture what I am getting, if I return 403 forbidden.
0
votes
0
answers
21
views
What error handlers to add to my web app on asp.net?
I have this asp.net mvc application and for now I have added some error handlers.
I have 1). that checks if user input is correct or not;
2).If string.nullorwhitespaces;
3).If the user input exists on ...