Skip to content

Keyword not supported: 'application name' #3302

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
jjhoweyeprod opened this issue Apr 24, 2025 · 6 comments
Open

Keyword not supported: 'application name' #3302

jjhoweyeprod opened this issue Apr 24, 2025 · 6 comments
Assignees
Labels
Waiting for Customer ⏳ Issues/PRs waiting for user response/action.

Comments

@jjhoweyeprod
Copy link

jjhoweyeprod commented Apr 24, 2025

At wits end, not sure what else it could be. . thanks!
I have a different app with similar ConnString and it has no issue.

Happening using SqlClient 5.5.2 and 6.0.1, inside the aspnet:9.0 runtime image.
<PackageReference Include="Microsoft.Data.SqlClient" Version="6.0.1" />
Cannot reproduce locally on Windows 11.

Also not sure why its converting to lowercase.

logger.LogInformation(connString)
await using var connection = new SqlConnection(connString);

Server=PODSDev-db;Database=PODS;Trusted_Connection=False;uid=E_READ;password=xxx;Application Name=My Service Test

Keyword not supported: 'application name'

When I make it one word:

Server=PODSDev-db;Database=PODS;Trusted_Connection=False;uid=e_READ;password=xxx;ApplicationName=My Service Test

Keyword not supported: 'applicationname'

@ErikEJ
Copy link
Contributor

ErikEJ commented Apr 24, 2025

@jjhoweyeprod Maybe you can provide a runnable simple repro (.csproj and Program.cs)

@jjhoweyeprod
Copy link
Author

@ErikEJ I can try, I was hoping it was something simple or a known issue as I have other apps that it works fine on.

@cheenamalhotra cheenamalhotra added the Triage Needed 🆕 For new issues, not triaged yet. label Apr 25, 2025
@benrr101 benrr101 added Waiting for Customer ⏳ Issues/PRs waiting for user response/action. and removed Triage Needed 🆕 For new issues, not triaged yet. labels Apr 29, 2025
@benrr101
Copy link
Contributor

@jjhoweyeprod yep, we will definitely need a repro scenario for this one. The keyword you're using should be available, especially on the versions you listed.

One thing to double check, ASP.NET has some unexpected behaviors sometimes with package versions it pulls in. You might want to double check that in the scenario you experience this error, that you are in fact using Microsoft.Data.SqlClient v6.0.1 to make the connection. I've encountered issues where some specific parts of ASP.NET (eg, session managment) will implicitly use older versions of MDS without it being obvious.

@jjhoweyeprod
Copy link
Author

jjhoweyeprod commented Apr 29, 2025

I cannot reproduce myself in my repro project, so we can probably close unfortunately.

I suspect it's due to the way the Connection String env. is being injected into the container from our Helm Chart, something else is blowing up and its blaming the final index.
I still can't tell a difference looking at each character by character - my appsettings connstring was identical to my Chart env (pointing to k8s secret)
Even sillier -if I remove Application Name parameter from the k8s secret string it begins to work.

@benrr101
It was using .NET Runtime 9 MCR docker image with this dependency in the csproj that gets restored
PackageReference Include="Microsoft.Data.SqlClient" Version="6.0.1"

Not sure how this is another opportunity for a different one to come in.

@paulmedynski
Copy link
Contributor

Does your password include a semi-colon or other reserved character? What happens if you specify Application Name earlier in the connection string?

@paulmedynski paulmedynski self-assigned this Apr 29, 2025
@jjhoweyeprod
Copy link
Author

jjhoweyeprod commented Apr 30, 2025

Does your password include a semi-colon or other reserved character? What happens if you specify Application Name earlier in the connection string?

Password: No semicolon, only an exclamation mark.

I believe we had tried adding ;Encrypt:no; to the suffix, but had same issues.

The fact I removed the space and it went from 'application name' to 'applicationname' suggests it was partially parsing it. The lowercase it still confusing me.

Anyways, I am going to chalk it up to something with injection of ENV.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Waiting for Customer ⏳ Issues/PRs waiting for user response/action.
Projects
None yet
Development

No branches or pull requests

5 participants