TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Mukesh Kumar Tiwari
NA
980
252.5k
No connection string named 'SMSEntities' could be found .
Apr 25 2015 7:02 AM
Hi frnds...
i have configured a wpf application and make
BAL
and
DAl
and
WpfApp
three project in my solutions . I have Added Entity Framework in DAL and class file in BAl. when i am going to run the application it shows the error "
No connection string named 'SMSEntities' could be found in the application config file."
there is a app.config file in my DAL.
When i get this error then i have added an app.config file in
WpfApp
project also, And add the connection string in that file. But still i am getting the same error when i am going to insert the record in database
DAL(App.config content)
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=4.4.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<connectionStrings>
<add name="SMSEntities" connectionString="metadata=res://*/SchoolEntity.csdl|res://*/SchoolEntity.ssdl|res://*/SchoolEntity.msl;provider=System.Data.SqlClient;provider connection string="data source=TIWARI-PC\SQLEXPRESS;initial catalog=SMS;user id=sa;password=00;MultipleActiveResultSets=True;App=EntityFramework"" providerName="System.Data.EntityClient" />
</connectionStrings>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
</entityFramework>
</configuration>
Please help me out...
Reply
Answers (
3
)
How I can create connection with SQL database in C# WPF?
Updating WPF Datagrid on changing ItemsSource