Swapping to Development Mode on Production Server

Kmcnet 806 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.
4,672 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,539 questions
Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
13,363 questions
{count} votes

Accepted answer
  1. Johan Smarius 470 Reputation points MVP
    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

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.