Hello, friends,
I have two questions:
(1) In asp.net, where is the best place to store DB connection string? (We
have .dll to handle all DB queries.)
(2) Any sample source code for client side calendar? (We tried web control
calendar. But, each time we selected a date/changed year or month, it would
go back to web server. It would increase a lot network traffic.)
Thanks a lot. 4 1565
Andrew,
The best practices state to store the connection string in the appSettings
section of the web.config file.
I don't have a recommendation for a calendar, I hope someone else will be
able to steer you in the right direction for that.
--
Sincerely,
S. Justin Gengo, MCP
Web Developer / Programmer www.aboutfortunate.com
"Out of chaos comes order."
Nietzsche
"Andrew" <An****@discuss ions.microsoft. com> wrote in message
news:87******** *************** ***********@mic rosoft.com... Hello, friends,
I have two questions:
(1) In asp.net, where is the best place to store DB connection string? (We have .dll to handle all DB queries.)
(2) Any sample source code for client side calendar? (We tried web control calendar. But, each time we selected a date/changed year or month, it would go back to web server. It would increase a lot network traffic.)
Thanks a lot.
1) web.config
2) look at www.asp.net in the control galleries. Lots of calendars there.
--
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com
"Andrew" wrote: Hello, friends,
I have two questions:
(1) In asp.net, where is the best place to store DB connection string? (We have .dll to handle all DB queries.)
(2) Any sample source code for client side calendar? (We tried web control calendar. But, each time we selected a date/changed year or month, it would go back to web server. It would increase a lot network traffic.)
Thanks a lot.
try the www.componentart.com suite. There is a calender included.
On Tue, 11 Oct 2005 07:00:12 -0700, Andrew
<An****@discuss ions.microsoft. com> wrote: Hello, friends,
I have two questions:
(1) In asp.net, where is the best place to store DB connection string? (We have .dll to handle all DB queries.)
(2) Any sample source code for client side calendar? (We tried web control calendar. But, each time we selected a date/changed year or month, it would go back to web server. It would increase a lot network traffic.)
Thanks a lot.
Hello Dear Andrew,
Answer to your 1st Question (1) In asp.net, where is the best place to store DB connection string? (We have .dll to handle all DB queries.)
In the web.config just add the <appSettings> </appSettings> in between
<configuratio n> and <system.web> like the following
<configuratio n>
<appSettings>
<add key="Connection Info"
value="server=( local);database =Northwind;Inte grated Security=SSPI" />
</appSettings>
<system.web>
give a Key Name for example I have given it as "ConnectionInfo " and the
value as your database details.
Thats all in the web.config.
In you code-behind file, to retrieve the Connection Info use
ConfigurationSe ttings.AppSetti ngs
for example:
string connectionInfo = ConfigurationSe ttings.AppSetti ngs["ConnectionInfo "];
using(SqlConnec tion connection = new SqlConnection(c onnectionInfo))
Try this one, It will work.
Reply to the 2nd Question, I will come back to you
(2) Any sample source code for client side calendar? (We tried web control calendar. But, each time we selected a date/changed year or month, it would go back to web server. It would increase a lot network traffic.)
bye
venkat_kl This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Chris Dunaway |
last post by:
I have a web service that references a data class library which performs
SQL Server access. Since the web service is also a class library, there is
no App.Config, only Web.config. Is Web.Config the place I should store the
connection string?
If I call System.Configuration.ConfigurationSettings.AppConfig from the
data class library, will it read the settings from the web.config or will
it throw an exception?
Thanks
|
by: Simon Harvey |
last post by:
Hi everyone,
As I understand it, storing an applications SQL Server connection string in
the web.config file is a security risk. I'm wondering then, what the
simplest solution is to this problem?
Actually, my first question is, why is it a security risk? As I understand
it, it is impossible to download the web.config file. Is this not the case?
I've heard of a number of potential solutions to this problem - storing
|
by: Guadala Harry |
last post by:
What are my options for *securely* storing/retrieving the ID and password
used by an ASP.NET application for accessing a SQL Server (using SQL Server
authentication)? Please note that this ID and password would be different
than the one the user enters for ASP.NET forms authentication. The
ID/password in question is used by the application, itself, for accessing
the SQL Server.
Thanks in advance.
|
by: Charlie |
last post by:
Hi:
My ASP.NET app opens and closes database connection in several pages.
Rather than hard coding string into every page, is there a place I can put
it where all pages will be able to access it. In days of fat client
programming, I put in INI file. Looking for similar solution.
Thanks,
Charlie
|
by: ad |
last post by:
We usually store the connection string of Web Applicaiton in Web.Config.
Now I want to develop WinForm Application.
Where is the better place to store the conneciton string?
| |
by: Hans Merkl |
last post by:
Hi,
I am helping to build a web app that's pretty much a wrapper around a web
service. The question now is how to store the handle of the web service
object between requests. My client is using SQL server for session state so
I don't think I can store the web service handle there since it's not
serializable.
Opening up a connection to this particular service is quite slow so I don't
want to reopen it for every request.
|
by: GS |
last post by:
I have system wide connection string defined in web.config. Is it possible to store connection object in global variable accessible by whole application and get reference to it in different parts of code instead of creating new connection each time? How will this survive thread switching?
|
by: Darrel |
last post by:
I've been taught that, at least in 1.1, you put your DB connection strings
in the WebConfig file and access them from there as needed.
In 2.0, it looks like I can do the same, but it's been suggested that I use
the Web Site Admin Tool Wizard to store them. So, I have a few questions:
Should I? The wizard itself says: "Do not store sensitive information, such
as user names, passwords, or database connection strings in application...
|
by: Merk |
last post by:
I'm looking for a safe and maintainable way to store connection string info
(connecting to SQL Server 2005 from .NET 2.0 Windows Forms client app);
things like server name or IP address and database name. I need to provide
the client application with this info for connecting to both a test SQL
Server and a production server.
I would prefer to NOT hard-code this info into the client application, and
App.Config seems rather unsafe as the...
|
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: 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,...
| |
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: 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,...
|
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: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |