Asp.net app runs fine without issues on localhost. However, when published and I access via Chrome/Edge it does not work as intended (will not load the page when button is clicked). Is there a way to see what the live published version is doing in the code?
Tried replicating the issue in Visual Studio Debug, but could not recreate it
2
Answers
ASP.NET code is executed on the server, so there’s not a lot to see in the browser. You can use the Chrome/Edge developer tools (F12) to see what it is seeing, though. There might be helpful information in the console and especially in the network tab, where you can see what requests the app is making and what the server’s responses to them are in some detail. (I’ve had problems with web apps making assumptions about their path that didn’t apply once they were installed.) If you have sufficient access to the server, it might be helpful to look at its logs, especially if your app is returing 500 errors. It’s often a good idea to implement a lot of logging in your web app, using NLog, log4net, or similar libraries. Again, though, you have to have permission to write the logs and to look at them when you need to.
Please follow the normal debugging workflow:
Debugging tools are supported by most browsers and environments, which make debugging easier by stepping through the code so you can see what’s going on.