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
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With