Last post Sep 09, 2019 05:14 AM by Masterpiece88
Sep 02, 2019 06:31 PM|alexander.hoffenborg|LINK
After countless of hours spent googling, I really need some help to understand how publishing a website works. Bear with me -- I know how to code, but this is my first time actually publishing something. Perhaps I'm just stupid, and am unable to understand
the online guides, but I think I'm almost there.
I have a Plesk server at one of the big hosting websites. It's a windows server. They gave me a .publishsettings-file that contains the following xml (though naturally the parameters aren't blank):
<publishData><publishProfile profileName="" publishMethod="" publishUrl="" msdeploySite="" userName="" destinationAppUrl="" controlPanelLink=""/></publishData>
I right-clicked on my profile in Visual Studio, selected Publish, imported the file, and pressed the publish button. The result was that files were uploaded to Plesk server in the following structure:
The wwwroot-folder contains css, js, and images, but not html or cshtml. As a web developer, the first thing that confused me is the lack of cshtml-files, but I figured maybe they aren't needed because of how .NET handles dlls? Regardless, going to my website
just gives me a "500 - Internal server error".
Can someone explain to me, as if I was an eight year-old, what exactly I need to do to get my website up and running. Should I change a publish-file to include my cshtml-files? Do I need to change some settings, either on the server or in VS? Do I need to
change the project structure?
I'm really sorry if this is a stupid question, and thank you very much for your patience.
Sep 03, 2019 03:17 AM|Rena Ni|LINK
ASP.NET Core 2.x is not preinstalled with Plesk Onyx, but can be installed manually. Please check the hosting features have been downloaded successfully.
And you need to check the Configuring by the following link before you publish the project on plesk server.
Sep 03, 2019 09:18 AM|dharmeshsharma|LINK
You have to install .net core 2.2 runtime sdk from https://dotnet.microsoft.com/download and install on server. Upload your website and change Application Pool setting. in application pool setting change
.net CLR version to "No managed code". Add read and write permission your webconfig and appsetting.json.
Only this setting for me to run .net core 2.2 application.
let me if anything is missing.
Sep 03, 2019 12:18 PM|bluMarmalade|LINK
you can't see cshtml files in your folder because when you publish your app it gets compiled to dll files. remember it's not a static website, it's an application that creates and returns html and webpages at your controller/razorpages routes. your cshtml
files are what is being returned as html. that is why your app can also be it's own server(kestrel)
your application needs to be executed to run/start. but in order for your plesk server to be able to do that you need to install a runtime for dotnet core on the server. it is also possible to publish a self contained app together with the runtime, but
that is probably not needed for your scenario
Sep 03, 2019 12:42 PM|Mikesdotnetting|LINK
Should I change a publish-file to include my cshtml-files?
Regardless, going to my website just gives me a "500 - Internal server error".
<aspNetCore processPath="dotnet" arguments=".\<your app>.dll" stdoutLogEnabled="true" stdoutLogFile=".\logs\stdout" />
Then check the error message in the log after you have tried to run the site.
Sep 09, 2019 05:14 AM|Masterpiece88|LINK
Plesk doesn't support .net core on their panel. So, you must ask your hosting provider to setup .NET Core for you. You can refer to this post
Just make sure to setup your application pool to no managed code