Member Avatar

I published my project in vs2010 and im trying to deploy it to other computers. I used this connection string that runs smoothly on my pc. This code tries to retrieve the servername and try to connect to database mysysDatabase. This forcely change the app.config. Private Sub btnOk_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnOk.Click If cboServer.Text = "" Then MsgBox("Please select Server First", vbInformation, "Server") Else Try Dim _config As System.Configuration.Configuration = System.Configuration.ConfigurationManager.OpenExeConfiguration(System.Configuration.ConfigurationUserLevel.None) 'the full name of the connection string can be found in the app.config(file) ' in the "name" attribute of the connection string Dim conne …

Member Avatar
0
24
Member Avatar

This question is a bit academic now as my contract at this place is coming rapidly to a close. But for future reference, I'd be very interested in the answer. We're talking about .Net 2.0 and Visual Studio 2005. Don't limit your responses to this platform though; I'm interested in best practice rather than hacky work-arounds for an elderly platform. The company where I've been working runs different DEV, SIT, UAT and PROD databases. They have connection strings for all four databases in their app.config file, but only one is uncommented at any given time. To do a SIT build, …

Member Avatar
0
4
Member Avatar

Hi Folks, I am trying to make default AppSettings in my App.Config. My Program, or part of it, requires an email template and I wish to save this template within a HTML File on my HDD. In my App.Config, I simply want to specify multiple keys such as Subject, Recipient etc and then get the value for each of those keys from a file, where the file will look something like this: [CODE]<html> <head> </head> <body> <p><b>Name:</b> {%Name%}</p> <p><b>Job Title:</b> {%JobTitle%}</p> <p><b>Address Line 1:</b> {%AddressLine1%}</p> <p><b>Address Line 2:</b> {%AddressLine2%}</p> <p><b>Address Line 3:</b> {%AddressLine3%}</p> <p><b>City:</b> {%City%}</p> <p><b>County:</b> {%County%}</p> <p><b>Postcode:</b> {%Postcode%}</p> <p><b>Telephone:</b> …

Member Avatar
0
2
Member Avatar

hi, I am new to these online threads .. i had a question: i am migrating vb6 to vb.net. the ini.file of vb6 has to be converted to app.config file, and we has to use this app.config in our code by removing ini file. how to create app.config for this inifile... please any one can respond quickly. my inifile is like this .. [Parms] Language=English [Enlish] 1=Product Library Copy 2=Sorce File. 3=Destination File 4=Browse.. 5=Copy Files 6=Exit 7=Cannot Copy File: 8=Destination file exits.Overwrite? 9=File have been copied 12=Pro/Space Product Libraries [Japanese] 1= >>.if%fcfuf%fSfRsgdg 2=f\[fXftf@fCf<: 3=fRs[$,Iftf@fCf<: 4=ZQAC.... 5=...............Like this till 12 …

Member Avatar
0
10
Member Avatar

I want to add a custom configuration section to my App.Config file in my C# 2010 project. I want the section to look like the following. [CODE]<DmModules> <Module Name="Module1"> <add key="DbType" value="..."> <add key="ConnType" value="..."> </Module> <Module Name="Module2"> <add key="DbType" value="..."> <add key="ConnType" value="..."> </Module> </DmModules>[/CODE] Of course there can be as many <Module> elements as needed, and each <Module> must contain two keys as specified. [B]Note : DbType and ConnType doesn't necessarily have to be "key", but even something like the following would do as long as I can read that value later from another part of my program.[/B] …

Member Avatar
0
13

The End.