Hey Carl sorry I have been slammed and just now checked bluesky and saw your replies. I will put together a repo. It was global interactive but I also was using MudBlazor so I'll pair it down and see if I can give you an example and repo.
Posts by John Parrish
@carlfranklin.bsky.social here's one for you. Blazor 9 Interactive Server application - user uploads a file. On mobile, when the user browses for a file the browser disconnects the circuit. So when they have selected the file and returned to the page it reconnects and poof.. the filelist is empty.
The irony of the administration saying they are deporting people because they broke the law, then refusing to follow the law - and a court order when it doesn't fit their agenda tells you everything you need to know about where "the law" fits with the MAGA movement.
@carlfranklin.bsky.social finally we can write C# in XML format.. like God intended us to github.com/DevAndersen/... .. I suggested on reddit someone port LINQ to XPath ;)
Scott did the AI tell you to say that? Blink if you are in danger
My first belt.. seems most people do this early on but it took me a while to get around to one. Veg tan, waterstain slate gray, resolene and polished. Should last me a good long time. #leathercraft
Signal is secure but that is just the end to end of the messaging. Commercial smartphones are routinely compromised. Pegasus built a whole industry around it.. and yes people have died from their smartphones being compromised through zero day exploits.
I ran through the Starbucks drive through today and the smell coming from the window reminded me of weekends spent with my girlfriend at Barnes and Noble back when my career was getting started. I remember all of the exciting tech books I'd thumb through. That smell reminds me of learning.
When reason and logic are abandoned, when lies are embraced and condoned as part of the process, humanity is imperilled.
I closed my Facebook account yesterday after 20 years. And I am no longer tip-toeing around MAGA - if you voted for Trump you fall into one of two categories for me. You are either incredibly naive and ignorant, or you are a person of bad character. There is no other avenue.
Finally someone from the Republican side said the truth about tariffs - they are a tax on the middle class consumers of the US. So when Trump talks about the hundreds of billions he'll raise, every MAGA voter should realize it is them that will be paying it. www.cnn.com/2025/03/13/p...
Compiled FreeCAD for the first time. Looking forward to diving into the codebase. I haven't written C++ in 20 years so there's a lot of new language features to bone up on but FreeCAD is such a great OSS product and I want to contribute and learn at the same time. #freecad #cpp #oss
with just a few more lines though you can animate a whole episode of South Park 😆
Make some real progress with FreeCAD now. It's taken a lot of learning to get to this point but I have demonstrated the ability to create a surface from my original reference sketch from the blueprint and used a separate spline to influence the curvature of the surface. I'm on the right path.
It's the #Blazor Puzzle youtu.be/MZVL99H4xMs episode 68 with @csharpfritz.com and myself premiering Friday, February 28 at 2PM E
That was great Carl. Good info on the forwarded headers since nowadays a lot of folks will be behind some sort of proxy. What really threw me to start was the MS docs that said you could not use the HttpContext in a global interactive server app. Hopefully this episode gets into the google-sphere
Look forward to it!
Yeah that's a good point considering the representation focus. I'll have to pull some demographics for each class. I'm sure I can find something fairly recent.
@scott.hanselman.com it would be good to have conversation around this, maybe help identifying the areas our representatives should be enabling policy rather than policies that only benefit one group.. just as a baseline.
Yeah I was grasping at straws 😁
oh man I'm sorry I am new to Blue sky and I didn't even see that. It says one of two .. I guess I need to go read a tutorial on Blue sky 😆
@carlfranklin.bsky.social @mistermagoo.bsky.social I finally figured out what was going on with HttpContext and the remote ip address. I did not have websockets enabled on the azure app instance. For whatever reason, when it falls back to long polling it loses the HttpContext. Just FYI and thanks!
I appreciate you taking the time to try that out. I'll have to dig into why adding authentication is wrecking it.
Interesting.. you were able to add to your app state from the circuit handler. I'll have to see if I can do that. With authentication my sample app loses the value, I'm guessing in OnAfterRender (the HttpContext seems to be null then)
Looks to be after adding Authentication in, the HttpContext disappears right after the initial page load, which then sets the var for the ipaddress to null. I'm not sure what adding auth is doing to the lifecycle but that appears to be the problem.
It doesn't work in my prod app.. which has auth and a circuit handler. I'm going to have to slowly add things into that test app to figure out what is breaking it. Unfortunately still not able to use the recommended approach but at least I know it works in the simplest use case.
Thanks I did go down that path but now I've tested it on azure and got it working. Appreciate the feedback.
Well.. I created a very simple .net 8 interactive server app and published to Azure and it worked. I do not know why the docs say not to use it then. But I appreciate the feedback, I suppose I should have done that first. Now to figure out why it didn't work in my prod app.
I will throw together a very simple project and test it on Azure. I can put it in a repo. There does appear to be a way to get the HttpContext from the circuit if you are using SignalR learn.microsoft.com/en-us/aspnet... the regular circuit has nothing to get you there.
The goal is to obtain the IP of the remote so it is accessible in the interactive server state (after circuits are up). What Carl suggested (add HttpContextAccessor and then use HttpContext to obtain the IP in a component) works in debug but on azure it's null (which is what the doc I linked says)