Error with connection string (dll.config) in third party app

Error with connection string (dll.config) in third party app

Postby yzolotarev » Tue 13 Jun 2017 20:21

Hello!
I wonder if anyone else had this problem. I set up a db first console app project to, hooked up to the oracle db just fine. Everything works perfect, I create ObjectContext objext and update the DB from code no problem.

However if I create a simple class library and pop this dll into another app (Wealth Lab) where I want to access this connection and create an object the same way as I did on a console app I get en error.

"The specified named YZDEVELOPEREntitiesonnection is either not found in the configuration, not intended to be used with the EntityClient provider, or not valid."

I do the same procedures as with the Console App where everything worked perfectly but it crashed if I run this under another app and I think the problem might be somehow with the projectname.dll.config that is somehow ignored by the third party app... Can anyone suggest a workaround or at least a hint on how to debug the matter a litter further? Thank you!
yzolotarev
 
Posts: 2
Joined: Tue 13 Jun 2017 20:14

Re: Error with connection string (dll.config) in third party app

Postby yzolotarev » Tue 13 Jun 2017 21:06

Just relized the app that the assembly is loaded to uses its own app.config so anything that is put into the dlls app.config is simply ignored. If anyone ever comes across this situation here is a link to a workaround https://stackoverflow.com/questions/5190539/equivalent-to-app-config-for-a-library-dll/41993955#41993955.
yzolotarev
 
Posts: 2
Joined: Tue 13 Jun 2017 20:14

Re: Error with connection string (dll.config) in third party app

Postby Shalex » Wed 14 Jun 2017 19:42

Thank you for confirming the fix.
Shalex
Devart Team
 
Posts: 7654
Joined: Thu 14 Aug 2008 12:44


Return to dotConnect for Oracle