NiftyPixel
NiftyPixel
CC#
Created by NiftyPixel on 2/24/2023 in #help
❔ HttpRequestException: No Such Host is known. (url.com:443) using WorkerService issue
Greetings! I'm getting this error when my Win Service attempts to connect to my endpoint. It throws this error if the service is started at startup, but works fine if started after login. My service is set to automatic with a user account specified. Thank you for any assistance!
4 replies
CC#
Created by NiftyPixel on 11/29/2022 in #help
❔ Access page behind Azure OAuth using HttpClient?
I've recently implemented OAuth on my Azure hosted site and need to find a way to access one specific page only of it now via c# (have been using HttpClient until now).Would it be easier/better to exclude OAuth on that page (very obscure url) or use a tenant/clientid/secret instead? I'm unsure of best way to achieve accessing that one page now. How would you approach this?
2 replies
CC#
Created by NiftyPixel on 9/22/2022 in #help
Hide cmd output when executed from a Console app?
I'm brand new to C#, am messinga round with VS -- I'm starting cmd.exe w/ some args with > outputdir/file.txt etc at the end so it logs the output to a file.txt (for instance /c hostname > whatever.txt) and this works fine. But it shows that output also in the console window (in addition to appending to file). Is there a way to hide this output? Pseudo Code: Console.WriteLine("checking hostname"); cmd.exe /c hostname > c:\whatever.txt Console.WriteLine("done"); string hostname = ReadAllText(@"c:\whatever.txt"); Console.WriteLine(hostname); I'd like it to basically output: checking hostname done PCsName Currently it's doing checking hostname PCsName done PCsName if that makes any sense 😕 I've goog'd up n down how to hide a cmd window but I believe everything I've found thus far is in regards to hiding a new process from actually popping up -- That's unfort not my issue here. Thank you for the read, patience, and any assistance!
5 replies