Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have a webservice in my sharepoint site which uses System.Data.Linq to add some data to the database. If I make a call to this webservice, I get the following error:

The given assembly name or codebase, 'C:\Windows\assembly\GAC_MSIL\System.Data.Linq\3.5.0.0__b77a5c561934e089\System.Data.Linq.dll', was invalid.

How can I fix this error?

UPDATE: I've alreay added the assembly to the web.config:

<system.web> 
<compilation> 
  <assemblies> 
    <add assembly="System.Data.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" /> 
  </assemblies> 
</compilation> 

share|improve this question
    
Were you able to solve the problem, I am having the same issue . Please help –  user10823 Sep 20 '12 at 0:22
    
I think (but I am not sure) I ended up recreating the webapplication. It was in my development environment so it wasn't really a problem to do that. –  Marlou Nov 19 '12 at 16:00
    
Hem that Sounds That you have installed a newer Version of the .net Framework and Removed or damaged the .net version 3.5 (i do not Know how this can Happen..) can you try to Reitstall the .net Framework 3.5? –  Sascha May 28 at 5:01
    
It's ok =) Please add this in your question and I will delete my unhelpfull answer. Are u try to use this assembly from another application? May be it's realy corrupt. –  Fahim Boshunia Oct 4 at 20:19

1 Answer 1

You need to add entry to web.config of your application

  <system.web>
    <compilation>
      <assemblies>
        <add assembly="System.Data.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
      </assemblies>
    </compilation>
  </system.web>
share|improve this answer
    
I already did that, sorry forgot to write that in my post :( –  Marlou Mar 15 '12 at 12:48
    
It's ok =) Please add this in your question and I will delete my unhelpfull answer. Are u try to use this assembly from another application? May be it's realy corrupt. –  IAfanasov Mar 15 '12 at 16:43
    
If I use it from another application everything works fine. –  Marlou Mar 21 '12 at 13:13

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.