Can't connect to oracle in .net core web api — oracle-tech

    Forum Stats

  • 3,715,998 Users
  • 2,242,925 Discussions


Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Can't connect to oracle in .net core web api

edited August 2018 in ODP.NET

I have the following code:

using(OracleConnection conn = new OracleConnection(connectionstring))


     var test = connection.Query<dynamic>("SELECT * FROM TABLE1")


When I run that, I get the following exception:

System.TypeLoadException: 'Could not load type 'System.Security.Principal.WindowsImpersonationContext' from assembly 'mscorlib, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089'.'

Why do I get this error? I have the latest beta installed.


This discussion has been closed.