3

I am really struggling to get this to work. I have a connection string and I want to add the application name with an NpgSql provider. According to this SO post I should use ApplicationName, and according to the PostgreSQL docs I should use application_name. The problem I an having is that neither of those work for me.

Connection String:

<add name="Site" connectionString="Server=******;Port=******;Database==******;User Id==******;Password==******;SearchPath==******;ApplicationName=test" providerName="NpgSql"/>

Error:

key=value argument incorrect in ConnectionString
Parameter name: applicationname

Connection String:

<add name="Site" connectionString="Server=******;Port=******;Database==******;User Id==******;Password==******;SearchPath==******;application_name=test" providerName="NpgSql"/>

Error:

key=value argument incorrect in ConnectionString
Parameter name: application_name

1 Answer 1

3

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=MyAp Answered also provided to the link posted by the questioner above.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.