Jetbains Rider remote debugging ASP.NET Core 6.0 apps through SSH kept failing - asp.net

I am trying to remote debug via ssh on an ubuntu host at Ali with no success. I'm using the the latest Rider, 2022.1 EAP 10.
The error is:
Debugger worker was not initialized within 100,000 ms
I’m running Ubuntu 20.04 64bit on Ali Cloud. And one side note: for the following steps from Jetbrains documents, I wasn’t able to succeed:
cd /[application path]/WebApplication to go to the application root folder.
chmod +x ./WebApplication to add the executable bit if needed.
ASPNETCORE_URLS=http://0.0.0.0:5000 ./WebApplication to run the application
WebApplication is a directory, the OS kept complaining it's a directory even after chmod+x. I managed to run the self-contained executable.

It is always better to ask such questions in JetBrains public issue tracker.
This problem should already be fixed in the next Rider versions:
https://youtrack.jetbrains.com/issue/RIDER-76083

Related

How do I use Visual Studio 2019 to remotely debug a .NetCore application on a Hyper-V Linux VM?

I am attempting to remotely debug a .NetCore application in Ubuntu Linux from Visual Studio 2019 in Windows 10. I can see the remote ipaddress (ping thru command line). I can RDT to the ipaddress. I can successfully transfer files to it via WinSCP.
I created a simple .NetCore "HelloWorld" app and copied onto the Linux VM.
I used the following commands to build and publish:
dotnet build -r linux-x64
dotnet publish --self-contained -r linux-x64
I ran the following command on the Linux VM to ensure that ssh is functional:
sudo apt-get install openssh-server unzip curl
The app is running on Linux.
From VS I try to attach to the process:
I get prompted for logon:
I get the following error:
Is there a step I'm missing somewhere?
Is there a configuration/permissions issue I am unaware of?
Thanks, JohnB
Microsoft has documented debugging a Linux target from a Windows development machine at https://learn.microsoft.com/en-us/visualstudio/debugger/remote-debugging-dotnet-core-linux-with-ssh?view=vs-2022
Unfortunately, using that method, you will need to manually deploy and manually attach the debugger. If you'd like Microsoft to change that, then it would be wise to upvote this issue: https://developercommunity.visualstudio.com/t/Convenient-way-to-add-a-remote-debug-con/917516
A 3rd party developer has created a Visual Studio extension that provides this missing feature to Visual Studio. It can be downloaded from https://github.com/radutomy/VSRemoteDebugger
I had the same problem initially because I didn't enter the connection target in the first screen.
After having entered the correct target myusername#192.168.178.95 in the first screen the second screen did not show up any longer and I got the expected list of processes

Meteor Hanging on Ubuntu when building

I have an application that builds in 5 minutes on the Mac. When I try to build in Docker or directly in Ubuntu, the machine completely hangs at some point. It so bad that I can't even ssh into the machine. It eventually times out. I am using Meteor 1.4.2.3, Ubuntu 16.04 and Docker 16.04 with Meteor installed.
I thought maybe it was related to tar and 7z, so I upgraded tar and 7z. Still hangs. It hangs when I building on web.browser. There is high I/O waits and a bunch of blocked processes according to vmstat.
This is the command I'm running:
meteor build --allow-superuser --server-only --directory /tmp/build
Is their any way to get more info about what's going wrong? I also tried to
meteor remove ecmascript --allow-superuser
b/c one article said this may be an issue. Hangs.

Project 'Unable to locate Dependency' on itself

I'm trying to run the latest Asp.Net 5 samples (currently 1.0.0-rc1-update1) on my Ubuntu 14.04 VM guest using VirtualBox on Windows 10. The sample code is being run via shared host directory.
I have the active and default DNX set as the CoreCLR x64.
When I have run the dnu restore command against either of the 2 web projects, the restore completes but with an error message. For example, for the HelloWeb project:
Unable to locate Dependency helloweb >= 1.0.0
If I run then command dnx web for the web projects I get the error message:
Error: Unable to load application or execute command 'Microsoft.AspNet.Server.Kestrel'. Available commands: web.
I have a related question here as I am also trying to also get the same samples running on my Windows machine. As they are basic and also unmodified, so I can't understand why they are not working. To make things worse, I actually had them running on this VM yesterday in the same manner I am trying here and as far as I'm aware, nothing has changed other than I have restarted the VM in the meantime.
Can anyone suggest why the projects are referencing themselves in this way and how I can resolve it?
The issue was being caused because the source code was being shared and the project.lock.json file had been created by the dnu restore process on Windows. I created a separate set of code samples and the code restored then ran fine.
This doesn't explain why the message was appearing but I assume the message Unable to locate Dependency helloweb >= 1.0.0 is actually a red herring and possibly refers to the fact that it can't replace the lock file.

Correct way to setup Virtualbox 4.3 to use symlinks on guest (for meteor)

I use Windows 8 and installed Virtualbox so i can access to a Linux (Ubuntu) System.
The most i still did to do this - so at this moment i have a working Virtualbox with Ubuntu 14.04 LTS.
In my case i need this Virtualbox with Linux for meteor.
The problem:
meteor uses nodejs and so i need to have symlinks access (i think its symlinks - i read a few about it)
Reference: How to run meteor app inside an Ubuntu VrtualBox and edit using an editor on a Windows host?
He describes the same problem i have now:
Error: EROFS, read-only file system '/media/sf_Shared/Dropbox/dev_uhurajr/chat/.meteor/local/.build320446.build/programs/server/npm/logging/main/node_modules'
So i tried to enabled Symlinks on my host (windows) this way:
VBoxManage setextradata YOURVMNAME VBoxInternal2/SharedFoldersEnableSymlinksCreate/YOURSHAREFOLDERNAME 1
Reference: http://www.ahtik.com/blog/fixing-your-virtualbox-shared-folder-symlink-error/
This works fine! When i check the extradata for my VM the field SharedFoldersEnableSymlinksCreate is on 1
I set this value for 2 folders. The shared folder on Windows and also the name of the shared folder on my Linux VM.
But .. the same problem. The following error occurs everytime meteor tries to write symlinks:
Error: UNKNOWN, unknown error '/media/Projekte/test/.meteor/local/.build320446.build/programs/server/npm/logging/main/node_modules'
So whats the right way to get this working ?
Guessing you were using Virtualbox version after 4.0, please:
Enable symlinks VBoxManage.exe setextradata YOUR_VM VBoxInternal2/SharedFoldersEnableSymlinksCreate/YOUR_SHARED_FOLDER 1
Run VirtualBox 'as admininstrator' on Windows.
Replace the YOUR_VM and YOUR_SHARED_FOLDER with your own value. You can check the value via VBoxManage.exe getextradata YOUR_VM enumerate
VirtualBox enabled symbolic for shared folder since 4.0, it's Windows permissions blocking you. You can either enable the permission for user or simply run VirtualBox as an administrator.
Please to refer the Virtualbox documentation:
Doc updated, please refer to the doc Shared Folders:
Starting with version 4.0, VirtualBox shared folders also support symbolic links (symlinks), under the following conditions:
The host operating system must support symlinks (i.e. a Mac, Linux or Solaris host is required).
Currently only Linux and Solaris Guest Additions support symlinks.
I made a development vm with setup and run scripts.
https://github.com/gfk-ba/meteor-dev-vm
Just put your meteor app in the app directory and follow the instructions in the readme.md

GIT + HTTP fails across network

As a follow on from this question on SO, I have been working with yysun's great handler-based solution for web access for GIT on a IIS platform. Their solution works perfectly when used locally on my machine (i.e. win 7, iis 7.5, .NET 4.0), but fails across the network.
Unfortunately, I need to have this running on a remote VM with Win 2003, IIS 6 and .NET 4. I'm running the web application as "Local Service" and have for now given that identity full control over the repo base directory. The web application can see the dir (i.e. enumerate git repos under that base dir) but when I try to do a "git clone" using TortoiseGIT, MSysGIT and cygwin GIT from my machine, I get the following error:
git.exe clone --progress -v "http://1.2.3.4/git/AgentDesktop.git" "C:\dev2\tmp"
fatal: http://1.2.3.4/git/AgentDesktop.git/info/refs not found: did you run git update-server-info on the server?
Initialized empty Git repository in C:/dev2/tmp/.git/
I've run "git update-server-info" and "git update-server-info -f" on the server repo, and the .../info/refs file does exist and contains the revision SHAs of the branches I want.
This seems to be a very common issue, but so far I can't see a definitive answer on how to fix it.
Any ideas?
This is not exactly what you are looking for... but maybe a change in tack would be good. What about using the IIS plugin IIRF to configure a reverse proxy to Gitblit. Gitblit is written in Java, not .NET. Or maybe just run Gitblit directly?

Resources