« first day (2001 days earlier)      last day (2148 days later) » 
08:00 - 19:0019:00 - 23:00

8:40 AM
hello everyone
 
9:09 AM
Morning'
 
9:52 AM
hi
 
10:15 AM
Morning
 
hello both
 
hey i am new in this room i don't know about this room
 
well it's Desktop development room.. WPF is the framework of choice here vs Winforms favored by older generation of desktop developers
 
okay by the way i am pankaj and i am a front-end developer
 
10:31 AM
Nice to virtually meet you Pankaj and welcome to our room. We're generally pretty active but the users are just waking up :)
I find your ninja tip on == vs === pretty curious.. we are of the exact opposite opinion :)
relying on voodoo to do the right thing (like in == case) is just asking for trouble as soon as language/framework chooses to change the behavior
 
Really you go through on my content it's is really cool yup if you have any suggestion so plz give your feed back i will definitely analyze and improve my content :)
 
10:47 AM
well no I'm not a javascript person so i wasn't aware of it until you came here. And when somebody new comes over, i have a quick glance at their SO profile to see who has walked in.. as in somebody curious.. somebody who has any background in what we do.. what sort of questions do they ask.. just get an idea of person you know
 
Hi all
 
Hey Alex
 
Hi Maverik
 
Github really anonys me sometimes, trying to create a new repo, so I'm selecting the folder Application which has the solution file and the sub folder with the csproj file etc in, but instead of checking the solution file AND that folder in, it's going straight to the sub folder and checking that in instead and leaving the .sln
 
