Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Claushingebjerg 939 posts 2574 karma points
    Jan 13, 2022 @ 17:01
    Claushingebjerg
    0

    Umbraco in parallels on M1 Mac and deployment

    So im trying to venture into the realm of V9 - and trying to get a workflow up and running, that will make my MacFrontender life bearable.

    So i got windows 11 home for Arm up and running in parallels, got vs code up and running (not gonna use VS).

    Got a project up and running, compiled and running on localhost, with a DB on a server at the hosting provider. All as i wanted, great!!!

    So now i want to "upload" the site to the hosting provider.

    I run the dotnet publish -o ../deployment-artefacts -f net5.0 command as described on the install page, and upload the files from the now created "deployment-artefacts" folder. But i get a 500 error.

    enter image description here

    So now i'm stuck and ned heeeeeeeeeeeelp :|.

  • Damien Holley 180 posts 541 karma points
    Jan 14, 2022 @ 02:53
    Damien Holley
    0

    What does the event log say? (hit the start key and just type in 'event log')

  • Claushingebjerg 939 posts 2574 karma points
    Jan 14, 2022 @ 09:14
    Claushingebjerg
    0

    Thanks, but i dont have access to the "start key" on the hosting server :|. I uploaded via ftp.

  • Simon Justesen 74 posts 193 karma points
    Jan 14, 2022 @ 10:39
    Simon Justesen
    1

    Thanks, but i dont have access to the "start key" on the hosting server :|. I uploaded via ftp.

    Error 500 is coming from the server, i.e. on your localhost machine. I don't recall the exact key name (its called "environment", I think) change the value "production" in the config to "development" or "debug" to get better error messages. The error is likely due to your MSSQL connection string being incorrect, I tend to forget to write "server=" at the beginning of the string

  • Claushingebjerg 939 posts 2574 karma points
    Jan 19, 2022 @ 09:57
    Claushingebjerg
    0

    So i got a bit further... Through other channelse i was adviced to enable loggin.

    So i added

    <aspNetCore processPath="dotnet" arguments=".\sitename.dll" stdoutLogEnabled="true" stdoutLogFile=".\logs\stdout" hostingModel="inprocess">
          <handlerSettings>
          <handlerSetting name="debugFile" value=".\logs\aspnetcore-debug.log" />
          <handlerSetting name="debugLevel" value="FILE,TRACE,WARNING,ERROR,INFO" />
          </handlerSettings>
          </aspNetCore>
    

    This adds a logs folder, where errors are logged. Great!

    In the error log i get this error

    [aspnetcorev2.dll] InvalidOperationException 'Could not find dotnet.exe at 'D:\WEB\sitename.dk\www\dotnet.exe' or using the system PATH environment variable. Check that a valid path to dotnet is on the PATH and the bitness of dotnet matches the bitness of the IIS worker process.' caught at D:\workspace\_work\1\s\src\Servers\IIS\AspNetCoreModuleV2\CommonLib\HostFxrResolutionResult.cpp:64 
    

    My guess then is i have to publish the site as "Self contained"... Trying to do so in VS code

    dotnet publish --configuration Release --self-contained -o ../selfc
    

    then gives this error.

    C:\Program Files (x86)\dotnet\sdk\5.0.404\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets(126,5): error NETSDK1031: It is not supported to build or publish a self-contained application without specifying a RuntimeIdentifier. You must either specify a RuntimeIdentifier or set SelfContained to false. [\\mac\Home\Documents\umbtest\sitename\sitename.csproj]
    

    What runtimeidentifier should i use? and how do i use it?

Please Sign in or register to post replies

Write your reply to:

Draft