I have a WCF Application with this layers
I Set ConnectionString in to layers
I. in DataAccess that have edmx model
II. in Console Test Application that I use proxy class of WCF for intraction with it
but when I run Console Test shows this error !!!
seems DataAccess layer can not find existing connection string but WHY ?
What is Wrong ?!?!?!
I check existing connection string with the following code
STRANGE !!! I dont have above connection string !!!
Do you have the connection string in your WCF service library app.config? Depending on how it is being hosted, it could be looking it there.
I do not know the reason but this has occurred for me whenever I use three-tier programming. The solution for this problem is simple.
First, copy the configuration file which is located in your DataAccessLayer and place it (paste) to the location in which the configuration file of the program is (you have to replace the configuration file of the BusinessLayer with the configuration file of the DataAccessLayer).
Second, Add the following DLLs to the references of your presentation layer:
EntityFramework.dll
EntityFramework.SqlServer.dll
EntityFramework.SqlServer.dll
EntityFramework.dll
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.