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

    Forum Stats

  • 3,715,998 Users
  • 2,242,925 Discussions
  • 7,845,726 Comments

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

50da4056-a093-4c14-8663-8396279e223c
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=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.'

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

Answers

This discussion has been closed.