connection-string

Click-Once - How to encrypt connection strings [duplicate]

拜拜、爱过 提交于 2019-12-01 17:01:11
问题 This question already has answers here : .Net Encryption (4 answers) Closed 5 years ago . I have a WPF application with connections strings stored in the App.config. What is the best way of encrypting these connection strings in a click-once deployment? Thanks 回答1: If this is a connectionString that will be configured and used on a single computer (not shared across multiple computers) by an instance of your application, you can use the .NET managed wrapper of the DPAPI (Data Protection API)

What does “pooling=false” in a MySQL connection string mean? [closed]

萝らか妹 提交于 2019-12-01 16:46:11
What does pooling=false in a .NET connection-string for a MySQL database mean? This is the complete connection string: return new MySqlConnection("SERVER=localhost;DATABASE=myDataBase;USER=###;PASSWORD=***;POOLING=FALSE;"); When pooling=false the connection will not return to the pool when you call SqlConnection.Close() From MSDN When the value of this key is set to true, any newly created connection will be added to the pool when closed by the application. In a next attempt to open the same connection, that connection will be drawn from the pool. Connections are considered the same if they

Modify web.config with powershell

让人想犯罪 __ 提交于 2019-12-01 16:38:33
I need to try to update a web.config file to change the IP address only of the web.config I have included the section of code Im looking at for powershell to script the change. <connectionStrings> <add name="connectionString" connectionString="provider=SQLOLEDB;Server=192.168.1.100;database=sample;Trusted_Connection=Yes" providerName="System.Data.OleDb" /> <add name="sqlConnectionString" connectionString="Data Source=192.168.1.100;Initial Catalog=sample;Trusted_Connection=Yes" providerName="System.Data.SqlClient" /> </connectionStrings> I would like a very simple solution to this just update

SQL Server Error “Named Pipes Provider: Could not open a connection to SQL Server [53]”

本秂侑毒 提交于 2019-12-01 16:12:34
I used to have a desktop application pointing to a Sybase database through an .ini file that had this connection string: CONNECTION_NAME = "DSN="Dna_Name";UID="User";PWD="Password"" It worked perfectly. A few days ago the database has been migrated to SQL Server 2008 R2 and I need to update the .ini file to redirect the new production server. I updated the connection string as follow: CONNECTION_NAME = "Provider=SQLNCLI10.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog="CatalogName";Data Source="Production_DNS"" But I'm getting the following error: Named Pipe Provider:

Modify web.config with powershell

纵饮孤独 提交于 2019-12-01 16:07:42
问题 I need to try to update a web.config file to change the IP address only of the web.config I have included the section of code Im looking at for powershell to script the change. <connectionStrings> <add name="connectionString" connectionString="provider=SQLOLEDB;Server=192.168.1.100;database=sample;Trusted_Connection=Yes" providerName="System.Data.OleDb" /> <add name="sqlConnectionString" connectionString="Data Source=192.168.1.100;Initial Catalog=sample;Trusted_Connection=Yes" providerName=

Autogenerated default connection string vs. manually added one

人盡茶涼 提交于 2019-12-01 16:05:14
问题 Let's say I have got simple WPF application using Entity Framework Code First to create database, connect to it and display some data. From start I do not want to worry about connection strings so after adding entityframework reference via Nuget I'll get auto generated app.config looking like this: <?xml version="1.0" encoding="utf-8"?> <configuration> <configSections> <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 --> <section

Vb.net Connection String for Ms Access Database

风流意气都作罢 提交于 2019-12-01 14:22:52
What is the connection string for connecting MS Access 2010 (.accdb) database in VB.net. connectionstrings.com is a wonderful thing : Standard security Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\myFolder\myAccess2007file.accdb;Persist Security Info=False; With database password This is the connection string to use when you have an Access 2007 database protected with a password using the "Set Database Password" function in Access. Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\myFolder\myAccess2007file.accdb;Jet OLEDB:Database Password=MyDbPassword; Some reports of problems with

ASP SQL Server Connection

混江龙づ霸主 提交于 2019-12-01 14:21:24
问题 <% DIM objConn Set objConn = Server.CreateObject("ADODB.Connection") objConn.ConnectionString = "Data Source=123.123.12.123,1234;Database=DatabaseName;User Id=Usernm;Password=abcd1234;" objConn.Open DIM mySQL mySQL = "SELECT * FROM [Users] WHERE [User ID]='1'" DIM objRS Set objRS = Server.CreateObject("ADODB.Recordset") objRS.open(mySQL, objConn) Response.Write objRS("FullName") objRS.Close Set objRS = Nothing objConn.Close Set objConn = Nothing %> I want to connect to a SQL Server Database,

ADODB Connection String for .csv

旧时模样 提交于 2019-12-01 14:14:12
I want to process .csv files with ADODB in Excel VBA. I tried a few strings found on web, but none of them seems to work. I'm getting file path using: strVFile = Application.GetOpenFilename("CSV (*.csv), *.csv") And then I pass strVFile as a parameter to the sub objReport.Load strVFile . The header of the sub is: Public Sub Load(ByVal strFilename As String) . Then I try to make ADODB connection using string: pconConnection.ConnectionString = _ "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strFilename & _ ";Extended Properties=""text;HDR=Yes;FMT=Delimited(;)"";Persist Security Info=False"

Silverlight Entity Framework Dynamic Connection String

浪子不回头ぞ 提交于 2019-12-01 13:58:40
I have the same data model on a bunch of different servers. I want to dynamically create a connection string based on who my user is and what they are doing. My users can have multiple databases on multiple servers. I need a clean way to build a connectoin string when I create my DomainService. I see that the DomainService has an override (inherited from LinqToEntitiesDomainService) called CreateObjectContext() that would allow me to set any connection string I want, then return the new entity and life is good. The problem is, the CreateObjectContext() gets called after the constructor, so I