I need to have another connection string then the one in machine.config


Suppose I need to have a different connectionstring that the one that exist 
in machine.config.

What is the best practice to do this ?
Two alternative.
1. Change in machine.config not so good I suppose.
2. Create a web.config where you made your modifications.

I would guess that alternative 2 is the best one.
One more question. Should the machine.config file never be changed ?


1/4/2010 8:17:47 PM
dotnet.framework.aspnet 1423 articles. 0 followers. Follow

1 Replies

Similar Articles

[PageSpeed] 50

On Jan 4, 9:17=A0pm, "Tony Johansson" <johansson.anders...@telia.com>
> Hello!
> Suppose I need to have a different connectionstring that the one that exi=
> in machine.config.
> What is the best practice to do this ?
> Two alternative.
> 1. Change in machine.config not so good I suppose.
> 2. Create a web.config where you made your modifications.
> I would guess that alternative 2 is the best one.
> One more question. Should the machine.config file never be changed ?
> //Tony

The web.config file is the main configuration file for an ASP.NET web
application. Use it to store your connectionstring if this is related
to your single application only. The machine.config is for settings
that apply to an entire computer. It's located in a system directory
and normally cannot be changed e.g. on a shared hosting. (On another
hand because of this, machine.config could be a good idea to secure

Note, web.config has special connectionStrings Element, dedicated for
this purpose.

Read more

connectionStrings Element

How to: Read Connection Strings from the Web.config File
1/4/2010 9:19:05 PM

Similar Artilces:

Data Validation using List (But needs unique list in drop down lis
Hi all, In sheet 1, column A is my title name while column B is person name. Sheet 1 is my database where i do data entry in this. In sheet 2, contains my query page. In cell A5, i uses data validation - list, on this cell. Say in sheet 1 : column A column B XXXXXXX Mr A YYYYYYYY Mr A ZZZZZZZZ Mr A AAAAAAA Mr B WWWWW Mr C DDDDDDD Mr C But In sheet 2, cell A5, I saw in the drop down list as follows: Mr A Mr A Mr A Mr B Mr C Mr C But i want to see this in cell A5 instead (Unique name that is) : Mr A Mr B Mr C ...

Iterative Calculation help needed
I have the following information A1 - Balance at the beginning of calculation A2 - Annualized payment A3 - Interest rate divided by # of payments per year A4 - Number of years * # of payments per year I'm trying to calulate the total ((A1-A2)*(1+A3)) - I need to do this over and over up until I've don it A4 times. I can do it for each period but I want to do it all in one cell, i possible. How can I have it plug the new number into A1 and repeat th calculation A4 times. Thanks -- Message posted from http://www.ExcelForum.com Hi there You might find that the PMT function coul...

How to change the string value in the registry?
How to change the "string value" in the registry from the code? As there is a functionality in my application that the user can change the "string value" with some GUI. But I m not able to change it as there is a function RegReplaceKey but its only to take the backup of old file and to replace it with new one and even i dont know how to use this functin to suit my case. RegSetValue/Ex() should do it I think. -Seetharam Look at the Registry APIs. Also, take a look at my Registry class on my MVP Tips site. joe On Sun, 26 Aug 2007 23:59:33 -0700, HItz <hitesh_im...

Error message Microsoft Outlook has encountered a problem and needs to close
I am unable to open Outlook - get the error message above EACH time I try to launch it. I am running Windows XP, have Norton installed, checked the firewall allows Outlook. I have uninstalled, reinstalled Outlook and downloaded and installed the service pack update. I followed some suggestions on this discussion site as suggested by Nikkin in the response to: "John Frustrated" <fortlaud@mail.com> Sent: 5/1/2004 8:36:21 AM. but nothing works. Can anyone help? What suggestions have you tried? I don't recall the message you are referring to. Rename outcmd.dat an...

Need HELP with Exchange Restore/Recovery
Details: 2003 sp2 Exchange Server Enterprise 2003 sp1 Server Enterprise C: drive is 100GB Logical Drive over x4 36GB drives in a RAID 5 set D: drive is 280GB Logical Drive over x5 70GB drives in a RAID 5 set Domain Controller Last night I upgraded our 2003 sp1 Exchange to sp2 + any O/S hot fixes and DST fix. No problem with the upgrade or hot fix, but @ about 200 a.m. I lost two of the five drives in the RAID 5 set (drive D) that had the exchange install. I’m currently replacing the hardware & bringing up the drives & going to recreate the D: drive. (server is bootable) I h...

Use CountIf for a literal string
I am trying to count the number of cells in a range that contain the string <0.1. I don't want the number of cells that contain numbers less than 0.1, I want the actual string. Is there an escape character for comparison operators like the tilde for wild cards? Thanks, Chad Try this... =SUMPRODUCT(--(A1:A10="<0.1")) -- Biff Microsoft Excel MVP "chadkwelch" <chadkwelch@discussions.microsoft.com> wrote in message news:73F17509-1C52-4935-A45D-66DCC63B20C6@microsoft.com... >I am trying to count the number of cells in a range that ...

Mail deliver to another similar domain
Hi there, I am running Exchange 2000 on my Windows 2000 server for my domain (say "ross.com"). On Internet, there is another similar domain name called "russ.com" owned by another one who is a home business owner. The problem is: Many of my customers sometimes intend to send emails to my company at someone@ross.com, but by mis-typing, they actually send to someone@russ.com. Unfortunately, the russ.com domain does have a email server, and my customers (or potential) can't realize their emails won't deliver to me. On the other hand, inside of my network, some of my em...

Copying inbox from one account to another on exchange 2003
Hi I need to copy the inbox of user from one account to another account. Is there a way to do that? I tried copying to the public folder then copying from public to new account - but the dates changed to todays date for all emails! Any thoughts? Use PSTs. -- Bharat Suneja MCSE, MCT www.zenprise.com blog: www.suneja.com/blog ----------------------------------------- "Ali" <Ali@discussions.microsoft.com> wrote in message news:B67F087A-39D7-4DBA-947D-F20F63574952@microsoft.com... > Hi > I need to copy the inbox of user from one account to another account. Is > t...

OL2007+Exchange: Sent items disappear if i move them to another folder...!
I'm seeing a very strange issue with my Outlook2007 (against Exchange)... Sent items disappear if i move them to another folder...! Steps: 1. Send an email. Sent email gets saved under Outlook's default "Mailbox\SentItems" folder. 2. Go to that SentItems folder, and move the mail to another folder (let's say "Foobar") under your inbox. 3. Go to "Foobar", make sure mail is still there. 4. Let Outlook Sync up with Exchange server (or hit "Send and Receive"). 5. You will notice that the mail disappears... ! I did a full text search in my ...

Help!! Need Recovery!
So I went to open my excell file as usual and suddenly I have 10 or so instances openned. As I was closing them I saved one that turned out to be an old version, REAL OLD, like 2 weeks or so. No I desparataly need to get back to where I was. I tried to use the recovery utility under Microsoft Tools, but there are no available dates to revert to. I have no other way of reverting the document. Anyone know what to do? Any help would be greatly appreciated! Thank you.- Kjellster :D ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~View and ...

Can there be variable size columns in one report?
I want to create a report that has 3 sub-reports of different column widths. Is this possible? -The 1st sub-report has 1 column that occupies the entire width of the page -The 2nd sub-report can fit 2 columns in the page width -The 3rd sub-report can fit 3 columns in the page width Subreports can have any number of columns that don't have to be the same from one to another. Typically your columns should display across then down in order to render properly as a subreport. -- Duane Hookom Microsoft Access MVP "SheldonHinds" wrote: > I want to create a r...

How do you import data from one Excel document to another?
Hey everyone, I work at a school and I'm trying to update their attendance reports from hand written to excel, but I'm running into several problems. For one, I need it to be able to calculate how many "Ab"s (absents) there are in the worksheet (for the individual student's attendance page). And THEN, I need to have the sum show up on a completely new document (for the overall attendance report). Is that possible? I've fooled around with data importing and several other things, but I'm just too new at this. If what I'm asking is possible, can anyone he...

List details in another sheet
Hi, I have a sheet "Data" with transactions by customer. Column A has the Customer ID. In another sheet called "By Customer", the user selects from a drop down a Customer ID, and clicks a button. What I want for this button is to run a macro to get in a 3rd sheet, "Transactions", columns B, C, D and E from the Data sheet, for the selected customer ID. Is that possible? Can somebody help? Thanks, Cecilia Use VLOOKUP http://www.ozgrid.com/Excel/excel-vlookup-formula.htm -- Regards Dave Hawley www.ozgrid.com "Chechu" <cecichi9@hotma...

Need CD to Uninstall
We have 6 computers all ordered at the same time from Dell that have have unopened Office XP Small Business Addition CD's in thier packaging (from 3 years ago). Now we change our domain identity with an upgrade to Small Bus Server and the CD's are required to open any Office application. For some unknow reason one of the computers has Office XP Pro with Front Page and will not let us do anything without THAT CD and we don't have it - we only have the Small Bus Addition. We can't even uninstall the Office XP Pro without the correct CD which we don't have. We tried...

Problems shelling another application
I am not sure what is going on with this so I am not sure what to ask. I'll just share my experience and maybe somebody can point out what I am doing wrong. I am attempting to launch another application from my VB app. The code to launch the other app is just a simple shell call (lngProcID = Shell(strAppPath)). The call to Shell does return a value but the app does not appear to have been started (does not show up visually and is not in task manager). Using the value held in strAppPath in the Run dialog (Start->Run) starts the app just fine. I figure this has to be some ...

Outlook - CPU Spikes
I've got a Dell XPS M1210 - Outlook 2003 Pro We have 4 of these machines - I personally have one as well. Mine works great no problem.... however one of the others is a problem child. I've personally re-installed the OS 4 times on this machine. When you bring up outlook (with Exchange account) I get CPU usage spikes (40%-60%). Explorer.exe shows in the task manager as the culprit. Shut down outlook and it chills down to 0%-2%. Bring outlook back up .... it has a CPU spike heartbeat every 5 seconds or so. I've set the email account on several other machines ... no problem.. so I...

Getting information from strings
Hi, I have created a database which takes the audit history of tickets, and stores it in a memo field. I have some code which will examine this field to find the first team that a ticket was assigned to, however I have a requirement to build an "assignment history". This history should consist of each team in turn that the ticket was assigned to, which will be output to a text file (I have written code for outputting to the file). I have tried using left$ and right$ to no avail, so any advice I could get would be great. For information, every time a ticket is assigned, an ...

Combine rows to print on one label
I have imported student information into an excel spreadsheet (use Excel 2003). Each student has one row of information for each course they take. I need to print one label for each student and each course & grade must print on a single label. How do I combine the rows to cause this to happen? assuming the info in the row is divided into separate columns for name, course, grade, etc you can do a mail merge in word using the spreadsheet as the data source "Clearcreek" wrote: > I have imported student information into an excel spreadsheet (use Excel > 2...

i need how i conected my computer in the mail?... You just set it up in Tools - Accounts. Yahoo must be a "Plus" account - see: http://help.yahoo.com/l/us/yahoo/mail/original/mailplus/pop/pop-06.html "Raymond01040" <raymond01040@yahoo.com> wrote in message news:#iE16fsnKHA.3164@TK2MSFTNGP06.phx.gbl... > i need how i conected my computer in the mail?... ...

Trouble Reading XML string
I have a method that generates an string in XML format and passes it to be processed. The string is in the following format: <grandparent> <parent> <child1>text</child1> <child2>text again</child2> </parent> <aunt> <cousin1>text</cousin1> <cousin2>text2</cousin2> <cousin3>text4</cousin3> </aunt> </grandparent> string xmlInput = <values above> XPathDocument xpDoc = new XPathDocument(new StringReader(xmlInput)); XPathNavigator xpNav = xpD...

How to Print string (Windows Printer) using RMS QSRules.
A windows printer is set as a receipt printer for a register. I need to print strings to this printer using RMS QSRules. How can I do this? I tried using Register.ActivePrinter.PrintNormal(Station as Long,Data as String) but it won't work. By the way, what is Station in the parameter? ...

macro-import another xls file
Hi, i need a macro to import another xls file.When i run macro i need a window to appear and to browse to the file i need to import. I allways open another file, so i want to browse for the file. Can this be done? Thanks! Try some code like the following: Sub AAA() Dim FName As Variant Dim Filter As String ' Excel 2003 workbooks Filter = "Excel Files (*.xls),*.xls" ' Excel 2007 workbooks workbooks Filter = "Excel Files (*.xlsx;*.xlsm;*.xlsb),*.xlsx;*.xlsm;*.xlsb" ' Excel 2003 and 2007 Filter = "Excel Files (*.xls;*.xlsx;*.xlsm;*.xlsb),*...

Is Auto Expansion (i.e., wrap text) of a cell possible when the cell's contents are based on another cell?
I am trying to display the results from one tab (Tab 1) in another (Tab 2). So, for example, tab 2 contains the formula "=Tab1!A2". However, when the results are too large to fit the cell in tab 2 (i.e., the cell that contains a formula that draws from a cell in tab 1), the wrap text feature does not work unless i first double click in the cell in tab 2. Is there any way around this? Can the wrap text feature work automatically somehow? Or will i need to double click in every cell that contains text that doesn't fit into the cell. Thanks for any suggestions, or VBA code, th...

how do I "point" to another global.mpt file in MS Project 2007?
we created a number of filters and maps in Project 2003. Can I point my Project 2007 to that existing Global.mpt file referenced by Organizer? Hi, You can only select the Global.mpt when you startup Project. The surest method is to start Project by double-clicking the Global.mpt icon itself Proejct will tell you (twice!!) that you cannot open a Global.mpt but by replying OK twice Project is open with the right global. Another way, without useless warning messages is to open Project by double-clicking an .mpp file stored IN THE EXACT SAME FOLDER as the desired global. ...

just testing connectivity
alt.test "Test1" <a@b.com> wrote in message news:%23EVqQ9T2EHA.1860@TK2MSFTNGP15.phx.gbl... > > ...