473,386 Members | 1,699 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

How to create config file for dll

Al
I use my assembly from asp and I need to config the dll from config file.
What is the better way to do this?
I don't want to hardcode file path in my dll (because
AppDomain.CurrentDomain.BaseDirectory="C:\windows\ system32") and I don't know
where exactly my dll will be placed on the customer's pc or in GAC.
Nov 22 '05 #1
1 2070
Hi,

Use the ConfigurationSettings class which would access the config settings
from your asp.net application's app.config file (which after build becomes
web.config).

Check out this MSDN page
http://msdn.microsoft.com/library/de...onsections.asp

"Al" wrote:
I use my assembly from asp and I need to config the dll from config file.
What is the better way to do this?
I don't want to hardcode file path in my dll (because
AppDomain.CurrentDomain.BaseDirectory="C:\windows\ system32") and I don't know
where exactly my dll will be placed on the customer's pc or in GAC.

Nov 22 '05 #2

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

Similar topics

2
by: David Elliott | last post by:
I can create this: ?xml version="1.0" standalone="yes" ?> <ConfigOpt> <record> <Field_1>Text # 1</Field_1> <Field_2>Text # 2</Field_2> </record> </ConfigOpt>
2
by: Vicky via DotNetMonster.com | last post by:
Hi, Could anyone help me with some info how to create app.config file. I need to put code of directory info in there, Thank you very much! DirectoryInfo di = new DirectoryInfo("C:\\Vicky...
6
by: Rich | last post by:
Hello, I picked up this example on using the Reflection namespace for loading forms/classes on the fly at msdn http://msdn.microsoft.com/library/default.asp?...
2
by: forest demon | last post by:
I need to be able to create an appender to direct output to a MessageBox. The API does not have a MessageBox appender like nLog does. What would be the easiest way to do this. The examples...
2
by: Christian Muggli | last post by:
can someone explain me how to create a app.config file during runtime? i see two ways: - add a skeleton of an app.config file to the exe/dll and extract it during runtime as a resource and...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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,...

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.