Turwaith
Turwaith
CC#
Created by Turwaith on 8/7/2024 in #help
Very weird params passing error to main Method
Sometimes you just have to write it down to find it yourself. Thanks for rubberducking guys
7 replies
CC#
Created by Turwaith on 8/7/2024 in #help
Very weird params passing error to main Method
Dammit. I found the issue. The second parameter actually had a \ at the end. Which was interpreted as an escape character for the closing " of the second argument
7 replies
CC#
Created by Turwaith on 8/7/2024 in #help
Very weird params passing error to main Method
Basically the same, for debugging reasons I have added a console.WriteLine for all three args. I have also tried opening the code and putting a breakpoint right at the beginning of the main method so I can explore the args array. Which shows me the same results. And it not only happens when I start the program from command line but also when I start it in Rider using the launchSettings.json file to pass the arguments. Same issue
7 replies
CC#
Created by Turwaith on 7/29/2024 in #help
ObjectDisposedException: Cannot access a closed Stream. I don't understand why it doesn't work.
I will try that, thanks
10 replies
CC#
Created by Turwaith on 6/20/2024 in #help
Launching WPF Windows via code when wpf is not startup project
Also, launching the window using Application.Current.Dispather.Invoke does not work since Application.Current will be null as the wpf project is not the startup project
2 replies
CC#
Created by Turwaith on 5/24/2024 in #help
Preventing SQL Injections with string based queries
From what I've read, SqlCommand and SqlParameter are a solid way to prevent injection in .net. I'm always open to be taught otherwise though
30 replies
CC#
Created by Turwaith on 5/24/2024 in #help
Preventing SQL Injections with string based queries
Hmm I guess it would be the best option to go for efcore then, even though it seems kinda overkill to add an entire new dependency for just one single method
30 replies
CC#
Created by Turwaith on 5/24/2024 in #help
Preventing SQL Injections with string based queries
I did not consider that (yet) no
30 replies
CC#
Created by Turwaith on 5/24/2024 in #help
Preventing SQL Injections with string based queries
Yes I am constructing the queries, but the parameters often come in via an API endpoint I provide. I chose SqlCommand since this is the method I usually use when executing queries on sql databases I control when using C#. It has the option to add parameters and it's easy to use
30 replies
CC#
Created by Turwaith on 5/24/2024 in #help
Preventing SQL Injections with string based queries
Do you have some feedback on my code though? I'd at least want to make queries secure for my customers
30 replies
CC#
Created by Turwaith on 5/24/2024 in #help
Preventing SQL Injections with string based queries
The SDK is a mess in many other places as well
30 replies
CC#
Created by Turwaith on 5/24/2024 in #help
Preventing SQL Injections with string based queries
The author is a multi billion dollar company, so that's probably not gonna happen. Which makes the issue existing in their SDK even worse
30 replies
CC#
Created by Turwaith on 5/24/2024 in #help
Preventing SQL Injections with string based queries
yep
30 replies
CC#
Created by Turwaith on 5/24/2024 in #help
Preventing SQL Injections with string based queries
There is no alternative. I'm writing addons for an existing software that provides this specific SDK
30 replies
CC#
Created by Turwaith on 5/24/2024 in #help
Preventing SQL Injections with string based queries
have you read my question?
30 replies
CC#
Created by Turwaith on 4/18/2024 in #help
Nuget restore (via gitlab runner) fails at a specific package
Also, when going to the solution location where the runner downloads the git repo to, open a powershell prompt there and go "nuget restore", it works perfectly fine. It finds all the packages and restores them.
8 replies
CC#
Created by Turwaith on 4/18/2024 in #help
Nuget restore (via gitlab runner) fails at a specific package
No, it is the old, ugly version. Also I got some more insight. It is specifically the package Microsoft.Toolkit.Uwp.Notifications/7.1.3 that is failing. The verbose log of the runner says that it could not be found at the location where the nuget packages are downloaded to. The thing is... it is there. I checked the location on the server and the package is there. Is has the same permissions etc as all the other packages which work.
8 replies
CC#
Created by Turwaith on 4/18/2024 in #help
Nuget restore (via gitlab runner) fails at a specific package
It does not matter whether I specifically add the packge in the script or not. Both cases generate the same error
8 replies
CC#
Created by Turwaith on 1/9/2024 in #help
HttpClient does not return anything
Yeah but how do I do that in the context of async programming? Task.Run will put the actual call into another thread, that's fine. And without the .Wait() the code will continue running immediately. So I need the window to react somehow to the request-thread returning its task. Do I fire an event from there? Or how do I make that the UI threads knows when the call is finished and has returned?
28 replies
CC#
Created by Turwaith on 1/9/2024 in #help
HttpClient does not return anything
I need the window to stay open until the call comes back or cancels and then react accordingly
28 replies