I have a web application and a class library in a solution.
The class library is make of typed datasets, and include many Table in it.
The connection strings of the TableAdapters is come from the app.config of
that class library.
The Web application refer the class library, and the connection strings of
WebApp is come from the web.config of it.
It is ok in developing step, I can make both connection string identical in
both config files, but after I publish the web application or package the
web application for deployment, the app.config is vanish, so that if can
just change the connection if web.config, but can't change the connection is
app.config.
How can I do? 3 3943
ad,
your post seems to assume that the value for the class library is being read
from "it's own" app.config. Class Libraries (DLL) cannot use configuration
files natively. Store all your items in the web.config and they will be
available to the class library if it is referenced in the web application
project.
Peter
--
Co-founder, Eggheadcafe.com developer portal: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
"ad" wrote: I have a web application and a class library in a solution.
The class library is make of typed datasets, and include many Table in it. The connection strings of the TableAdapters is come from the app.config of that class library.
The Web application refer the class library, and the connection strings of WebApp is come from the web.config of it.
It is ok in developing step, I can make both connection string identical in both config files, but after I publish the web application or package the web application for deployment, the app.config is vanish, so that if can just change the connection if web.config, but can't change the connection is app.config.
How can I do?
Hi Peter, thanks for your post - I am having similar problems. Can I
ask you for a little more depth please. My web.config settings don't
seem to propagate down to the table adapters which sit in my class
library. The table adapters just use the same connection string as
specified in the class library app.config file.
can you please give me an example of how I am supposed to 'fully
qualify' the name of the connection string in the web.config file.
If you, or anybody else could please tell me how I can do? - then I
would be very grateful.
Thanks very much in advance.
Glyn. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Aaron |
last post by:
I wrote a program in c# and oledb for my access database. After each run i
see there's a locked db file in my database folder, it means that my
connection is not closed properly. I did check my code everything seemed
fine. Is there a script or a program that can help me check this? I think I
might have missed something.
Thanks
Aaron
|
by: Bryan |
last post by:
Hello,
I'm just starting to develop in asp.net and i have a question about
using a database connection globally in my app. I have set up the
procedures for getting all my connection string info which each page
will use, but my question relates to how to use the database
connection i create in all my classes.
I have a database class, in a separate namespace and file, i created
that handles all the connection opening, executing statements...
|
by: Rahul Anand |
last post by:
Getting SQL Exception when trying to implement Connection
based Trasaction using SQL Helper class.
I am using the follwing function to execute my stored
procs:
-=-=-=-
ExecuteScalar(ByVal transaction As SqlTransaction, _
ByVal spName As String, _
ByVal ParamArray parameterValues() As Object)
|
by: Phil Campaigne |
last post by:
Hi All,
I am seting up my web app with a tomcat/postgresql hosting service.
From my psql client I type psql and then I am asked for my password.
This logs me into my hosted database just fine.
However, I can't log on from my webapp to the database thru jdbc like I
could when my webapp/Tomcat/postgresql were on my local machine. The
jdbc class only has a method with 3 parameters, url, user, password
parameters. The hosting server is...
|
by: Mats Lycken |
last post by:
Hi,
I'm creating a CMS that I would like to be plug-in based with different
plugins handling different kinds of content.
What I really want is to be able to load/unload plugins on the fly
without restarting the application.
What I did was to create an AppDomain that loaded the plugins and
everything was great, until I tried to pass something else that strings
between the domains...
| |
by: paulo |
last post by:
Hello,
I'm developing a web services apllication using SQL Server in mixed mode.
I'm also using WSE 3.0.
For each user in the application there's a corresponding user on the
database. The client always sends the username to the web service for
identification.
I have a connection string stored in the web service for the visual
designed
datasets and for the connection I make manually.
|
by: ad |
last post by:
I have a web application which refer a class library project.
The web application have a web.config and the class library project have a
app.config.
They all have connection string defined in them.
I set both connection strings identical in VS2005.
But after publish it to web site, I can just set the connection in the web
application.
|
by: Frinavale |
last post by:
Hello everyone!
I'm having a problem securing my connection string.
There are a lot of sites out there that explain how to secure a connection string in the Web.config or App.config file; however, my connection string is being used within a Class Library (implemented with VB.NET), which doesn't have these files.
This class library is used by a web application to do all of my database manipulation so it is run under the ASPNET account....
|
by: jothikumar |
last post by:
I have a fairly large webapp which is used by many customers. Each customer has its own database.
I want to use the same webapp for all of the customers, but they still need to have separate databases and thus different connection strings.
What is the best way to do this?
I thought of this approach:
1. One database contains a table called Customers. This table contains all customers and what their connection string is.
2. When a...
|
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...
|
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...
| |
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...
|
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...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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
| |
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...
| |