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 8453379
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T11:45:31+00:00 2026-06-10T11:45:31+00:00

I have my Entity Connection String set in my Web.Config file. In the same

  • 0

I have my Entity Connection String set in my Web.Config file. In the same solution, I have a Windows Application, and I want to access the Connection String of my Entity. How can I access the connection string that exist in my Web.Config file? Or I have to create a specific one in my Windows Application ?

  • 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-10T11:45:32+00:00Added an answer on June 10, 2026 at 11:45 am

    If you’re unfamiliar with adding a config file to a windows app, you must select an “Application Configuration File” from add new items, it will create a file named App.Config which will at compile time become YourProgramsName.exe.config but internally it works mostly just like a web.config with an appsettings section and connectionstrings sections and all the other normal sections.

    The best way to share this data between Web and Win config files would be:

    Create a separate file that looks like:

      <connectionStrings>
        <add name="Name" 
         providerName="System.Data.ProviderName" 
         connectionString="Valid Connection String;" />
      </connectionStrings>
    

    and reference it from both config files with:

    <?xml version='1.0' encoding='utf-8'?>
    <configuration>
        <connectionStrings configSource="connections.config"/>
    </configuration>
    

    Then just add the connections.config (add existing item by link) to each project.

    More reading: http://msdn.microsoft.com/en-us/library/ms254494.aspx

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

Sidebar

Related Questions

I have a web forms application that uses entity framework, the application is deployed
I have a .NET 3.5 web application which has a set of classes handling
I have created a new silverlight business application. I have added mysql.data, mysql.web, mysql.data.entity
I have Entity Framework entities Events which have an EntityCollection of RSVP. I want
I am having trouble changing the connection string used by entity framework code first
We have a server application that exposes a certain model, and set of services
I have the same data model on a bunch of different servers. I want
In LinqToSql I could write an empty constructor if I set the Connection string
I have following connection string: metadata=res:// /Database.csdl|res:// /Database.ssdl|res://*/Database.msl;provider=System.Data.SqlClient;provider connection string=Data Source=.\SQLEXPRESS;AttachDbFilename='Database.mdf';Integrated Security=True;User Instance=True;Connection Timeout=300;
I have an Entity Framework based MVC application linked to a SQL server. This

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.