473,394 Members | 1,734 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,394 software developers and data experts.

connectionstring & web farm

Hey

ASP.NET 2.0

I'm preparing for a www.123assess.com test and in that intention I yesterday
took a skill assessment test at microsoft.com. Today I'm reviewing some of
the questions I had problems with:

One of the questions was about where the connections string should be placed
in a web farm configuration. In this scenario there were several web
applications which all are using the same connection string. The connection
string should in this scenario be placed in the most central location
possible. Below are the 4 alternative answers to the question:

These were the alternative answers:
#1: In each application's Global.asax
#2: In the Machine.config on one of the web servers
#3: In each application's Web.config file
#4: In the Machine.config file on each web server

I think alternative #4 is correct, but I'm not 100% sure about it.

any suggestions?

Jeff
Nov 21 '06 #1
4 1958
Looks like the online MSDN2 is not available or very slow at this moment.

In .20 the ConnectionString configuration section was added to store
connection strings. Check the documentation for the ASP.NET configuration
schema. You should find for each section that the documentation tells in
which config file the section is allowed.
--
Patrice

"Jeff" <it************@hotmail.com.NOSPAMa écrit dans le message de news:
uX**************@TK2MSFTNGP06.phx.gbl...
Hey

ASP.NET 2.0

I'm preparing for a www.123assess.com test and in that intention I
yesterday took a skill assessment test at microsoft.com. Today I'm
reviewing some of the questions I had problems with:

One of the questions was about where the connections string should be
placed in a web farm configuration. In this scenario there were several
web applications which all are using the same connection string. The
connection string should in this scenario be placed in the most central
location possible. Below are the 4 alternative answers to the question:

These were the alternative answers:
#1: In each application's Global.asax
#2: In the Machine.config on one of the web servers
#3: In each application's Web.config file
#4: In the Machine.config file on each web server

I think alternative #4 is correct, but I'm not 100% sure about it.

any suggestions?

Jeff

Nov 21 '06 #2
3 is, by far the easiest. If you want to encrypt the string, which is wise,
you will have to use one machine to export the encryption keys. There are
pages on MSDN for encrypting connection strings on a web farm using the
built-in encryption.

You can encrypt separately on each machine, but you will have to encrypt
separately on each every time there is a change.

NOTE: In 2.0, you can put the connection strings in a separate file

Other alternatives
Global.asax - What? Are you high? - Global.asax is not secure if someone
compromises the code, so it really offers no security benefits. It is also
"hard coded" unless you put source on the web server. I would call
global.asax bad form.

Machine config is an decent option. It is a more attractive option if
multiple apps on the machine use the same connection string.

Registry is an option that is more secure than config, etc.

You can set up a web service to deliver configuration settings - unless you
are reusing the bits, this is overkill
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com

*************************************************
Think outside the box!
*************************************************
"Jeff" <it************@hotmail.com.NOSPAMwrote in message
news:uX**************@TK2MSFTNGP06.phx.gbl...
Hey

ASP.NET 2.0

I'm preparing for a www.123assess.com test and in that intention I
yesterday took a skill assessment test at microsoft.com. Today I'm
reviewing some of the questions I had problems with:

One of the questions was about where the connections string should be
placed in a web farm configuration. In this scenario there were several
web applications which all are using the same connection string. The
connection string should in this scenario be placed in the most central
location possible. Below are the 4 alternative answers to the question:

These were the alternative answers:
#1: In each application's Global.asax
#2: In the Machine.config on one of the web servers
#3: In each application's Web.config file
#4: In the Machine.config file on each web server

I think alternative #4 is correct, but I'm not 100% sure about it.

any suggestions?

Jeff

Nov 21 '06 #3
Thanks, the scenario used in this question was a web farm configuration (3
web servers) running multiple web applications and all these web
applications are using the same connection string. The question didn't
mention anything about encryption.

I think it's alternative #2 or #4. In my opinion it's #4 (but I've been
wrong before, and can easly be wrong on this also... lol) because as far as
I know all the machines in the web farm need to have the connection string.
Placing the connection string in Machine.config on every web server can from
what I understanding solve it.. If placed in a web.config file, then the
connection string need to added to every web.config file for every web
application on every web server.

any comments?
"Cowboy (Gregory A. Beamer)" <No************@comcast.netNoSpamMwrote in
message news:e3**************@TK2MSFTNGP04.phx.gbl...
>3 is, by far the easiest. If you want to encrypt the string, which is wise,
you will have to use one machine to export the encryption keys. There are
pages on MSDN for encrypting connection strings on a web farm using the
built-in encryption.

You can encrypt separately on each machine, but you will have to encrypt
separately on each every time there is a change.

NOTE: In 2.0, you can put the connection strings in a separate file

Other alternatives
Global.asax - What? Are you high? - Global.asax is not secure if someone
compromises the code, so it really offers no security benefits. It is also
"hard coded" unless you put source on the web server. I would call
global.asax bad form.

Machine config is an decent option. It is a more attractive option if
multiple apps on the machine use the same connection string.

Registry is an option that is more secure than config, etc.

You can set up a web service to deliver configuration settings - unless
you are reusing the bits, this is overkill
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com

*************************************************
Think outside the box!
*************************************************
"Jeff" <it************@hotmail.com.NOSPAMwrote in message
news:uX**************@TK2MSFTNGP06.phx.gbl...
>Hey

ASP.NET 2.0

