Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6178707
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T00:30:18+00:00 2026-05-24T00:30:18+00:00

I have a VB.NET solution that I just upgraded. It was originally in .NET

  • 0

I have a VB.NET solution that I just upgraded. It was originally in .NET 1.1, I upgraded to .NET 2.0 and verified that it would build and run correctly. Then I upgraded from 2.0 to 4.0. It is still building with no errors, but when I try to run I am getting a NullReferenceException in Global.asax.vb. The really weird thing is, the line that is throwing the exception is this:

Dim dt As System.Data.DataTable

I am not trying to use the variable, just declare it. Further down a Function is called that returns a DataTable and sets the variable, but I don’t even get to that line. It is throwing the NullReferenceException on the Dim line. Has anyone run across this before? Is this some issue with upgrading?

Edit

Okay, this is the first line in a function. The surrounding code looks like this.

Private Function GetUserRoles() As String    
    Dim dt As System.Data.DataTable
    Dim oDBLookup As New DBLookups

I updated it to this, which should make no difference.

Private Function GetUserRoles() As String
    Dim oDBLookup As New DBLookups
    Dim dt As System.Data.DataTable

Now, the NullReferenceException is happening on the new first line in the function.

    Dim oDBLookup As New DBLookups

The GetUserRoles() Function is the first line in Application_AuthenticateRequest that isn’t a Dim or If statement.

Sub Application_AuthenticateRequest(ByVal sender As Object, ByVal e As EventArgs)
    ' Fires upon attempting to authenticate the user
    Dim authCookie As HttpCookie = Context.Request.Cookies("GROUPCOOKIES")
    Dim Groups As String
    Dim noGroups As Boolean = False
    If authCookie Is Nothing Then
        Groups = GetUserRoles()

I did a Rebuild Solution before posting. This is a web application and the only files I see in the bin folder are the dll files I am referencing. I’m not sure what else I should clean up.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T00:30:20+00:00Added an answer on May 24, 2026 at 12:30 am

    It sounds like the solution may not have rebuilt properly and is appearing to throw the exception there even though it’s actually occurring somewhere else because the source is different than the debug symbols. Try cleaning the solution, manually deleting all your bin and obj directories, then rebuilding and re-running.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just upgraded a VS 2008 solution containing WinForms, general use libraries, and a
We have a ASP.Net web application running in Visual Studio 2010 that is targeting
Context: C# 3.0, .Net 3.5 Suppose I have a method that generates random numbers
I've just converted my ASP.NET MVC1 VS2008 .NET3.5 solution to ASP.NET MVC3 VS2010 .NET4.0
This may have been answered before, but I cannot find a solution that works.
I have a c# solution with 3 projects - Data, WCF and UI. The
I have a wierd problem that i need to work out how to resolve,
I am trying to develop a .NET 3.5 service application that uses: WCF for
I have a simple question that I think someone will answer very fast, but
Sometimes I've seen a solution that includes up to three .csproj files for each

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.