Referencing App.config file through a .NET class library DLL in ColdFusion 9

我们两清 提交于 2019-12-11 10:24:03

问题


I'm currently developing DLLs in .NET that use Entity Framework to access our database.

It is my understanding that DLLs do not have ties with the same App.config files as exe applications do. Through a good amount of research, I have learned that DLLs do not contain App.config and are best left agnostic(config) so the program using the DLL can determine the config.

I'm receiving this error and am sure that the connection string is defined in my app.config:

System.InvalidOperationException: No connection string named 'MyEntities' could be found in the application config file.

I'm positive that I would like the config file to always be the same DLL and would appreciate any suggestions that may point me towards "best practices" in achieving this implementation.

Thanks in advance,

Russ

来源:https://stackoverflow.com/questions/27494015/referencing-app-config-file-through-a-net-class-library-dll-in-coldfusion-9

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!