I'm preparing for a www.123assess.com test and in that intention I
yesterday took a skill assessment test at microsoft.com. Today I'm
reviewing some of the questions I had problems with:

One of the questions was about where the connections string should be
placed in a web farm configuration. In this scenario there were several
web applications which all are using the same connection string. The
connection string should in this scenario be placed in the most central
location possible. Below are the 4 alternative answers to the question:

These were the alternative answers:
#1: In each application's Global.asax
#2: In the Machine.config on one of the web servers
#3: In each application's Web.config file
#4: In the Machine.config file on each web server

I think alternative #4 is correct, but I'm not 100% sure about it.

any suggestions?

Jeff


Nov 21 '06 #4
The page I was thinking about is
http://msdn2.microsoft.com/en-us/library/bf7sd233.aspx (note the
Configurable locations that states where this section is allowed).

As for the other quesrion I would say it depends. I would put it at the most
global location where it is needed (that is web.config if this is
application specific, perhaps machine.config if used in multiple
applications from the same machine).

--
Patrice

"Jeff" <it************@hotmail.com.NOSPAMa écrit dans le message de news:
Or*************@TK2MSFTNGP02.phx.gbl...
Thanks, the scenario used in this question was a web farm configuration (3
web servers) running multiple web applications and all these web
applications are using the same connection string. The question didn't
mention anything about encryption.

I think it's alternative #2 or #4. In my opinion it's #4 (but I've been
wrong before, and can easly be wrong on this also... lol) because as far
as I know all the machines in the web farm need to have the connection
string. Placing the connection string in Machine.config on every web
server can from what I understanding solve it.. If placed in a web.config
file, then the connection string need to added to every web.config file
for every web application on every web server.

any comments?
"Cowboy (Gregory A. Beamer)" <No************@comcast.netNoSpamMwrote in
message news:e3**************@TK2MSFTNGP04.phx.gbl...
>>3 is, by far the easiest. If you want to encrypt the string, which is
wise, you will have to use one machine to export the encryption keys.
There are pages on MSDN for encrypting connection strings on a web farm
using the built-in encryption.

You can encrypt separately on each machine, but you will have to encrypt
separately on each every time there is a change.

NOTE: In 2.0, you can put the connection strings in a separate file

Other alternatives
Global.asax - What? Are you high? - Global.asax is not secure if someone
compromises the code, so it really offers no security benefits. It is
also "hard coded" unless you put source on the web server. I would call
global.asax bad form.

Machine config is an decent option. It is a more attractive option if
multiple apps on the machine use the same connection string.

Registry is an option that is more secure than config, etc.

You can set up a web service to deliver configuration settings - unless
you are reusing the bits, this is overkill
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com

*********************************************** **
Think outside the box!
*********************************************** **
"Jeff" <it************@hotmail.com.NOSPAMwrote in message
news:uX**************@TK2MSFTNGP06.phx.gbl...
>>Hey

ASP.NET 2.0

I'm preparing for a www.123assess.com test and in that intention I
yesterday took a skill assessment test at microsoft.com. Today I'm
reviewing some of the questions I had problems with:

One of the questions was about where the connections string should be
placed in a web farm configuration. In this scenario there were several
web applications which all are using the same connection string. The
connection string should in this scenario be placed in the most central
location possible. Below are the 4 alternative answers to the question:

These were the alternative answers:
#1: In each application's Global.asax
#2: In the Machine.config on one of the web servers
#3: In each application's Web.config file
#4: In the Machine.config file on each web server

I think alternative #4 is correct, but I'm not 100% sure about it.

any suggestions?

Jeff



Nov 21 '06 #5

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

Similar topics

5
by: Hidden Desi | last post by:
Hi all, I am implementing a .NET web application and extensively used the session variables to store data. But today my manager told me that we will be running that application in a web farm !!!!...
1
by: Paul Emory Sullivan | last post by:
I anticipate a problem that may occur when we deploy our reports on web farms. We have reports that generate both tabular and graphic output in a single Recordset pass. Each report page request...
3
by: Steve | last post by:
Hi What is difference between web farm and web garden? What i understand so far Web Farm Multi Server Environment Support Session share Application object not supported Caching not...
0
by: LearninGuru | last post by:
Hi Folks, I am creating a web service that will be hosted on a web farm. The web service also uses sessions to store user specific data. I have the following doubts about session timeout in a...
5
by: Dominic | last post by:
My question is about how to maintain view state in mobile ASP.NET across postback / request in a web farm environment. First of all, let's assume the web-farm does NOT use stick-session feature....
6
by: sck10 | last post by:
Hello, I have applications that produce the following error when they have been open to long without activity. Is there any way to force a re-load of the page or go to another page if the page...
1
by: =?Utf-8?B?VmlqYXkgQ2hpa3Rl?= | last post by:
Hi Experts, With Session Affinity and Web Server Farm on ISA Server 2006 accessing 2 backend IIS servers, I’m getting error “Validation of ViewState MAC failed. If this application is hosted...
3
by: latif87 | last post by:
An example of how the XML file is structured: <xml> <farm name="NAME1"> <size x="INTEGER1" y="INTEGER2" /> <neighbor name="NAME2" /> <crop name="PLANT" area="INTEGER3" /> <crop … /> … </farm>...
6
by: karthi84 | last post by:
Hi, I was asked to create a web application which is going to be running on a web farm. Now my questions are 1. I was asked to use windows authentication for connecting to SQL database, will...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
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,...
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,...
0
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...

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.