System.TypeLoadException - System.Security.Claim.ClaimsIdentity
System.TypeLoadException - System.Security.Claim.ClaimsIdentity
System.TypeLoadException - System.Security.Claim.ClaimsIdentity
System.TypeLoadException - System.Security.Claim.ClaimsIdentity
System.TypeLoadException - System.Security.Claim.ClaimsIdentity
System.TypeLoadException - System.Security.Claim.ClaimsIdentity System.TypeLoadException - System.Security.Claim.ClaimsIdentity System.TypeLoadException - System.Security.Claim.ClaimsIdentity System.TypeLoadException - System.Security.Claim.ClaimsIdentity System.TypeLoadException - System.Security.Claim.ClaimsIdentity System.TypeLoadException - System.Security.Claim.ClaimsIdentity System.TypeLoadException - System.Security.Claim.ClaimsIdentity System.TypeLoadException - System.Security.Claim.ClaimsIdentity
System.TypeLoadException - System.Security.Claim.ClaimsIdentity System.TypeLoadException - System.Security.Claim.ClaimsIdentity
System.TypeLoadException - System.Security.Claim.ClaimsIdentity
Go Back  Xtreme Visual Basic Talk > > > System.TypeLoadException - System.Security.Claim.ClaimsIdentity


Reply
 
Thread Tools Display Modes
  #1  
Old 06-27-2014, 10:07 AM
croser croser is offline
Newcomer
 
Join Date: Jan 2010
Posts: 6
Exclamation [RESOLVED] System.TypeLoadException - System.Security.Claim.ClaimsIdentity


Well, it's me again..
I've successfully resolved the other issue I had and got everything to work exactly the way I want it to. So the only thing left was to implement it into my application since I've made it in a different project so I wouldn't mess up the other app by accident. Now, the problem is that no matter how many times I try to replicate it, it doesn't seem to work. Even if I make a new application, completely step-by-step the way I did the first one. The references are added correctly ( I hope ), so what the hell is going on. Am I cursed or just plain stupid? MSDN, as always, was of no help..

Code:
TypeLoadException Class - The exception that is thrown when type-loading failures occur.  --- Well no sh|t sherlock..
As an example, here's the code from a fesh app.

Code:
Imports Npgsql
Imports System.Net

Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim myConnection As NpgsqlConnection = New NpgsqlConnection()
        myConnection.ConnectionString = "Server=127.0.0.1;Port=3306;Database=test;User Id=root;Password=;"
        Try
            myConnection.Open()
        Catch ex As Exception
            MsgBox(ex.Message)
        End Try
    End Sub
End Class
Exception :

Immediate window
Code:
A first chance exception of type 'System.TypeLoadException' occurred in Npgsql.dll
MsgBox
Code:
Could not load type 'System.Security.Claim.ClaimsIdentity' from assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.

Last edited by croser; 06-28-2014 at 07:57 AM.
Reply With Quote
  #2  
Old 06-27-2014, 12:59 PM
PlausiblyDamp's Avatar
PlausiblyDampSystem.TypeLoadException - System.Security.Claim.ClaimsIdentity PlausiblyDamp is offline
Ultimate Contributor

Forum Leader
* Expert *
 
Join Date: Nov 2003
Location: Newport, Wales
Posts: 2,058
Default

What version of .Net is your application targeting?
__________________
Intellectuals solve problems; geniuses prevent them.
-- Albert Einstein

Posting Guidelines Forum Rules Use the code tags
Reply With Quote
  #3  
Old 06-28-2014, 07:56 AM
croser croser is offline
Newcomer
 
Join Date: Jan 2010
Posts: 6
Default

Quote:
Originally Posted by PlausiblyDamp View Post
What version of .Net is your application targeting?
4.5 - But it seems to have fixed it self somehow .. when I re-added the reference for the zillionth time a warning poped up saying that the reference version doesn't match some other .. thing .. or something like that. I didn't really read it, but it offered a fix so I just clicked 'yes' and it started working..
It's funny how when I can't get something to work for hours and I post it up here as a last resort, it magically starts working.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
System.TypeLoadException - System.Security.Claim.ClaimsIdentity
System.TypeLoadException - System.Security.Claim.ClaimsIdentity
System.TypeLoadException - System.Security.Claim.ClaimsIdentity System.TypeLoadException - System.Security.Claim.ClaimsIdentity
System.TypeLoadException - System.Security.Claim.ClaimsIdentity
System.TypeLoadException - System.Security.Claim.ClaimsIdentity
System.TypeLoadException - System.Security.Claim.ClaimsIdentity System.TypeLoadException - System.Security.Claim.ClaimsIdentity System.TypeLoadException - System.Security.Claim.ClaimsIdentity System.TypeLoadException - System.Security.Claim.ClaimsIdentity System.TypeLoadException - System.Security.Claim.ClaimsIdentity System.TypeLoadException - System.Security.Claim.ClaimsIdentity System.TypeLoadException - System.Security.Claim.ClaimsIdentity
System.TypeLoadException - System.Security.Claim.ClaimsIdentity
System.TypeLoadException - System.Security.Claim.ClaimsIdentity
 
System.TypeLoadException - System.Security.Claim.ClaimsIdentity
System.TypeLoadException - System.Security.Claim.ClaimsIdentity
 
-->