简体   繁体   English

诊断部署到生产环境C#.NET的.NET代码中的问题

[英]Diagnose issues in .NET code deployed to a production environment, C# .NET

I want to find out what methods or tools in general can be used diagnose issues in .NET code deployed to a production environment. 我想找出一般可以使用哪些方法或工具来诊断部署到生产环境的.NET代码中的问题。

Thanks! 谢谢!

Update 更新资料

The types of application on live: Web application, WCF application. 实时应用程序的类型:Web应用程序,WCF应用程序。

Depending on the type of issue I am looking at, I usually go down this list: 根据要查看的问题类型,通常会在以下列表中列出:

  1. Custom logs (if any). 自定义日志(如果有)。
  2. Event logs. 事件日志。
  3. .NET, IIS and ASP.NET Performance Counters. .NET,IIS和ASP.NET性能计数器。
  4. Add Soap tracing, System.Net tracing, System.Net.Sockets tracing. 添加Soap跟踪,System.Net跟踪,System.Net.Sockets跟踪。
  5. WinDbg memory/crash dump analysis. WinDbg内存/崩溃转储分析。

If your .NET project is deployed to the production environment it's rather hard to debug it. 如果将.NET项目部署到生产环境中,则很难对其进行调试。

The one way is to have some logging tools integrated into software (eg log4net ) and to analyse the log messages. 一种方法是将一些日志记录工具集成到软件中(例如log4net )并分析日志消息。

What kind of product your interested in? 您对哪种产品感兴趣? Desktop or Web? 桌面还是网络?

Anyway in any case you need log all unusual actions in any project. 无论如何,无论如何您都需要记录任何项目中的所有异常动作。

For web application I recomend to use ELMAH whitch can be accessed remotelly and you can review all error and information records in it. 对于Web应用程序,我建议您使用ELMAH whitch,可以远程访问它,并且您可以查看其中的所有错误和信息记录。 As data source here can be xml, db or plain text file. 作为数据源,这里可以是xml,db或纯文本文件。

For desktop applications you still need to log errors and it would be really helphul to post errors to the server via some kind of "Report Bug" form. 对于桌面应用程序,您仍然需要记录错误,并且通过某种“报告错误”表格将错误发布到服务器上确实是一个帮助。

As a general idea, an administrative console implemented into the application can be used to query its internal state. 通常,可将实现到应用程序中的管理控制台用于查询其内部状态。

This can be as simple as a status page in a web application that queries if the database server can be pinged, or as extensive as a transparent pull-down console that supports your custom DSL . 它可以像查询数据库服务器是否可以被ping通的Web应用程序中的状态页面一样简单,也可以像支持您的自定义DSL的透明下拉控制台一样广泛。 An example to the latter might be some games from which one can query or update the game's internal data (commands such as 'GET_OBJECT_PROPERTIES #objectId' or 'ADD_WEAPON_TO_PLAYER #playerNumber #weaponId', etc). 后者的示例可能是一些游戏,可以从中查询或更新游戏的内部数据(诸如“ GET_OBJECT_PROPERTIES #objectId”或“ ADD_WEAPON_TO_PLAYER #playerNumber #weaponId”之类的命令)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 诊断第三方程序集中的问题,C#.NET - Diagnose issues in third party assembly, C# .NET Angular 8 - 路由在本地工作,但在生产环境中部署时,路由不起作用 - .NET 核心 C# 后端 - Angular 8 - routing works locally, but when deployed on Production, routes don't work - .NET Core C# backend .NET Tiff问题C# - .NET Tiff Issues C# 从背后的C#代码调用JavaScript函数的问题(.NET) - Issues calling JavaScript function from C# code behind (.NET) Mutex在ASP.NET C#代码中发布问题 - Mutex release issues in ASP.NET C# code C# ASP.NET Core - 在已部署的 Web 应用程序/API 中定期/自动运行代码 - C# ASP.NET Core - run code periodically/automatically in a deployed web app/API Twilio SMS 无法通过部署到 Web 服务器的 ASP.NET MVC C# web 工作(但在本地测试环境中工作正常) - Twilio SMS not working via ASP.NET MVC C# web deployed to Web Server (but works fine in local test environment) 如何诊断尝试在 c# .NET Core 中获取 OAuth2 不记名令牌的 401 错误? - How to diagnose a 401 error attempting to get an OAuth2 bearer token in c# .NET Core? 在C#/ .NET环境中对输入进行全局验证? - Global validation of input in a C#/.NET environment? 建议使用C#编写Test并在vb.net中编写生产代码 - Would it be recommended to write Test in C# and production code in vb.net
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM