简体   繁体   中英

How to run an ASP.net website in Raspberry pi

i'm trying to run my ASP.net website (created in visual studio c#)

I followed this Steps:

  1. I insatlled 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

  6. When i tried to run the website on my browser using: http://myraspberryipadress:5000 but it does not work

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

Run nmap -sT -p- <192.168.0.XX> 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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM