I have a program that needs to kill any other instances of itself when it starts. In windows I can do this well enough (without WMI) by getting processes by name and searching for the exe of the application (which is unique enough for this to work well enough). In linux it’s all dotnet foo.dll so every dotnet application is
Tag: .net-core
Execute cat command to overwrite file
I am trying to execute the cat command from my C# code, but I am running into problems. So, this is just a very simple test, but I end up with the error: Error: cat: ‘>’: No such file or directory Now… both source and target files actually exist.. and same result if target file does not exist. If I
An Error has occured during the migrations System.ArgumentNullException: Value cannot be null. (Parameter ‘connectionString’)
I have the following piece of code In my Program.cs, I have the following I did a publish on a CentOs7. When I am running my application using the command: I have the following error: I do not understand why is the value of my connection string null when I hardcoded directly it in the application. What could be the
CentOS .NET Core 6.0 installs wrong runtime version
These are 2 commands I ran trying to install .net core 6.0 on CentOS 8 Stream: Install says it installed 6.0.0-0.6 but the actual version is 6.0.0-rc.2.21470.23 and my app is failing with error: Can it be fixed without manual .net install ? SOLUTION (worked) add repo to the OS: sudo rpm -Uvh https://packages.microsoft.com/config/centos/8/packages-microsoft-prod.rpm change it priority to preceed the
.NET Core Console app on Linux env var NETCORE_ENVIRONMENT – necessary?
Does environment variable NETCORE_ENVIRONMENT=Production mean anything when running a console app ? In asp.net core there is ASPNETCORE_ENVIRONMENT=Production – which (as far as I know) changes the app to use appsettings.Production.json. Does NETCORE_ENVIRONMENT exists at all and whats the effect of using it? (I found it in my scripts when I installed 5.0 app almost a year ago, now I
Trying to get Emgu.CV running in dotnet core 3.1 on debian
So I am trying to get Emgu.CV running on debian, without any success yet. I have the same error all the time, even when I fixed all the dependcies I already upgraded to debian bullseye because of problems with GLIBC package. And I use the following commands to install dependencies: Output of ldd command: Is there somebody who has any
Segmentation fault (core dumped) when calling LdapConnection.SendRequest(SearchRequest req) at System.DirectoryServices.Protocols on Ubuntu 18.04.4LTS
When I try to get user information from Active Directory, LdapConnection.SendRequest(SearchRequest req) causes : Segmentation fault (core dumped) on an Ubuntu 18.04.4 LTS (GNU/Linux 4.15.0-147-generic x86_64). If I remove the line searchRequest.TimeLimit = new TimeSpan(0, 1, 0); LdapPal.SearchDirectory method returns LdapError.TimeOut (-7). and throws : Below code works without any problem on a Windows. Verifying username and password by LdapConnection.Bind(new
.Net Coe App in Linux fails with – ProjectFactory did not find Project
Following is my server environment Server : VPS Host : AWS EC2 OS : CentOS Linux 8.3.2011 Plesk : Plesk Obsidian 18.0.34 .Net Version : .Net Core 3.1.11 (Installed manually from linux CLI) What I am look for I have created a .Net core test application and tried to run the app using following and everything works fine. App runs
Windows User Impersonation in .NET Core on Linux?
I’m writing a .NET Core application in C# that will run on a Linux server, but I need to impersonate a Windows user in order to access some remote resources on a Windows Server. I have credentials to authenticate there, but all the implementations I see rely on the “Advanced Windows 32 Base API” (advapi32.dll), which is a shared Windows
Make DateTime.Now Display European Format Globally on Linux
I’m running a .NET Core app which contains DateTime.Now.ToString(). When on my PC it displays European date format (dd/mm/yy) but when running on a Linux VM located in the US it displays American date format (mm/dd/yy) despite the timezone on the VM being GMT. How can I make it display only European date format? I know I can format it