Questions tagged [connection-string]
A string containing information necessary for connecting to a service, usually database.
connection-string
4,618
questions
42
votes
5
answers
183k
views
SSIS how to set connection string dynamically from a config file
I am using SQL Server Integration Services (SSIS) in SQL Server Business Intelligent Development Studio.
I need to do a task that is as follows. I have to read from a source database and put it into ...
41
votes
10
answers
51k
views
How to configure ProviderManifestToken for EF Code First
I have a asp.net MVC3 project using EF code-first. For my unit testing I have been using SQL Server CE 4.0 and SQL Server 2008 Express. Both have worked perfectly with EF generating my database as ...
40
votes
1
answer
80k
views
SQL Server Express connection string for Entity Framework Code First
I am working in Visual Web Developer 2010 Express, and using the Entity Framework code-first CTP. I am able to do this with the new SQL Server CE but I am unable to find a connection string to work ...
39
votes
4
answers
64k
views
How to get connection string out of Azure KeyVault?
A hypothetical web-site currently connects using:
public SqlConnection CreateConnection()
{
DbConnection connection = new SqlConnection();
connection.ConnectionString = GetConnectionString();
...
37
votes
9
answers
140k
views
Login failed for user 'NT AUTHORITY\NETWORK SERVICE'
I been strugling with this for 2 days now without comming any closer to solution. I have read 20-30 threads alteast and stil can not resolve this.
Please help me out.
I have disable anonymous ...
37
votes
2
answers
38k
views
Can I use redis-cli with a connection URL?
I am used to psql which I can use by feeding it the connection string without having to break it in different arguments, that is,
psql postgres://<username>:<password>@<host>:<...
36
votes
4
answers
101k
views
What is IMEX within OLEDB connection strings?
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=localhost;Extended Properties=""Excel 8.0;HDR=Yes;IMEX=2"
What is the purpose of IMEX=2 in the above connection string?
36
votes
2
answers
39k
views
Why does an Entity Framework Connection require a metadata property?
I switched my DAL from using LINQ over to Entity Framework. Because my application connects to different databases depending on the current user, I need to dynamically create the DataContext at run ...
34
votes
9
answers
63k
views
Keyword not supported: 'server'
I've been trying to edit my connection string for uploading my website to a server.
I am not really experienced with this. I got this exception: the Keyword not supported: 'server'.
Here is my ...
34
votes
2
answers
15k
views
What does App=EntityFramework do in Sql connection string?
I have 2 connection strings - 1 local and 1 for my main production server. Entity Framework added App=EntityFramework to my local string when I installed it (4.1) - I'm now on 4.3. What does this do - ...
34
votes
3
answers
12k
views
Is there a difference between (local), '.' and localhost?
I've used all three of these when making local programmatic connections to databases. Is there any real difference between them?
34
votes
8
answers
30k
views
Get SqlConnection from DbConnection
I have an Extension method on DbContext where I want to do a SqlBulkCopy. Therefore I need a SqlConnection. The connection from the DbContext is from the type DbConnection though.
Among a few other ...
33
votes
6
answers
44k
views
No context type was found in the assembly
I'm using .NET 4.0, MVC3, and EF5 with code first.
My solution is split up into three projects, with the dependencies as indicated:
Project.Web -> Project.BLL -> Project.DAL
The Project.DAL layer ...
33
votes
2
answers
31k
views
Entity Framework Code First and Connection String Issue
I am getting this error when using Entity Framework 4.1 code first. I can not find any sources of what exactly to use.
Unable to load the specified metadata resource.
<add name="DataContext" ...
33
votes
4
answers
29k
views
Setting the SQL connection string for ASP.NET Core web app in Azure
I have created a new ASP.NET Core web application in Visual Studio 2015. I've also set up an Azure web app to pull in the app from GitHub and run it. This works fine, but I'm having trouble connecting ...
33
votes
3
answers
18k
views
EF 5 Changing Connection String at Runtime
Ok, I want to recreate a project that I created using EF 4.1 to EF 5.0, simple enough or at least I thought. One of the things in my old project is that I was able to change the database connection ...
32
votes
3
answers
11k
views
Can I stop the dbml designer from adding a connection string to the dbml file? [duplicate]
We have a custom function AppSettings.GetConnectionString() which is always called to determine the connection string that should be used. How this function works is unimportant to the discussion. ...
30
votes
15
answers
61k
views
azure blob storage "No valid combination of account information found"
I have an MVC4 project that I am running using Azure websites preview.
My problem is that I cant upload a blob into my blob storage container when I have deployed my website to azure, however the ...
30
votes
5
answers
18k
views
How do I set an ADO.NET Entity Framework connection string via the Windows Azure (Preview) Management Portal?
In the Windows Azure (Preview) Management Portal you can change the configuration options for web sites (see http://www.windowsazure.com/en-us/manage/services/web-sites/how-to-configure-websites/#...
30
votes
4
answers
19k
views
AzureWebJobsDashboard Configuration Error
I created a new Azure WebJob project in Visual Studio 2015 using .NET Framework 4.6.
In the app.config, I set three connection strings:
AzureWebJobsDashboard
AzureWebJobsStorage
...
30
votes
5
answers
105k
views
Get Connection String from Web.config in asp.net
I want to know the ways to get connection string from web.config file in asp.net.
I just only know the below way .
using System;
using System.Collections.Generic;
using System.Linq;
using System....
30
votes
1
answer
14k
views
Getting initial catalog from the web.config file
I have a connection string in the web.config file. I have to get the database name from it.
Let say my connection sting is
<add name="LocalSqlServer" connectionString="Data Source=XYZ;Initial ...
30
votes
2
answers
6k
views
Best practice with .gitignore for connection strings inside App.config or Web.config
I've tried several approaches with *.gitignore for managing connection strings when working on a larger team.
From the official repository of .gitignore files at gitignore, I've downloaded ...
29
votes
3
answers
29k
views
SQLite EF6 programmatically set connection string at runtime
I try to migrate form EF 3.5 to 6 (with SQLite as database). We can not set the connection string in the app config file (this works without problems with ef6). We have to set connection string ...
29
votes
6
answers
20k
views
How i can use the connectionString of the current website for log4Net instead of configuring [duplicate]
I use log4Net for my system's log. The connectionString node is mandatory if the appender type is the AdoNetAppender in Log4Net. However, I already have a connectionString in my website where I use ...
29
votes
6
answers
43k
views
how to use `charset` and `encoding` in `create_engine` of SQLAlchemy (to create pandas dataframe)?
I am very confused with the way charset and encoding work in SQLAlchemy. I understand (and have read) the difference between charsets and encodings, and I have a good picture of the history of ...
29
votes
2
answers
56k
views
MongoDB Connection String to Replica Set
I am looking at http://mongodb.github.io/node-mongodb-native/driver-articles/mongoclient.html and when you scroll to the section "A replicaset connect using no acknowledgment by default and ...
29
votes
3
answers
13k
views
In Flask-migrate ValueError: invalid interpolation syntax in connection string at position 15
I am using flask migrate to for database creation & migration in flask with flask-sqlalchemy.
Everything was working fine until I changed my database user password contains '@' then it stopped ...
29
votes
5
answers
20k
views
SQL integrated security using computer name instead of user name
I am trying to an SQL Express instance on the same network, authenticating with my domain user. It works just fine with Windows Authentication in SSMS. I verified that I can use the MyDB database, ...
28
votes
3
answers
17k
views
Point to localhost\sqlexpress using only localhost
Working on a common codebase, one developer is running SQL Server Express 2005 and the other 2 are running SQL Server 2005. Everything is working fine, but the connection strings differ. To maintain ...
28
votes
13
answers
16k
views
Connection string hell in .NET / LINQ-SQL / ASP.NET
I have a web application that comprises the following:
A web project (with a web.config file containing a connection string - but no data access code in the web project)
A data access project that ...
27
votes
6
answers
16k
views
VS2010 web deploy the connection string argument cannot be null or empty
Having problems deploying a website to an windows 2008 r2 server running IIS7. I have previously deployed another site to this server. The web deploy is connecting and copying my files to server but I ...
26
votes
4
answers
37k
views
Testing - Connection string is missing
Visual studio created a unit test project for me based on a method (right-click add test). When I try to access the database, I get an exception. Ran this code to see what my connection was:
...
26
votes
7
answers
147k
views
Connection string - Keyword not supported: 'initial catalog'
I am using Webmatrix.data's Database entity to create a database connection, however it doesnt like my connection string. I am running it from MVC ASP.net.
Ive tried changing it to server / database,...
26
votes
9
answers
45k
views
How to read web.config file in .Net Core app
I have created a .Net Core API and I referenced a .Net framework application to it. The referenced Application connects to a data base and its connection string is stored in web.config file:
...
26
votes
1
answer
48k
views
How do you put environmental variables in web.config?
I am currently Following these tutorials, and I am wanting to call the clear text string from Azure's Application Settings for Web Apps. I am under the impression that environmental variables are used ...
26
votes
4
answers
30k
views
Encrypting connectionStrings section - utility for app.config
Is there a utility that will encrypt a named configuration section (or just the connectionStrings section) in an app.config file in a similar manner that one can use aspnet_regiis with web.config ...
25
votes
13
answers
38k
views
MongoError: auth failed mongoose connection string
I can connect to the DB through terminal, but getting this error using mongoose and gulp.
mongoose/node_modules/mongodb/lib/mongodb/connection/base.js:246
MongoError: auth failed
My connection ...
25
votes
8
answers
19k
views
Can I Add ConnectionStrings to the ConnectionStringCollection at Runtime?
Is there a way where I can add a connection string to the ConnectionStringCollection returned by the ConfigurationManager at runtime in an Asp.Net application?
I have tried the following but am told ...
24
votes
1
answer
49k
views
Right way to get username and password from connection string? [duplicate]
I have a connection string like this:
"SERVER=localhost;DATABASE=tree;UID=root;PASSWORD=branch;Min Pool Size = 0;Max Pool Size=200"
How do I get the various database parameters out of it? I can get ...
24
votes
7
answers
40k
views
EntityFramework code-first custom connection string and migrations
When I create a context with a default connection string (as read from the app.config) the database is created and the migrations work - basically everything is in order. Whereas when the connection ...
23
votes
4
answers
39k
views
C# Retrieving correct DbConnection object by connection string
I have a connection string being passed to a function, and I need to create a DbConnection based object (i.e. SQLConnection, OracleConnection, OLEDbConnection etc) based on this string.
Is there any ...
23
votes
4
answers
60k
views
What is the maximum and minimum size of connection pool ADO.Net Supports in the connection string?
What is the maximum and minimum size of connection pool ADO.Net Supports in the connection string.Min Pool Size=[max size ?]Max Pool Size=[min size]
23
votes
12
answers
20k
views
Get user and password from ConnectionStringSettings
How can I get the user and password from such a connectionString in the app.config with a .NET function?
Of course I could read that string and get the value after the ID= and Password=.
<...
23
votes
3
answers
64k
views
Connecting to local instance of PostgreSql with JDBC
I have a running local instance of PostgreSql on a linux machine. When I use psql command from the shell I success to log in without any problem. I need to connect to the PostgreSql via the JDBC, but ...
23
votes
4
answers
8k
views
web.config transform - delete comments from connectionstring section
I store several different connection strings in my web.config for development and testing. All but one is commented out so I can change info as needed.
When I publish, I would like to replace ...
22
votes
1
answer
39k
views
Get the Server Name from Connection string Defined in App.config File? [duplicate]
I want to get IP Adress of ConnectionString's serverName from my app.config file and then ping it.
Actually i want ping my server before running my application.
how do i do this?
my ConnectionString
...
22
votes
8
answers
28k
views
Display a ConnectionString dialog
I'm trying to create a program in C# that should be able to create, backup and restore a SQL Server database.
For this, the user needs to be able to setup a connection string to the desired SQL ...
22
votes
9
answers
75k
views
How to change connection string in DataSet.xsd?
I have build my project in C#, I add DataSet.xsd, and connect him to
Oracle DataBase in my computer - work Excellent !!!!
When I installed on the customer computer (that connect to his Oracle ...
22
votes
2
answers
40k
views
Difference Between Persist Security Info And Integrated Security?
In a SQL Server connection string, what's the difference between Integrated Security = True/SSPI and Persist Security = True?