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

  • Home
  • SEARCH
  • 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 7008603
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T21:45:24+00:00 2026-05-27T21:45:24+00:00

In our SharePoint 2010 project we are using Linq to SharePoint to get a

  • 0

In our SharePoint 2010 project we are using Linq to SharePoint to get a list of ConfigurationItems. On our testing environments we never had issues fetching data from this list. On our production environment we are now sometimes (we cannot find a pattern right now) getting a null reference exception when looping through the items in the list.

Below is the exception whe are getting thrown from the Linq to SharePoint code:

Object reference not set to an instance of an object. StackTrace: 
at Microsoft.SharePoint.Linq.FieldRef.GetHashCode()
at Microsoft.SharePoint.Linq.FieldRef.FieldRefEqualityComparer.GetHashCode(FieldRef obj)
at System.Linq.Set`1.InternalGetHashCode(TElement value)  at System.Linq.Set`1.Find(TElement value, Boolean add)  at System.Linq.Enumerable.d__7a`1.MoveNext()
at System.Linq.Buffer`1..ctor(IEnumerable`1 source)  at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)  at Microsoft.SharePoint.Linq.SelectMappingInfo.GetDistinctMappedFields()
at Microsoft.SharePoint.Linq.Rules.PushDownProcessor.SelectWithInfoOp.PushDownSelect(Context ctx)
at Microsoft.SharePoint.Linq.Rules.PushDownProcessor.SelectWithInfoOp.Process(Context ctx)
at Microsoft.SharePoint.Linq.Rules.GuardedRule`4.c__DisplayClass7.b__6(TSourceBase src, TContext ctx)
at Microsoft.SharePoint.Linq.Rules.RewriteRule`2.Apply(TNode src, TContext ctx)  at Microsoft.SharePoint.Linq.Rules.CacheRule`3.Apply(TSource src, TContext ctx)  
at Microsoft.SharePoint.Linq.Rules.PushDownProcessor.b__0(Expression e, Context ctx)
at Microsoft.SharePoint.Linq.Rules.ChildRule`2.Apply(TNode src, TContext ctx)  at Microsoft.SharePoint.Linq.Rules.PushDownProcessor.b__3(Expression e, Context ctx)
at Microsoft.SharePoint.Linq.Rules.RewriteRule`2.Apply(TNode src, TContext ctx)  at Microsoft.SharePoint.Linq.Rules.CacheRule`3.Apply(TSource src, TContext ctx)  
at Microsoft.SharePoint.Linq.SPLinqProvider.Rewrite(Expression expression, List`1& assumptions)
at Microsoft.SharePoint.Linq.SPLinqProvider.RewriteAndCompile[T](Expression expression, List`1& assumptions)
at Microsoft.SharePoint.Linq.LinqQuery`1.GetEnumerator()
at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)  
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)  
at Common.Configuration.ConfigurationRepository.GetConfiguration(String siteUrl) InnerException:

Source: Microsoft.SharePoint.Linq TargetSite: Int32 GetHashCode()

And here the code we use in our GetConfiguration method.

using (SpDataContext dataContext = new SpDataContext(siteUrl))
{
    result = new ConfigurationModel()
    {
        Configurations = (from item in dataContext.GasportConfiguration
                          select new ConfigurationItem()
                          {
                              Key = item.Key,
                              Value = item.Value,
                              Environment = (Environment)Enum.Parse(typeof(Environment), item.Environment.ToString(), true)
                          }).ToList()
    };
}

Anyone having ideas on how to track this down to what’s causing this exception?

UPDATE 31-05-2011:

We found a pattern in which way we can reproduce this behaviour on our production environment. And also on our test environment we had this issue too, from which we extracted some Crash Dump files by using AdPlus.

We see this behaviour occuring after the application pool is recycled. The only way to fix this error is to perform a full IISreset.

In the crashdump analysis I found an exception message that states:
Exception Code: 0xC0000005
Exception Information: The thread tries to read from or write to a virtual address for which it does not have the appropriate access.

Hope that someone could give me some more information on this exception?

  • 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-27T21:45:24+00:00Added an answer on May 27, 2026 at 9:45 pm

    Unfortunately we haven’t found a solution for this issue and decided to move away from LINQ to SharePoint. For a few lists we have changed it to SQL tables (Linq to SQL) and for the SharePoint Lists we moved back to CAML.

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

Sidebar

Related Questions

My company has a project for which I proposed using SharePoint Enterprise 2010. We
I'm trying to brand our SharePoint 2010 site using designer but can't find the
We are 2 developers using remotely a server machine that hosts sharepoint 2010. Our
We're using silverlight on our SharePoint site. When someone navigates to the page containing
I would like to display an exchange calendar on our intranet using SharePoint or
Our team has built a site using Sharepoint and a few custom webparts. We've
We have a sharepoint instance on our network that we get automatically logged into
We are planning to create two sharepoint web applications using SharePoint 2010 Enterprise Edition.
For our sharepoint 2010 app's we need form base authentication(Claim base authentication). Is anybody
As part of our branding of Sharepoint 2010, we'll be modifying some custom HTML

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.