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

Home Posts Topics Members FAQ

Using Web.Config from Program

hi,
i wrote program that is located in my bin folder of my web application, i
want this program to use my web.config which is not on the same folder,
in other words i want this program to use another config file other than
app.config

thanks
Ahmed Al-Lakani
Feb 27 '07 #1
2 963
web.config is a normal XML file... so i guess you'd have to use XMLReader to
read it to get anything you want.... i am assuming you need 'parameters' to
your program
"Ahmed Al-Lakani" <ah************ @hotmail.comwro te in message
news:%2******** ********@TK2MSF TNGP02.phx.gbl. ..
hi,
i wrote program that is located in my bin folder of my web application, i
want this program to use my web.config which is not on the same folder,
in other words i want this program to use another config file other than
app.config

thanks
Ahmed Al-Lakani


Feb 27 '07 #2
the problem that i want to keep my code as it is

the code is written as the following
ConfigurationMa nager.AppSettin gs["TasksXMLPa th"]

I want the minimum modification to my code,
"Evan Camilleri" <ev**@holisticr d.com.nospamwro te in message
news:eM******** ******@TK2MSFTN GP06.phx.gbl...
web.config is a normal XML file... so i guess you'd have to use XMLReader
to read it to get anything you want.... i am assuming you need
'parameters' to your program
"Ahmed Al-Lakani" <ah************ @hotmail.comwro te in message
news:%2******** ********@TK2MSF TNGP02.phx.gbl. ..
>hi,
i wrote program that is located in my bin folder of my web application, i
want this program to use my web.config which is not on the same folder,
in other words i want this program to use another config file other than
app.config

thanks
Ahmed Al-Lakani



Feb 28 '07 #3

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

Similar topics

16
1987
by: Timm | last post by:
I'm trying to use ASP objects (basically formed and populated based on Web.Config settings) and I want to use them in a different non-asp program with minimal reprogramming. So, my question is how do I mock up what ASP does to read the Web.Config file? I've tried messing around in the System.Configuration library and haven't been able to find anything from taking a quick look at the objects and their methods (for the goal of populating the...
1
2565
by: Joseph Geretz | last post by:
I need to download a greater than 4 megabyte attachment via WSE / DIME. The only way I know how to configure this is via a .config file. Normally, the ..config file is the same name as the base application. I built a .NET driver program to test this, NetBrokerDriver and provided a NetBrokerDriver.exe.config file which specifies the following: <messaging> <maxRequestLength>-1</maxRequestLength> </messaging>
16
9767
by: Asaf | last post by:
I am trying to create and use a COM object with C#.NET 2005. The assembly is set to "Register for COM interop" but when I am trying to call it from VB on Word 2003 I am getting this error: Run-time error '-2147024894 (80070002)': File or assembly name COMTest3, or one of its dependencies, was not found. The code for the COM:
8
28538
by: ajos | last post by:
hi frnds, im trying to convert my servlets database configuration from ms access to mysql database.however im getting some error like no driver found exception. to verify this error ive made a simple database in jsp(just to check if my mysql is working smoothly otherwise) which access' the username.....but in the process im getting a error--> java.sql.SQLException: Access denied for user ''@'localhost' (using password: NO) i have...
3
2907
by: arasub | last post by:
ep 20, 2007 11:25:57 AM org.apache.catalina.core.AprLifecycleListener lifecycleEvent INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jdk1.5.0_12\bin;.;C:\WINDOWS\System32;C:\WINDOWS;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\j2sdk_nb\j2sdk1.4.2\bin;C:\Program...
0
8421
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
8844
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8742
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
8518
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
4173
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4330
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2743
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1971
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1734
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.