473,657 Members | 2,422 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

app.config issue

If you are developing N-Tier applications and in your middle (Business
Logic) Tier you have a Calculate class that performs some function and it
has a app.config and an XML file. The app.config file contains the location
of the XML file and the XML file contains business information for the
class. Then you have a Web Form that uses this class which has a web.config
file.

Is there a way to tell the Calculate class to read the information in from
the app.config class at runtime rather than trying to read the information
from the web.config class? It seems silly that the Web Form should know
about the XML file.

I hope I have explained myself properly.
Cheers Kele.
Nov 11 '05 #1
1 1150
Hi Kele,

There is only one application config (in case of web app, it is
web.config) per application domain. You can get it at
AppDomain.Curre ntDomain.SetupI nformation.Conf igurationFile. Your
business logic layer is a DLL, right? Then it could not have
app.config. In fact, if you add one, VS.NET will not automatically
rename and copy it to output folder when building as it does for EXE.

Because Calculate can access web.config using System.Configur ations
namesapce, so there is no need to add that app.config file which you
must manually add code to parse.

Regards,
Thi - http://thith.blogspot.com

Nov 11 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
3951
by: hplloyd | last post by:
i have a windows app which has an app.config file in the solution. The config file holds information such as connection string details. When I create a setup project and include the primary output of my solution into it then it all installs perfectly.... My issue is this... I may need to amend the app.config file which I do in notepad on the client machine, however when I need to upgrade the application I remove the program from the...
3
3158
by: baylor | last post by:
I'm having a weird bug and wondering if anyone has ever seen this before A Hello World GUI app. Create an app.config. When you build, Studio copies app.config to bin\debug\ and renames it to the name of your EXE (sorta; turns out if your app is in a namespace, Studio names your EXE after the entire namespace but names your config file to only the app name and not the full namespace path, which in turn means your EXE cannot find it's...
1
4665
by: Robert | last post by:
I have a server where the main web application (root) is now migrated to 2.0. It's web.config has a line where it adds the system.data.oracleclient in the configuration and assembiles section. There is a sub web application, configured as its own application that is still under 1.1. The 1.1 app won't run because it gets an error shown below. Apparently it is picking up the settings from the root app's web.config (.NET 2.0) and
3
3865
by: Nuno | last post by:
At first, I was trying to encrypt ConnectionStrings in my app.config and still be able to modify my datasets. So, i had to modify the Settings.Designer.cs file to handle the decryption aspect in the GET properties. This works great to run the application but there are two problems with it when developing at designtime. 1. Anytime i add another setting to Properties, the Designer rewrites the Settings.Designer.cs overwritting my...
17
3242
by: Fred Nelson | last post by:
Hi: I have written several web applications that obtain their connection strings from the web.config file. This is very easy to use and it makes it easy to move an app from development into production. I'm in the process of writing a site that will have lots of traffic so I'm trying to save resources everyplace that I can. My question is - do the web.config app settings get loaded once when the
12
4738
by: Ben | last post by:
I have a group of settings that I'd like to have inherited by multiple sites. I'm trying this, but it's not working. wwwroot\group\web.config wwwroot\group\site1\web.config wwwroot\group\site2\web.config Where site1 & site2 are applications.
10
7577
by: =?Utf-8?B?U3RlZmFuIEJhcmxvdw==?= | last post by:
This has been working perfectly for months. Since we switched from ASP.NET 1.1 to 2.0, we have constant and sporadic issues with updating our applications. Touching the web.config works about 40% of the time to cause an AppDomain to reload and flush all assemblies. Sometimes it works perfectly, but other times some Assemblies are not reloaded into the AppDomain, even after multiple web.config file touches. Sometimes multiple versions...
13
5361
by: Jonny Bergdahl | last post by:
I have a ASP.Net 2.0 web application that I am trying to debug. Problem is that I can't get the error message to show in the browser. It always returns the generic error message telling me to set customErrors="Off". Problem is I have already done that. I have tried to activate tracing as well, by setting trace enabled="true", but accessing the trace.axd page returns a message instructing me to do just that. I have tried to figure out...
5
7845
by: mmcd79 | last post by:
I built a VB.net application that makes use of a machine level DB connection string setting, and a user level starting location setting. The machine level setting and the default user based setting is of course stored in the app.exe.config file located in the same directory as the exe. Upon closing the form, I save the user setting which then creates a user.config file in the appdata directory in my profile. This is all well and good....
3
1494
by: =?Utf-8?B?Tm9ybUQ=?= | last post by:
It isn't clear this is the right place to post this, but it IS related to ..NET CONFIG files... Windows Explorer (at least on W2003Server) doesn't seem to know that .config files exist. Searching for them as .config, *.*config, *.exe.config and other combinations, even when you can see them in a directory - let alone in sub-directories of for those containing text - doesn't work. I've seen the KB article on Explorer being selective in...
0
8411
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8323
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8739
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8513
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8613
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7351
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5638
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4329
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1732
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.