leave github client alone and just do it yourself - use TortoiseGit & just setup your own SSH keys with github (or "borrow" the ones github desktop has already created for you but you'll have to dig them out from app data)
 
11:03 AM
Fixed it now, I'm not a fan of using the command line stuff for git
 
I just spotted this in a network request and it gave me a chuckle at ingenuity: X-Hire-Me: clint at wtfismyip.com (he had it proper.. i changed it for spam)
^ properly targeting the sorta person you'd want to work with.. the one looking under the hood!
his fine website to find out your ip: wtfismyip.com/json (i'm trying to dig out services external ip at boot time)
 
Changed server to "Apache" on an ASP.NET app. The bots hitting site were all searching for unix folders
 
each time i start a new site on the hosting server.. it gets bombarded by people looking for wpadmin and such
(i don't expose the X-POWERED-BY stuff)
 
Same here. We give fake info if anything at all
 
So yesterday I found something pretty interesting that hasn't blown up in news yet though I feel it should
I imagine everybody is aware of whatsapps claim of encrypting chat ?
I of course idiotically believed that they must have done it to be on par with other software that started the trend like Signal.. thanks to a hacker news article i found out I may have been very wrong!
so Whatsapp touts to encrypt your chat with AES(128 from memory)
what they don't tell you is: they use ECB mode of AES to do that
 
11:18 AM
I've used whatsapp but for nothing sensitive
 
now I was only aware of ECB has being a historic thing.. I've never actually seen any production app using ECB mode. but here we are with whatsapp
 
@Maverik okay but thanks!
 
oh yea but this isn't about being sensitive
so yesterday I found out this really neat site that shows you what an ECB encryption looks like if you visualized it (seems it was wikipedia)
snipped an image from: en.wikipedia.org/wiki/Block_cipher_mode_of_operation (good general read)
the order of those images is: Input -> Output in ECB mode -> Output in other modes (as you'd expect)
so despite each individual pixel being encrypted.. ECB encrypts the same input with same output
apply that to text and apply plain text frequency analysis algorithms and you can hazard a good guess at what the original was
now you may think a guess doesn't mean much.. and well theres the sensitive chat argument that everybody uses.. but you forget.. this is facebook you're dealing with.. they don't need sensitive.. they want the insensitive
 
Yeesh
 
needless to say all of this stuff is also visible to all government level agencies
 
11:24 AM
Oh come on... who doesn't want Russians or others snooping on our data?
 
i'm more concerned with May than russians at this point
she's actually worse than trump.. because she's so good at hiding being so bad
but we shall attempt to ignore that and not dive into politics other than for entertainment reasons :)
 
Pretty soon, we can simply type "Need pizza, extra cheese" in social media, and have some gov agency stop by with our order
Yup!
 
but moral of the story is: just because they say it's encrypted.. doesn't mean it actually protects you unless you know exactly what kind of encryption is being applied
 
I tell friends: politics is entertainment.
 
this same is applicable to your TLS connection.. I'm not aware of windows allowing ECB mode in TLS settings.. but in custom apps .. if you can peek at connection details.. you may want to do that
(the most insecure setting still in use should be 3DES used by XP era things in TLS 1.0 mode)
I'll clean up the image eventually tomorrow - gonna leave it there for now for folks catching up on transcript
 
11:31 AM
Nah, nothing wrong w/ leaving it
 
12:03 PM
So I'm reading about PasswordBox and for obvious reasons it says to never bind to it and get the password in plain text, at some point i'll need to send this password to be authenticated. What's the best way to do this?
code.msdn.microsoft.com/windowsdesktop/… I've found this but not sure if it's the correct way
 
most of us use a password helper for the purpose
just search this transcript for passwordbox.. there's plenty of repeated talks about it
While it is a bad practice technically.. the communal consensus is.. if somebody has access to your computers memory.. you have much bigger problems on your hands than us storing password in memory
 
Yeah, as long as I'm not storing it for long periods of time (or at all infact) it can't be too bad
 
user9145305
For some reason, my binding is not picking up a change on my toggle button. When I toggle it, it should change a label text that is bounded to a property as well but it is not doing it.
 
user9145305
12:19 PM
Could someone check out my GIST and see what's wrong? gist.github.com/ericps8/11453b50e658ea8884b68be599d34d21
 
user9145305
It is not firing property changed event when I select the toggle button.
 
Cuphead.. you know our stance on drive-by debugging service questions right? (Not appreciated in short)
Hey biggi
 
However, I know exactly what your problem is.
 
wow you saw me enter room
scurrryyy....WELCOME TO MAVS DUNGEON
 
/sigh as i keep saying.. our helpful folks need to calm down
(you can ignore my comment Zarenor if you're going to leave it at that tease!)
 
12:33 PM
Mav, I know what your point is, but all I can do is either point him to the SO question that already answers it, or answer it myself
Which one is less work for me and less disruptive?
 
no just ignore.. this is never going to end if you keep responding
if you don't believe me.. just dig out cupheads history to see the pattern
otherwise you know most of us can look at gist and point out whats wrong
 
@Cuphead If you need debugging help, we prefer that you're an active member so we know you've already looked for the answer elsewhere. This is something that I see asked extremely frequently. I guarantee there's a good answer on SO
 
as for SO question that already answers.. he has access to same tools
yea the point is put in some goddamn effort and stop dumping it on others to do your work for you
 
The issue is you're not notifing the change system enough. It doesn't 'look inside' your code to figure out how everything's wired up.
 
^ now this is certainly more effort!
go read what i wrote about AES ECB if you really wanna kill time :p
 
12:36 PM
And other than that, you should dig into it yourself. It's an easy fix, but I'm not going to write it for you.
I already have done
 
guess i need to spam more to keep you occupied!
i was actually going to ask a question before i got side tracked by .. this
you've got some asp.net experience yea?
 
Me? More than a decade ago
So 'no' is more accurate
 
hmm well in worst case i can ping the other guys
 
Sure
 
but i'm about to do something cringe worthy and thought I'll ask before i do it
I have a poormans log in a webapi controller (stringbuilder log)
 
12:38 PM
everything i do is cringe worthy :)
 
I can only output this "log" via a non-200 response
what I can't figure out is.. how to do it
if i issue something in 400 - i see bulitin error code pages
so my cringe worthy idea: throw an exception when asked for log explicitly
(posting log as message)
@RudiVisser summoning you cos i think i'll probably need to pull you in for this anyway ^ (context is asp.net .. not core)
 
Uhhhh. So. That's going to be damned slow. If damned slow is fine, I.... I'm not sure how to protest it other than that
 
damn slow.. i doubt that
this isn't supposed to be a normal thing
this for the time when i can't figure why the hell is service responding with false when it should be true
(its the only thing that service is supposed to respond with - in form of a 200 OK response)
 
Oh, it will be slow. An exception will always unwind the stack and do a few other things (as I'm sure you know). It will certainly be an expensive operation. But I just don't have a good argument against it if it's going to be really anomalous.
 
186ms - i'm ok with that considering this is like one off troubleshooting step (and doesn't get called automatically - somebody has to explicitly call service with exception throwing behavior enabled)
 
12:45 PM
wtf mav
You shouldn't see error code pages on an ApiController
 
what?
 
You said when you're returning 4XX Status you're seeing built in Error pages?
 
oh yea
doesn't matter what i return really.. 200OK is the only fixed response i can't mess with -- others can be anything
I changed 400 to 204 instead to use as false.. and that works fine.. except how do I output text without responding with 200
(the actual service calling this one sees 200 response as a go ahead to request new certificates.. that I do not want to do when I'm trying to figure out whats going on)
 
Is it an actual ApiController
 
normally i have access to Seq server and i can simply check logs from there
as far as I can tell
public class HomeController : ApiController <-- i have access to methods like Ok() and StatusCode()
wait.. just in case there's a confusion: I called it from browser and of course browser thinks it's a normal 404
 
12:50 PM
I'm working on some .NET component in our app at the minute, and you never realise how much you miss Linq until you can't use it :(
 
so ignore bulitin error pages.. my real question is what can i do to output response without using a 200 response
lol Dannys true for most of the things we talk about in here
you don't know what you're missing until you've learned what we're talking about and then it gets taken away
 
using delegates instead
 
i find it odd though that you can't use LINQ
that implies your c# level is below 3 .. now why in the world would that be the case?
 
it's .NET 2.0
 
???????
 
12:56 PM
why?
 
It's a licensing wrapper for an app written in win32
 
whatever the case may be.. why .net 2.0.. in this era?
 
We're not given time to fix stuff like this
 
very bright chance you can just retarget to .net 4.5 and it stays functional
 
To talk to our main app we need to go through COM to get access to this in our main app..
 
12:56 PM
Can you not use CreateResponse(..)
Mav
 
Rudi: i'm utter noob - i'm at the WPFs click code behind learning stage in asp.net
 
return Request.CreateResponse<string>(HttpStatusCode.NotAcceptable, "boobs");
 
yea I was just googling.. thanks.. i think thats exactly what i needed.. just didn't know what to search for
Thanks - that worked
also TIL: Dns.GetHostAddresses() actually talks to HOSTS file before talking to dns (should have been obvious but never realized before today - this was the reason everything was coming up false with my check because it was resolving to 127.0.0.1)
 
1:12 PM
Turns out the projects been changed to 4.5 in another branch thankfully
 
I hate Microsoft so hard right now
 
Why would Intellisense stop working in middle of coding? Argh
Will delete .suo file
 
the same reason they use TLS 1.0 when all your system is operating on TLS 1.2 and has prohibited TLS 1.0?
ok new problem from me (and this might something RUDI related too): anybody has access to IPv6 machine ?
 
1:29 PM
That fixed it. Plus did a clean on the solution
 
I did have an IPv6 server somewhere, can't remember where, but it stressed me out too much
 
its ok.. I just got patched into IPv6 by my nice comms engineer.. so i can do it myself now
so my confusion was: when we normally ask to see "whats my ip" from web - you can typically see both ipv4 & ipv6 -- i couldn't figure how that translates when we are working with automated json response since it's not coming as a list.. what will it respond with
 
1:53 PM
so i'm a bit off with the times: if someone were to start a brand new project and have either windows 10 or something that would boot windows 10 core, what's the go to framework now?
still wpf?
gui for customer
no databasing
 
Uhhhh. Probably UWP
That's what Microsoft wants you to do, anyhow
 
i dont' care what M$ wants me to do :)
 
But it's still MVVM with xaml, so it;s real similar. It defaults to less priviledged, so it has some restrictions on file IO
(IIRC)
 
WPF won't run on core -- i'm not sure if UWP will?
shouldn't - core isn't supposed to have UI support is it?
 
Yup, then it wouldn't be core
UI for Win is different than Mac
 
2:00 PM
UWP runs on core just fine (that's why it's universal)
but i have anything at my disposal (brand new project, i'm setting specs)
 
Is UWP the prefered these days?
 
that's what i'm asking
not sure
or webapp
i mean there's practically an indefinite number of options
 
Just to be clear; UWP does run on core but that's not why it is universal
its universal because it runs on Windows, Windows Phone, HoloLens, Xbox, etc
 
Right, but core is included in the universal
Guess I should have specified
 
I'm not sure you know what you are saying
most people when the say core imply that it will run on Linux/mac
UWP does not
If you actually have a customer base that is 100% on Win10 UWP has some advantages (and some disadvantages)
but yes; that would be MS's intent
And no, core does not have general UI support yet
 
2:12 PM
i know what i'm saying, i'm just not typing it clearly, typical engineer's curse.
 
My weirdly popular answer on the topic: stackoverflow.com/questions/28586642/…
no idea why of all the content I've posted its the only one that's gone 100+
 
it looks like good answers
says WPF still standard for desktop/UWP for other windows platforms
our "software architect" says to do html/css/js
because it looks flashier
ick
 
Hmm. I'd upvoted but can't remember when. Answer is vaguely familiar
Dang memory problems
 
WPF is still standard because Win10 adoption is still very slow
 
Annoying that to use SSRS reports, you have to use a Winforms container
 
2:16 PM
^^ also; web browser!
(Ok, it hides the winforms container, but its still there)
 
Come on, MS. Why not treat WPF as a full member of family instead of the outcast cousin
 
We just bit the bullet and dealt with it
 
Yup
 
biggi; if you actually have a 100% UWP customer base I would do it in UWP. Mainly because if you can use Enterprise store distribution and updating becomes way, way easier
 
i'm setting the spec: so i can do whatever since it's new...
our business structure isn't quite what you're thinking probably
 
2:20 PM
do all your intended users actually have Win10?
Just used to a lot of pushback on that :)
 
uhhh
sec
check slack
it will probably explain a lot
 
2:41 PM
that would require me to actually login to slack...
 
2:54 PM
Anyone know much about COM Pointers in c++ and checking if they're valid?
 
lol... no
The C++ lounge would probably be of more use to you
 
3:09 PM
A Win10 user is asking: Are there any tools to allow the Aero look? So everything's not flat
 
no
That's the new look. Aero is dead
You might be able to do something with WindowsBlinds; but that's about it
 
That's what I'm discovering. I'm okay with it
Windowblinds looks good. Paid product. Might recommend that one to them
 
Mmmmm. COM is one of those things that we'd all be better to learn but kinda the whole reason to use .NET is to be abstracted on top of COM and not worry about it
 
i use a lot of COM ports...is that what you're talking about?
 
@Alex dont - i have it (have had it for like 15 years now) .. they couldn't get much done with Windows 8 - and with 10 while they've added support.. the themes community is stagnant generally and those that are making something.. rarely do it for windows 10 and they'll most likely be premium
it was great back in the day.. but not recommended post windows 7
 
3:22 PM
Nah. Component Object Model. The object model backing Win32 - it still undergirds WF and WPF. Not sure how much involvement it has in UWP
 
Ahh, didn't know that
Thought someone would provide a non-flat theme for Win10
 
wincustomize.com -- see if you can spot something from recent times that's to your liking and win 10 compatible
 
Let me look
Thanks
 
np
 
 
1 hour later…
4:25 PM
Does IDserver4 allow for authentication only by the apikey and not the token?
 
IDServer4 has no concept of an API Token
 
Oh yeah, IDServer4 just provides the token and authorizes it?
 
You either use API Tokens (Server -> Server, usually) or Tokens through a user's OpenID/OAuth/whicheveritis login
 
The person I'm on this project with wants to use an apikey instead of token based
 
So just do something custom, verify his token passed in a header or similar matches against the one you'd expect, and if so - auth'd
You can write your own AuthorizeFilter with an expectation or a more complex AuthenticationHandler
 
4:34 PM
I'll get him to look into it if he wants to change it
In my WPF app i'm thinking of having [Caller] -> IAuthorizedRequestHandler <-> IHttpRequestClientWrapper, where the caller sends the endpoint to the authorized requesthandler, which then forwards it into the httpRequestClientWrapper, if it returns a 401 it requests another token and sends the original request again
But I've just thought if I do my authenication to the API this way I'll have to store the users username and password
163
Q: How do you create a custom AuthorizeAttribute in ASP.NET Core?

jltremI'm trying to make a custom authorization attribute in ASP.NET Core. In previous versions it was possible to override bool AuthorizeCore(HttpContextBase httpContext). But this no longer exists in AuthorizeAttribute. What is the current approach to make a custom AuthorizeAttribute? What I am t...

Second answer down seems right, yeah?
 
For API Key yes
If your WPF app has to auth - send it off to the OpenID Connect Endpoint
Get back your JWT
and pass that up
You can support both forms of auth in your app (APIKey for server endpoints, Client Credential Login for clients)
You just store the token
 
But the token comes back with a lifetime
Can I get rid of that lifetime and make it permenannt?
 
and so you can refresh it
What you're looking for I think is offline_access
 
If it refreshes it'll need the username/password to call /connect
 
Refresh tokens allow gaining long lived access to APIs.

You typically want to keep the lifetime of access tokens as short as possible, but at the same time don’t want to bother the user over and over again with doing a front-channel roundtrips to IdentityServer for requesting new ones.

Refresh tokens allow requesting new access tokens without user interaction. Every time the client refreshes a token it needs to make an (authenticated) back-channel call to IdentityServer. This allows checking if the refresh token is still valid, or has been revoked in the meantime.
No, you use the refresh token provided through offline_access
 
4:45 PM
Looks like I've got some reading to do when I get back :)
 
Call this each time you want to use the Access Token, and it'll provide you with an automatically refreshed token throughout the lifecycle of your app
If you want to persist within restarts, then yeah you kinda need to store the u/p without additional jiggerypokery, but you can always use the DPAPI of Windows to protect that
I mean obviously that's for a web app but it's easily adapted to the client side, just don't store the tokens in the context, have your own provider (can be static or something idk)
 
5:07 PM
Wow, that's so much more involved than what we're doing now with custom attributes
 
Am I okay to use that Token Provider, Rudi? since it looks like it's part of your work stuff
 
@Dannys You don't. If someone passes you a bad pointer, there is nothing sensible you can do. (except for making a bug report)
 
Rudi only charges $1000 per call to that code
;)
 
It's my own stuff I'm COM registering, I'll deal with it tomorrow at work
It's something to do with the result I'm getting from the method I'm calling
 
5:24 PM
api auth is fun
 
5:36 PM
docs.identityserver.io/en/release/topics/refresh_tokens.html states that having the configurations AllowOfflineAccess = true, AbsoluteRefreshTokenLifetime = 0, RefreshTokenExpiration = TokenExpiration.Sliding should give a token that never expires
Maximum lifetime of a refresh token in seconds. Defaults to 2592000 seconds / 30 days. Zero allows refresh tokens that never expire when used with RefreshTokenExpiration = Sliding.
I'm guessing the refresh token isn't the same as the access token?
/connect/token returns gist.github.com/Daniel-sims/7f45d8838e141281594c66d38ef79ab1 which doesn't contain a refresh token
 
user9145305
Just a general question, but if I have an Object and I am using this Object's List property as an ItemsSource, is there a way to reference the Object's other properties?
 
user9145305
This list of Strings, btw
 
reference the objects other properties from where?
a data template?
 
user9145305
I am assigning the DataType to the class, the ItemsSource is the List<String> property. I am wondering if I can reference the other properties of the class because right now, all I can really work with is the String representation
 
show some code
 
user9145305
5:42 PM
<HierarchicalDataTemplate DataType="{x:Type local:GroupChoice}" ItemsSource="{Binding Choices}">
                    <HierarchicalDataTemplate.ItemTemplate>
                        <DataTemplate>
                            <TextBlock Style="{StaticResource TextBlockBaseStyling}" Text="{Binding}"/>
                        </DataTemplate>
                    </HierarchicalDataTemplate.ItemTemplate>
 
so inside the data template
you want to reach up and access some other properties that are beside Choices
yes?
 
Julien - no concrete answers please
point him in a direction but he needs to do the heavy lifting
 
user9145305
Yeah, so GroupChoice has a couple of properties, including the List of Choices, which is just a string List. I want to access the other properties of GroupChoice but the binding tells me that the String doesn't have these properties, which is understandable.
 
look up relative binding and adjust data context
 
you want to use RelativeSource to walk up the visual tree and find the data context you are interested in
 
user9145305
5:44 PM
I thought about assigning the DataContext of a textblock to this class
 
user9145305
Ok, thanks, let me try that out.
 
whip crack
 
I'm afraid of going on holidays at this point.. ill omens
 
what is with everyone and tree views lately
 
oh hush mav, it'll be alright
 
5:46 PM
I try to avoid them like the plague
 
same
 
lol same
 
<3
 
user9145305
I won't stop by anymore.
 
thanks
 
5:47 PM
treeview is like the datagrid of itemscontrols
hahahah
 
that's bad
 
i guess its more just the hierarchical stuff
 
mav is gonna hate me when i start back up with UWP probably
if he doesn't already
 
hierarchical data does not necessitate a tree view
 
mav is only in biting mood with vampires typically
 
5:49 PM
master-detail the occasional nested items control; all work too
 
no i meant the hierarchical treeview is where it starts to hit datagrid levels
 
oh, yeah
 
mav may also be on his periods shrug
 
plural guys. watch out
 
^ it's talk like this that made me think mav was female when i first joined
plus biting can be...fun ;)
 
5:51 PM
i unintentionally bit the head off of a peer.. in front of my line manager (and director)
 
I was close to arguing with someone yesterday
 
biggi: men have go through something similar actually.. but it's just not widely known because of lack of physical symptom
 
for using auto instead of declaring types everywhere
 
i'm all about the var baby
 
I do it everywhere because pretty much everything I've read and watched says to use it
 
5:52 PM
well my argument was more like .. stop dropping pile of poo on my desk everyday
 
even the inventor of c++ says to use it...
 
i'm so used to declaring int/char/etc since i'm embedded
 
Type inference is good
 
I'm slowly converting to var
very slowly
 
We recommend that you use the auto keyword for most situations
straight from msdn. lol
 
5:53 PM
Heck, even Java realized that, and in 2018, they got the var keyword in Java 10
 
You should see how most of my team reaction when I use stuff like const auto num{41}
Forgot what his name is but it's in a book about style guidelines for modern c++ and it says to use braced initialisation over =
 
hmmm, not a fan of "uniform initialization syntax", it brings its own issues
 
I don't use it all the time, but when I do it raises fire
 
6:16 PM
the biggest advantage I've had of embracing var everywhere is my minds gotten spare cycles to invest elsewhere rather than figuring out and then tweaking types all over the place as the code evolves
once you get used to it.. there's no need to ever lookup types unless you're deep in a debug session of a foreign project where you need to see what else can be used to do something
(in terms of type changes to achieve something otherwise debugger already shows you the proper type of course)
 
6:33 PM
yeah i really just dont see the disadvantage as long as you are using an IDE to look at the code
 
I'm getting invalid_client when requesting a refresh_token from IDServer even though the client_id and client_secret are identical to the ones I'm using to get the original access_token
 
i wish i could use var in my embedded
would make things 1000000x easier
so some of this code i'm working on has literally a 300 line chunk of commented out code :(
 
github.com/IdentityServer/IdentityServer4/blob/release/src/… I'm hitting the error in there on line 58, but I've got my client_secret in my request
 
6:49 PM
@Maverik do you use reactive UI?
 
08:00 - 19:0019:00 - 23:00

« first day (2001 days earlier)      last day (2148 days later) »