How to generate access token from azure OAuth 2.0 token (v2) endpoints?
I want to get an access token from given URL:
https://login.microsoftonline.com/{AzureTenantId}/oauth2/v2.0/authorize
Getting Loader exception property error on adding Nuget packages
I have added some new Nuget pakages to my existing project. But after adding i get this LoaderException property error. On Exception i see it is not able to find the assembly reference but assemblies are present in the references also in the project file.
Showing business logic/programming flow to users [closed]
Closed 3 days ago.
C# Process.Start() “access is denied” error when redirecting standard output
I am trying to create and start a process from my .Net application using the following code:
C# Process.Start() “access is denied” error when redirecting standard output
I am trying to create and start a process from my .Net application using the following code:
Running .net app on new server: You must install or update .NET to run this application
Having problems getting our .net 7 apps to run on a new Windows 2022 server. Installing exactly what MS says here does NOT solve the issue. I know people have asked this a million times, and I know I’ve gotten it to work on servers a dozen times over the years but damnit, every time we get this message, do the download and install and it does NOT solve the problem.
How to Type cast to the base template class in c#
C# experts , Please look in to the below code and please let me know what is the best way to typecast to the parent template processor class . This doesn’t work , does it require a explicit type cast using explicit?
PadRight with length of 4 gives very long result
var value = “0”.PadRight(‘4’, ‘0’); Console.WriteLine(value); The result of this is 0000000000000000000000000000000000000000000000000000 in both my project and .NET Fiddle. Can someone explain why? c# .net 2 The first argument of [String.PadRight] is an int, not a char. In this line: var value = “0”.PadRight(‘4’, ‘0’); 4 is converted to an int using it’s ascii value […]
PadRight with length of 4 gives very long result
var value = “0”.PadRight(‘4’, ‘0’); Console.WriteLine(value); The result of this is 0000000000000000000000000000000000000000000000000000 in both my project and .NET Fiddle. Can someone explain why? c# .net 2 The first argument of [String.PadRight] is an int, not a char. In this line: var value = “0”.PadRight(‘4’, ‘0’); 4 is converted to an int using it’s ascii value […]
C#- Does File.ReadAllText() have input sanitization?
I’m trying to test the security of an app that I’m building. In it, it concatenates the resulting string from File.ReadAllText with another large string. Would it be possible to, say, sneak in a text file with something like this- “; //malicious code// string+=” -in order to inject code by breaking out of the string and appending code after? Using the above example, it looks like either file.ReadAllText is escaping the double quotes preventing code injection, or that it doesn’t see the double quotes in the same way that the compiler would.
I know this is super niche, but if anyone has insight on this function, I would greatly appreciate it.