Swapping to Development Mode on Production Server

Kmcnet 566 Reputation points
2023-09-05T00:05:37.69+00:00

Hello everyone and thanks for the help in advance. I need to debug an Asp.Net Core MVC application on a production server as I am receiving the generic error page from one particular dataset, but cannot reproduce it on a test machine. I have read some articles on enabling development mode, but most seem to require global changes to the production server which really isn't possible. Server is running Windows Server 2022 and developed using VS 2022. Any help would be appreciated.

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
3,547 questions
Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
10,550 questions
ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
981 questions
{count} votes

Accepted answer
  1. Johan Smarius 390 Reputation points
    2023-09-06T12:51:41.5033333+00:00

    If you cannot remote debug your solution you could try to comment out the UseExceptionHandler() and add UseDeveloperExceptionPage() for all configurations. But be very careful doing this, because hackers love developer exception information, so keep this code change live as short as possible.

    User's image

    0 comments No comments

0 additional answers

Sort by: Most helpful