System.IO.IOException on fresh ASP project

Hi everyone,

I'm trying to get started with ASP.NET and Rider on Linux. Having installed mono, msbuild and xsp, I was able to simply press “Run” in my newly created template project and watch a server start; however, on localhost:5000, I am greeted with an IOException. I don't even have any idea where to look for problems, so I'd appreciate some assistance here.

System info:

JetBrains Rider 2026.2.3.1
Build #RD-262.10968.170, built on September 30, 2026
Source revision: aace5c07ccc04
Runtime version: 25.0.4+1-b508.27 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Toolkit: sun.awt.X11.XToolkit
Linux 7.2.8-arch1-2
Arch Linux; glibc: 2.44; desktop: KDE (plasmashell 6.7.5)
Exception reporter ID: 290626362ab7bd8-c77b-476f-a38f-0851ce5c15d9
JCEF version: 144.0.15-262-b37
.NET Core v10.0.9 x64 (Server GC)
GC: G1 Young Generation, G1 Concurrent GC, G1 Old Generation
Memory: 2048MiB
Cores: 8
Registry:
 external.system.auto.import.disabled=true
 ide.experimental.ui=true
 vfs.windows.use.buffered.directory.stream=false
 trace.state.event.service.url=https://api.jetbrains.cloud/trace-status
Non-Bundled Plugins:
 me.rafaelldi.aspire (2.8.1)
Current Desktop: KDE
0
5 comments

Hello WildRikku 

Thank you for contacting us, and sorry to hear that you've run into this error on your first project.

Unfortunately, the exception name alone does not tell us what failed. Could you please share the following information:

- the full exception text and stack trace from the error page at `localhost:5000` (a screenshot of the page also works)
- the output in the Run tool window after you press Run
- the name of the template you chose when you created the project
- the Mono version (`mono --version`) and the XSP version

If the output is long, please upload it to https://uploads.jetbrains.com and share the Upload ID that the page shows after the upload. Only JetBrains staff can open the file, so the ID is safe to post in this thread.

Thank you in advance and have a great day!

0

Hi Alexandra,

apologies for the late reply, I was on vacation.

/usr/bin/mono-sgen /usr/lib/mono/4.5/xsp4.exe --address=127.0.0.1 --port=5000
xsp4
Listening on address: 127.0.0.1
Root directory: /home/(redacted)/web/ASP-Tests/WebApplication1
Listening on port: 5000 (non-secure)
Hit Return to stop the server.

I chose the “Web App” template which was the only one available.

$ mono --version                                                                                                                                                                      
Mono JIT compiler version 6.12.0 (makepkg/0cbf0e290c3 Sat Mar  9 11:37:33 UTC 2024)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
        TLS:           __thread
        SIGSEGV:       altstack
        Notifications: epoll
        Architecture:  amd64
        Disabled:      none
        Misc:          softdebug 
        Interpreter:   yes
        LLVM:          supported, not enabled.
        Suspend:       hybrid
        GC:            sgen (concurrent by default)

I have xsp 4.7.1-3 installed.

0

Hello WildRikku 

No worries about the delay, I hope you had a great vacation! Thank you for the screenshot, the xsp4 output and the Mono version. 

First of all, for a new web project on Linux I suggest ASP.NET Core on .NET instead of Mono. Could you please try the following:

1) Install the .NET SDK (version 8 or later).

2) Restart Rider and create a new solution from an ASP.NET Core template.

3) Run the new project and open the URL from the **Run** tool window in the browser.

If you'd like to keep the Mono project, could you please run the same command from a terminal in the project folder and open localhost:5000 again?

cd ~/web/ASP-Tests/WebApplication1
xsp4 --address=127.0.0.1 --port=5000

If the error also appears there, it comes from the Mono and XSP setup and not from Rider.

As to the error itself: XSP could not access a file or folder while it handled the request. Unfortunately, the stack trace on the page is empty, so I can't tell which path it was. Also, the "Web App" template creates a .NET Framework project that runs on Mono and XSP. Since it was the only template in the list, it looks like Rider did not find a .NET SDK on your system.

Thank you in advance and have a great day!

 

0

Hi Alexandra,

unfortunately, the .NET SDK is currently not available for my distribution due to package dependency problems.

I could however test running XSP without Rider and you were right, the error persists. I assume the template project only tries to access files within the project directory, which are all owned by the same user I am running XSP as, so this comes unexpectedly. I do however understand that this is not a problem with Rider, so I'll investigate further.

Thank you for your support!

0

Hello, 

Thank you for running XSP outside Rider and sharing the result!
Since the error appears there too, it comes from the Mono and XSP setup and not from Rider.
Also, if you'd like to try ASP.NET Core later, you can install the .NET SDK without the distribution packages by using Microsoft's installation script:

curl -L https://dot.net/v1/dotnet-install.sh -o dotnet-install.sh
chmod +x ./dotnet-install.sh
./dotnet-install.sh

After that, please set the DOTNET_ROOT and PATH variables as described in Install .NET on Linux without using a package manager, and restart Rider. If Rider still offers only the "Web App" template, please let me know.
Should you have any other questions, do not hesitate to contact us again. Have a great day!

0

Please sign in to leave a comment.