A-K
A-K

Reputation: 17080

How to specify ApplicationName in NpgSql connection string

Is it possible to to specify ApplicationName in NpgSql connection string? The following resource usually helps, but it says nothing in this case: Npgsql connection strings

Upvotes: 13

Views: 8234

Answers (2)

AER 4AF
AER 4AF

Reputation: 395

In case there are people who searched for answer to this question, here is the solution:

application_name=MyApp will not work for npgsql version 2.2.4.3 (Latest Released 2015-02-05)

Change application_name=... to ApplicationName=MyApp

Upvotes: 3

Milen A. Radev
Milen A. Radev

Reputation: 62573

ApplicationName works for me - "Server=localhost;Port=5432;User Id=***;Password=***;Database=***;ApplicationName=test".

Upvotes: 15

Related Questions