|
de-range. Deranged = in disarray.
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
|
|
|
|
|
Is de correct answer!
That means you are de one setting it tomorrow!
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Tis de time to derust de cranium, then!
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
|
|
|
|
|
Quote: Holy crap! It works!
For a while now I've been meaning to update one of my WinForms applications at work.
It has a TabControl and each TabPage connects to a different database (SQL Server via Integrated Security; not SQL Authentication) to gather some information and present it.
BUT! I need to use three different users to connect to different systems and I don't like having to run an instance of the app for each user.
Each TabPage was already using its own Thread for database access, so I figured I should be able to use Impersonation.
And I got it working today!
I use LogonUser (Win32 API P/Invoke) and create a System.Security.Principal.WindowsIdentity , then I pass the Identity to the appropriate TabPage's UserControl.
Thereafter, whenever the UserControl wants to access the database, it uses Impersonate.
(I'd still prefer something cleaner, but this seems to work as expected. Though I wouldn't be surprised if there's an Earth-shattering Kaboom in my future.)
modified 5-Jun-17 20:41pm.
|
|
|
|
|
Good Job!
What do you get when you cross a joke with a rhetorical question?
The metaphorical solid rear-end expulsions have impacted the metaphorical motorized bladed rotating air movement mechanism.
Do questions with multiple question marks annoy you???
|
|
|
|
|
Also, nice Marvin Martian reference!
What do you get when you cross a joke with a rhetorical question?
The metaphorical solid rear-end expulsions have impacted the metaphorical motorized bladed rotating air movement mechanism.
Do questions with multiple question marks annoy you???
|
|
|
|
|
|
raddevus wrote: to log on as three different users. Me, Myself & Irene (2000) - IMDb[^]
Sorry... too tempting...
I'll go get my coat
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
|
I knew it...
I had that link too, but I thought the film is a bit more sarcastic due to the multiple personality disorder
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
Actually non-user "service" accounts that all the devs my trusted colleagues share.
(Clarified.)
modified 6-Jun-17 16:17pm.
|
|
|
|
|
PIEBALDconsult wrote: "service" accounts that all the devs share
Well, I'm a dev and no one has shared these with me.
Share away...
These service accounts do include Netflix access, right?
|
|
|
|
|
As long as you're aware that anyone can decompile your code to get those credentials
|
|
|
|
|
|
Doesn't matter...wherever and however you store them the decompile will tell someone how to get them. Even if you encrypt them the method and keys will be in your code\config.
|
|
|
|
|
No, the user names are in the config; the app prompts for the passwords.
modified 6-Jun-17 16:18pm.
|
|
|
|
|
That actually sounds about as clean as it can get, given what you have to work with and the restrictions in place.
The app I work on at work (well, I only work on a very small part of it) needs to do impersonation in a few key places, and the library "we" (not "I") put together relies on exactly that. I've never studied the implementation all that closely to understand it, but I do recall seeing some rather exhaustive and nasty-looking error-handling and fallback code, with P/Invoke added in there to muddy the waters. That code's evolved over a period of 10+ years, so I can only imagine the feeling when you got it working...
|
|
|
|
|
We really should not do it this way. But, Sometimes things have to be done in order to please the overlords.
True discussion today. Same everywhere.
To err is human to really mess up you need a computer
|
|
|
|
|
Having been an "overlord" I have learned that, like personal relationships, stuff like this is always due to poor communication -- usually on both sides of the fence.
Jeremy Falcon
|
|
|
|
|
I had the dubious pleasure of working for some 'overlords' who had lost their grasp on reality. Their expectations were absolutely unrealistic, given the poor shape of their projects and they never realized that it was their precious way of micromanaging things that led to this poor quality.
The language is JavaScript. that of Mordor, which I will not utter here
This is Javascript. If you put big wheels and a racing stripe on a golf cart, it's still a f***ing golf cart.
"I don't know, extraterrestrial?"
"You mean like from space?"
"No, from Canada."
If software development were a circus, we would all be the clowns.
|
|
|
|
|
Totally agree. There are bad managers out there just like there are bad devs out there. Micromanagement is usually the result of feeling out of control of the situation so they have to over-compensate. And that tends to happen when people have no idea what they're doing. Me still thinks the best managers used to be devs, that way they have a clue what's going on. But, I digress.
Jeremy Falcon
|
|
|
|
|
... I'm with Randall[^] on this one ...
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
|
N_tro_P wrote: what does the government and their much bigger coin purse have access to?
This
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.
|
|
|
|
|