Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8728825
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T08:43:18+00:00 2026-06-13T08:43:18+00:00

I created an ADO.NET object in my WCF service project, but when I try

  • 0

I created an ADO.NET object in my WCF service project, but when I try to connect in it I get this error:

No connection string named ‘FileEntities’ could be found in the
application config file.

Here is my code:

    public File GetFile()
    {
        using (FileEntities ctx = new FileEntities())
        {
            File aFile = (from f in ctx.Files
                          where f.ID == 5
                          select f).FirstOrDefault();       // No connection string named 'FileEntities' could be found in the

application config file.
return aFile;
}
}

Here is the App.Config for my service project:

<?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=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
  </configSections>
  <connectionStrings>
    <add name="FileEntities" connectionString="metadata=res://*/Model1.csdl|res://*/Model1.ssdl|res://*/Model1.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=HOOVERS-PC;initial catalog=Interview_MicahHoover;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />
  </connectionStrings>
  <entityFramework>
    <defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
      <parameters>
        <parameter value="v11.0" />
      </parameters>
    </defaultConnectionFactory>
  </entityFramework>
</configuration>

I have tried removing the “name=” prefix in the model.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T08:43:20+00:00Added an answer on June 13, 2026 at 8:43 am

    Ah, the problem was my service project just builds a library. The project that uses the library doesn’t have the connection string in it. I added the connection string to that project and it (mostly) works.

    Keeping things like this straight is a reason to not break things up into a lot of projects, but the WCF O’Reilly book recommends it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Created .NET WCF service, tested it - works. Generated schemas from Data and service
I have created a new MVC3 project and used the ADO.NET Entity Data Model
I'm writing a project in C# where i use ADO.NET to connect to my
We created an ADO.NET Services on top of our EDMX file as the main
I am getting started with the ADO.NET Entity Framework 4.0. I have created an
I'm using Microsoft Sync framework 1.0 (without ADO.NET services) I have created 2 custom
I am following a simple ADO.NET Entity/MVC 2 tutorial wherein my Views are created
What can cause this behaviour? I'm trying to generate code via ADO.NET EntityObject/Poco/SelfTracking Generator
using ado.net tipically we need to define a connectionstring to create a sqlconnection object,
If I use ADO.NET Entity Framework in our project and we depend on a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.