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

  • Home
  • SEARCH
  • 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 6104705
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T13:52:20+00:00 2026-05-23T13:52:20+00:00

Our main application has both a asp.net and winforms component. There is a class

  • 0

Our main application has both a asp.net and winforms component. There is a class that is used by both sides and needs info from either the web.config or app.config files. The class itself does not know if it’s on the client side or on the web server (at this point). We are getting errors when it’s attempting read app.config when it’s on the web side. Is there a way for the class to tell if it needs to read web.config or app.config? My first thought was to put it in a try catch block but I am wondering if there is a more elegant way
Thanks

  • 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-05-23T13:52:21+00:00Added an answer on May 23, 2026 at 1:52 pm

    You can create the web.config and the app.config. The settings manager will get the right one for your each scenario.

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

Sidebar

Related Questions

We need to replace the menu system in our main ASP.NET application. So naturally
I want to allow our main application to generate document files that can be
We have a huge ASP.NET web application which needs to be deployed to LIVE
In our application, we have a download flow that works as follows: On main
An issue that has come to light is to open up our application (we
We are currently working on a new version of our main application. one thing
Our main program is in java but the code that extracts our data from
We have a UI widget on our main UI that uses JavaScript to respond
The main window of our WPF application consists of 4 regions, arranged as 2x2
Our environment: Visual Studio 2010, c#, .net 4 client profile. We have a Winforms

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.