Skip to main content

Questions tagged [connection-string]

A string containing information necessary for connecting to a service, usually database.

connection-string
Filter by
Sorted by
Tagged with
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 ...
SNA's user avatar
  • 7,678
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 ...
trevorc's user avatar
  • 3,021
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 ...
GilShalit's user avatar
  • 6,361
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(); ...
Ian Boyd's user avatar
  • 253k
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 ...
Dejan.S's user avatar
  • 19k
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>:<...
Alessandro Cosentino's user avatar
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?
Dimitar Tsonev's user avatar
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 ...
John B's user avatar
  • 20.3k
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 ...
Evanescence's user avatar
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 - ...
dotnetnoob's user avatar
  • 11.2k
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?
Chris Sutton's user avatar
  • 2,771
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 ...
Dirk Boer's user avatar
  • 8,923
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 ...
Cavyn VonDeylen's user avatar
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" ...
Mike Flynn's user avatar
  • 24.1k
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 ...
Peter's user avatar
  • 13.9k
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 ...
Mark Kram's user avatar
  • 5,752
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. ...
drs9222's user avatar
  • 4,508
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 ...
Oliver Tomlinson's user avatar
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/#...
Frank van Eykelen's user avatar
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 ...
Sam's user avatar
  • 29.2k
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....
Ammar Asjad's user avatar
  • 2,960
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 ...
Chris's user avatar
  • 2,303
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 ...
Matija Grcic's user avatar
  • 13.2k
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 ...
WebDucer's user avatar
  • 1,134
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 ...
Aiping He's user avatar
  • 491
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 ...
toto_tico's user avatar
  • 18.7k
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 ...
Mark Thien's user avatar
  • 1,158
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 ...
anils's user avatar
  • 1,942
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, ...
Marcel Popescu's user avatar
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 ...
Chris Missal's user avatar
  • 6,075
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 ...
flesh's user avatar
  • 23.9k
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 ...
MPD's user avatar
  • 605
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: ...
O.O's user avatar
  • 11.3k
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,...
IAmGroot's user avatar
  • 13.8k
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: ...
Zuhair's user avatar
  • 837
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 ...
Joseph Casey's user avatar
  • 1,293
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 ...
Oded's user avatar
  • 496k
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 ...
Sunkat's user avatar
  • 393
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 ...
JamesEggers's user avatar
  • 12.9k
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 ...
nawfal's user avatar
  • 72.3k
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 ...
Red XIII's user avatar
  • 5,917
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 ...
johnc's user avatar
  • 40k
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]
Saurabh's user avatar
  • 5,687
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=. <...
msfanboy's user avatar
  • 5,293
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 ...
jutky's user avatar
  • 3,955
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 ...
davids's user avatar
  • 5,497
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 ...
ozzy_mra's user avatar
  • 597
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 ...
Christian Tang's user avatar
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 ...
Gold's user avatar
  • 61.9k
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?
rmdussa's user avatar
  • 1,559

1
2
3 4 5
93