No connection string named 'MyEntities' could be found in the application config file
Try copying the connections string to the .config file in the MVC project.
No connection string named could be found in the application config file
You say "within my DAL, I have a webConfig". I guess the connection string is in the configuration file of a referenced class library, but not in the main configuration file you have in your entry project (a web api project, I guess looking at the tags).
If so, just copy the connection string in the entry project configuration file.
No connection string named xxx' could be found in the application config file
I've been having the exact same problem, and the answer is IT'S BUGGY! In my case, my DbContext subclass is expecting a connection string in app.config, so that is what you must provide under <configuration>
<connectionStrings>
<add name="NameOfMyContext" connectionString="RemovedForSecurity" providerName="System.Data.SqlClient" />
</connectionStrings>
Now, build and run the project. Go into the /bin/Debug/ folders until you find the yourappname.exe and the yourappname.exe.config files. Examine the yourappname.exe.config file. This is a weird blend of your various xml config files from your project. Make sure your connection string is in there.
I've had a very buggy experience with that file. Doing a "clean" doesnt remove it, so you can wind up in a situation where you remove all references to the connection string in your project (i.e. remove it from app.config), and your app still works because the string remains in that odd .exe.config file.
No connection string named 'MyApplicationEntities' could be found in the application config file
Ah, figured this out accidentally.
I had to remove
public MasterEntities()
: base("name=MyApplicationEntities")
// ^^^^^
{
}
to
public MasterEntities()
: base("MyApplicationEntities")
{
}
EF 4.3 does not like connection string being called name=xxxxx
C# addin with EF6 - No connection string named 'Entities' could be found in the application config file
Unfortunately the way Solidworks is loading your addin dll prevents you (or libraries that you are using like EF) from accessing .config file in the usual way. The easiest solution for you is to use overloaded constructor for your entities object and pass connection string from code.
Related Topics
Mirroring Console Output to a File
Fast and Compact Object Serialization in .Net
Filter/Search Using Multiple Fields - ASP.NET MVC
What Represents a Double in SQL Server
How to Specify Proxy Credentials in Your Web.Config
What Is the Correct Performance Counter to Get CPU and Memory Usage of a Process
Compare Equality Between Two Objects in Nunit
Simplest Way to Do a Fire and Forget Method in C# 4.0
Using Case/Switch and Gettype to Determine the Object
Facebook/ Twitter with Dotnetopenauth
Why Does Resharper Want to Use 'Var' for Everything
Posting JSON Data to ASP.NET MVC
How to Flatten Nested Objects with Linq Expression
How to Update Values into Appsetting.JSON
Cannot Set Some Http Headers When Using System.Net.Webrequest
Transactionscope VS Transaction in Linq to SQL