Can Radzen with "Server -side project (.NET Core) C#" be deployed to Nginx running on AWS Ubuntu Linux?

Hi,

I am trying to deploy my Application with "Server -side project (.NET Core) C#" to AWS Lightsail ?

When I extract the deploy.zip ? I found the directory structure with "wwwroot".

It seems that the directory is working for IIS Server.

  1. I want to know this deployment can work with Nginx or not .

  2. I want to know this deployment can work with Linux or not.

Can someone reply this request ?

Regards,

Paul Wang

Hi Paul,

This is the default structure of Angular app with .NET Core backend - nothing related to IIS only. Yes, I can confirm that Radzen generated Angular + .NET Core application can be deployed to Linux with nginx - in fact all of our demos are deployed this way.

Hi enchev,

Here are my deplyed file structure.

The first screenshot file is that I want to deploy it to "/pmslog".

The second screenshot file is that I unzip deployed file. It is the "root directory" including "Microsoft Files" and "wwwroot"

The third screenshot file is that "wwwroot" includes "index.html" file.

Where can I find the detail instruction to deploy them to nginx ?

The nginx's "html" directory is its "wwwroot" directory.

Or, what is the correct step to deploy this deploy.zip into my nginx ?

Regards,

Paul Wang

What you see is the default contents of a published ASP.NET Core application. The wwwroot directory is where it serves static assets from (HTML, CSS etc) and isn't related to IIS. This means that you need to deploy the whole directory not just wwwroot. Also Nginx cannot serve an ASP.NET Core application. You need to use dotnet server.dll and then setup an Nginx reverse proxy. Hosting ASP.NET Core applications with Linux is documented here.

Last but not least Radzen generates a Docker file. If you are familiar with Docker you can use that file to deploy the application.

Hi korchev,

I follow the instruction to configure "nginx reverse proxy". Now, I can access the "Application". But I can not see any data on my "Application". I found some error message from nginx's access.log.

172.16.63.1 - - [24/Jun/2020:07:41:07 +0000] "GET /pmslog/odata/Database1/Ppplogs?$top=100&$skip=0&$orderby=Date%20desc&$count=true HTTP/1.1" 404 152 "http://172.16.63.132/pmslog/pms-logs-info" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:77.0) Gecko/20100101 Firefox/77.0"

It seems that I get the error "HTTP/1.1" 404 152".

How can I solve this issue ?

My MySQL Database is running on AWS's instance.

Regards,

Paul Wang

But I can not see any data on my "Application".

What does that mean? Do you see any pages? What does the browser developer tools say?

It seems that I get the error "HTTP/1.1" 404 152".

If you get 404 for the Odata services then you may have not deployed the complete .NET Core application. There is an easy way to test that by browsing http://localhost:5000 from your server. If it works as expected then the application is deployed.

Hi korchev,

I can see the page running from my bowser (not localhost). My Application should connect with MySQL Database.

I can not get the queried data from my browser. The data grid is empty.

This is my current status.

Regards,

Paul Wang

I suggest you check your application logs then. Probably the application cannot connect to your MySQL instance for some reason.

You can also run the application with dotnet server.dll and browse it from localhost - any exceptions will be displayed in the terminal.

Hi korchev,

Thanks for your suggestion. The issue was solved.

Regards,

Paul Wang