简体   繁体   中英

Accessing Raspberry Pi Webserver with C#

I am looking for a way to connect a database to my WPF Application. I already connected it to a database which is installed on the same machine, but now I want my program to run on other computers as well, that means I need a server which I can access remotely. So I came across using a Raspberry Pi as WebService with an MySQL database and accessing this database with a Rest API. As I am quite new to these kind of problems (servers) I wanted to ask if anyone has experience with using a Raspberry Pi as Webserver and could give me some suggestions or tutorial recommendations.

Thanks in advance!

If you have a MYSQL instance running on a Raspberry Pi you don't need a WebService to connect to it. You need to set up the MySQL database and then you can connect via the appropriate connection string as long as you are on the same network as the Pi. I don't know what OR mapper you are using in your WPF application. But here is a guide to set up a MySQL database on a Pi and make it available on the network.

https://howtoraspberrypi.com/enable-mysql-remote-connection-raspberry-pi/

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