C# NullReferenceException:对象引用未设置为对象的实例。SQL Server

C# NullReferenceException:对象引用未设置为对象的实例。SQL Server,c#,mysql,asp.net,web-config,C#,Mysql,Asp.net,Web Config,我无法在服务器上运行此asp.net脚本 我得到这个错误: “/”应用程序中出现服务器错误 对象引用未设置为对象的实例 描述:执行当前web请求期间发生未处理的异常。请查看堆栈跟踪以了解有关错误的更多信息以及错误在代码中的起源 异常详细信息:System.NullReferenceException:对象引用未设置为对象的实例 源错误: 在执行当前web请求期间生成了未经处理的异常。有关异常的起源和位置的信息可以使用下面的异常堆栈跟踪来识别 堆栈跟踪: [NullReferenceExcepti

我无法在服务器上运行此asp.net脚本

我得到这个错误:

“/”应用程序中出现服务器错误

对象引用未设置为对象的实例

描述:执行当前web请求期间发生未处理的异常。请查看堆栈跟踪以了解有关错误的更多信息以及错误在代码中的起源

异常详细信息:System.NullReferenceException:对象引用未设置为对象的实例

源错误:

在执行当前web请求期间生成了未经处理的异常。有关异常的起源和位置的信息可以使用下面的异常堆栈跟踪来识别

堆栈跟踪:

[NullReferenceException: Object reference not set to an instance of an object.]
   Gilass.ApplicationBase.SQLDataProvider.Select(String srcTable, String whereClause, String orderClause, Boolean noSecure) +455
   Gilass.ApplicationBase.SQLDataProvider.Select(String srcTable, String whereClause, String orderClause) +19
   Gilass.ApplicationBase.HostSettings.Get(String settingName) +79
   GilassSocial.Global.Application_Start(Object sender, EventArgs e) +418

[HttpException (`0x80004005`): Object reference not set to an instance of an object.]
   System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) `+3985477`
   System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +191
   System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +325
   System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +407
   System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +375

[HttpException (0x80004005): Object reference not set to an instance of an object.]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +11524352
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +141
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +4782309

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1
我想我需要更改web.config中的某些内容,这是我的web.config信息:

<Gilass>
    <data defaultProvider="WIN-AK7E554L8NA\SQLEXPRESS">
      <providers>
        <clear/>
        <add name="WIN-AK7E554L8NA\SQLEXPRESS" type="WIN-AK7E554L8NA\SQLEXPRESS" connectionString="Server=127.0.0.1;Database=db_name;uid=gilass;pwd=****;" providerPath="~\" objectQualifier="" databaseOwner="gilass" upgradeConnectionString="" />
      </providers>
    </data>
  </Gilass>

有什么建议吗


提前感谢

您是否使用多个表单?像master中的一个,aspx中的一个或其他地方的一个?不,但是,我认为web.config文件中有一个错误,您能检查这个文件吗?我还可以提供从服务器的访问来检查它。谢谢