The Lounge is rated PG. If you're about to post something you wouldn't want your
kid sister to read then don't post it. No flame wars, no abusive conduct, no programming
questions and please don't post ads.
... are teasing an anteater by taunting and then running away, ducking into an anthill ahead of his tongue and then emerging to do the same thing again to the anteater's frustration.
They ran into a third ant, who was vegging out watching baseball and suggested he get in on the fun.
He stretched in his recliner, yawned, and settled back again: "Nah ... that sounds too much like aardvark to me."
Where the heck is me coat?
Sent from my Amstrad PC 1640 Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
So I've got this web app, EF Core with (automatic) Migrations, Azure AD authentication and an Azure Key Vault.
All works fine on my machine (of course), but now I deploy to Azure and it all goes to hell.
No problem, I'll check my logs... Except there aren't any!
I'll check Application Insights, but nothing!
I'll remove lines one by one until the app starts working... (Old school "debugging"!)
It's not EF Core Migrations and it's not Azure AD authentication, those work fine.
I've traced the line to b.ConfigureKeyVault() in the Program.cs.
So... try catch around it, log the exception and go!
EXCEPT IT WON'T FRIGGIN LOG ANYTHING!!!
The application just stops and that's it.
I get a generic HTTP Error 502.5 - Process Failure.
When I remove the line I get some logging I added in case everything succeeds.
When I add the line the application crashes again, it won't hit my catch and everything stops.
I can't debug it remotely as the app isn't running to begin with.
I've checked the key vault permissions and those should be ok.
This issue has cost me a day now and it's really pissing me off!
When I move my key vault config from appsettings.Development.json to appsetings.json everything works.
Probably because the Development.json is read after Program.cs, but the connection string for the database is in the key vault.
So in Program.cs I do my EF Core Migration, which is trying to read a connection string that isn't there (yet).
There was also an error in the key vault access policies.
Apparently, I had two app registrations with the same name, one I made, and one Azure generated (the MSI).
The key vault needs access to the MSI, not my own app registration.
The problem is that the generated MSI is not visible in the Azure AD, so it's kind of hard to check, but it does show up in the key vault.
Still no idea why everything worked locally though...
Perhaps it reads the Configuration differently in Azure?
All in all, I've learned a lot and I hate the world just a little bit more
The poll on the main page about things that interest you got me to thinking... It's one thing to be interested, but another thing to actually have any realistic chance of doing anything serious in a given area. The time investment for a lot of new things these days has gotten huge, and to be anything more than a code monkey using a magic wand style high level API you will have to really dig in.
But life is short (even if it doesn't seem that way to some of you at 18 or some such) and diving deep into one of these areas will come at the expense of things that you might be less interested in but that would probably be more practical or that are immediately necessary. And if you are older, it becomes even more of an issue.
Maybe it's just me, but I don't really have a lot of interest in letting Amazon or MS effectively be part owner of my product, and just use some cloud API that I have no control over or understanding of the workings of. I always want to understand and control what I'm writing.
But things like AI and serious DNN based speech recognition, which I am very interested in, I've dug into enough to know that I won't be able to go there. They are already too 'mathematics doctoral thesis'-like for me to take on in the time I have left, at least without completely discarding any existing obligations which ain't too practical.
It's kind of depressing to realize that there are races you'll never run, arms you'll never lay in (well, OK, that includes 99.9999999999999999999999999999% of them), and code you'll never be able to write. Things have gotten so much more complex now. Back in 'my day' when we coded by rubbing sticks together, a single person could pretty much encompass almost all of the art and science.
Explorans limites defectum
Last Visit: 17-Jul-19 20:43 Last Update: 17-Jul-19 20:43