本文介绍了在调试中运行但不在生产中运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 我有一个简单的asp.net应用程序,它在调试模式下工作正常,但是当我在生产服务器上运行时崩溃在 以下行: Dim dt As DataTable Dim dt As System.Data.DataTable Dim dt As DataTable = New DataTable 错误消息如下:System.NullReferenceException:Object reference 未设置为实例对象。 这是声明dt的代码中唯一的位置。有趣的是,这将使b / b 在调试和生产中出错。有没有人有任何想法?我好了b $ b。 :) ScottI have a simple asp.net app which works fine in debug mode, but crashes onthe following line when I run it on the production server:Dim dt As DataTableI have tried the following variations which produce the same result:Dim dt As System.Data.DataTableDim dt As DataTable = New DataTableThe error message reads: System.NullReferenceException: Object referencenot set to an instance of an object.This is the only place in code that dt is declared. Funny that this willwork in debug and error out in production. Does anyone have any ideas? Iam out. :)Scott推荐答案 这篇关于在调试中运行但不在生产中运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 08-23 23:59