|
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!
|
|
|
|
|
Application.ThreadException ?
Message Signature
(Click to edit ->)
|
|
|
|
|
I FOUND IT!!!
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
|
|
|
|
|
|
My nephew is in year 1. He is 5 years old. He want me to buy him a book on meteorite for his birthday present. I am looking on google but failing to find something decent.
I want to buy one with lots of images but also with acutal description of meteorite. Any suggestion on such book?
Zen and the art of software maintenance : rm -rf *
Maths is like love : a simple idea but it can get complicated.
|
|
|
|
|
|
That one seems very down to earth.
Socialism is the Axe Body Spray of political ideologies: It never does what it claims to do, but people too young to know better keep buying it anyway. (Glenn Reynolds)
|
|
|
|
|
|
Thank you for your suggestion. I bought this one.
Zen and the art of software maintenance : rm -rf *
Maths is like love : a simple idea but it can get complicated.
|
|
|
|
|
Footfall?[^]
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
Lucifer's Hammer would probably be a "better" choice...
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|
|
The problem is in deciding which one contains the most trite "user experience" in reading them.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
OMG, just heard on the news that a giant meteorite caused the extinction of the dinosaurs
Hope your nephew won't be shocked about that!
|
|
|
|
|
Reward[^]
Hits the nail on the head!
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!
|
|
|
|
|
Quote: Perseverance is the hard work you do after you get tired of doing the hard work you already did.
|
|
|
|
|
My boss was in training all week.
And I got a lot done this week.
Hmm....
|
|
|
|
|
Sometimes the absence of management can be a productivity enhancer.
"They have a consciousness, they have a life, they have a soul! Damn you! Let the rabbits wear glasses! Save our brothers! Can I get an amen?"
|
|
|
|
|
|
UTTER
modified 30-Mar-19 1:24am.
|
|
|
|
|
Ya
|
|
|
|
|
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
|
|
|
|
|
Dean Roddey wrote: 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.
It's not just you. I'm a control freak as well.
CQ de W5ALT
Walt Fair, Jr., P. E.
Comport Computing
Specializing in Technical Engineering Software
|
|
|
|
|
Thirded. I use them but MAN I don't like it. Especially when I can't dive into them via the debugger.
|
|
|
|
|
MarkTJohnson wrote: the debugger. I've heard of that thing. I believe it's something inexperienced developers have to use, right?
Social Media - A platform that makes it easier for the crazies to find each other.
Everyone is born right handed. Only the strongest overcome it.
Fight for left-handed rights and hand equality.
|
|
|
|
|
Another problem with using some monolithic cloud API is that the company responsible for it will inevitably adbandon it, and even worse, may just delete it when their "new thing" is available. This is the primary reason I don't load jquery or anything like that from a remote location on the web. I don't trust the host to keep the files around as long as I might need them, and a perfect example of that is our 13-year old app suite that use ancient versions of everything.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|