skip to Main Content

I’m trying to run my ASP.NET website (created in Visual Studio c#)

I followed this Steps:

  1. I installed Raspbian OS as operating system for the Raspberry pi
  2. I enabled SSH connection
  3. I published my website so that is able to run on Linux device
  4. Then I copied the publish folder on my Raspberry (using WinSCP)
  5. I tried to run the Website with Powershell, I got this message:
    pi@raspberrypi:~ $ /home/pi/web/Modellfabrik
    info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[62]
          User profile is available. Using '/home/pi/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest.
    info: Microsoft.Hosting.Lifetime[0]
          Now listening on: http://localhost:5000
    info: Microsoft.Hosting.Lifetime[0]
          Application started. Press Ctrl+C to shut down.
    info: Microsoft.Hosting.Lifetime[0]
          Hosting environment: Production
    info: Microsoft.Hosting.Lifetime[0]
          Content root path: /home/pi
  1. When I tried to run the website on my browser using:
    http://myraspberryipadress:5000 but it does not work

2

Answers


  1. You probably don’t have port 5000 open on your raspberry pi.

    Run nmap -sT -p- <192.168.0.X.X> to see the list of available ports open on your pi.

    Check out an article like this for how to open that specific port.

    Or – even safer, setup a reverse proxy nginx server on the pi. Link

    Login or Signup to reply.
  2. It’s been a long time, but still…

    Raspberry spins only http://localhost:5000 and http://myraspberryipadress:5000 will not work.

    You have to add to your "appsettings.json" this line "Urls": "http://[::]:5000" or "http://[*]:5000"

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search