Copied to clipboard

Flag this post as spam?

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


  • Limroto 1 post 81 karma points
    Apr 15, 2022 @ 23:43
    Limroto
    0

    Umbraco 9 can't start self-contained publish... in my project

    I have tried installing the NuGet template Umbraco.Cms version 9.4.3, and tried to setup a Publish profile from it. It will be .NET 5 or .NET (6), self-contained, and x86 (x64 has also been tried), and published to a folder.

    1. We are missing all the /Views, /App_Plugins, and /umbraco.

      This can be fixed by adding the following to the .csproj-file:

      ``` ...

      ```

      Adding a valid connectionstring in appsettings.json, and publishing that, this will produce a running site on http://localhost:5000.

    2. I have a problem; I get the following error for my site, where everything has been mirrored from this default project:

    Unhandled exception. System.InvalidOperationException: No hashing type found by name SHA1 at Umbraco.Extensions.StringExtensions.GenerateHash(String str, String hashType) at Umbraco.Extensions.StringExtensions.ToSHA1(String stringToConvert) at Umbraco.Extensions.StringExtensions.GenerateHash(String str) at Umbraco.Cms.Web.Common.AspNetCore.AspNetCoreHostingEnvironment.get_ApplicationId() at Umbraco.Extensions.LoggerConfigExtensions.MinimalConfiguration(LoggerConfiguration logConfig, IHostingEnvironment hostingEnvironment, ILoggingConfiguration loggingConfiguration, IConfiguration configuration, UmbracoFileConfiguration& umbFileConfiguration) at Umbraco.Cms.Core.Logging.Serilog.SerilogLogger.CreateWithDefaultConfiguration(IHostingEnvironment hostingEnvironment, ILoggingConfiguration loggingConfiguration, IConfiguration configuration, UmbracoFileConfiguration& umbracoFileConfig) at Umbraco.Extensions.ServiceCollectionExtensions.AddLogger(IServiceCollection services, IHostingEnvironment hostingEnvironment, ILoggingConfiguration loggingConfiguration, IConfiguration configuration) at Umbraco.Extensions.UmbracoBuilderExtensions.AddUmbraco(IServiceCollection services, IWebHostEnvironment webHostEnvironment, IConfiguration config) at Website.Startup.ConfigureServices(IServiceCollection services) in C:\Users\mypath\src\Website\Startup.cs:line 43 at System.RuntimeMethodHandle.InvokeMethod(Object , Span`1& , Signature , Boolean , Boolean ) at System.Reflection.RuntimeMethodInfo.Invoke(Object , BindingFlags , Binder , Object[] , CultureInfo ) at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.InvokeCore(Object instance, IServiceCollection services) at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.<>c__DisplayClass9_0.<Invoke>g__Startup|0(IServiceCollection serviceCollection) at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.Invoke(Object instance, IServiceCollection services) at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.<>c__DisplayClass8_0.<Build>b__0(IServiceCollection services) at Microsoft.AspNetCore.Hosting.GenericWebHostBuilder.UseStartup(Type startupType, HostBuilderContext context, IServiceCollection services, Object instance) at Microsoft.AspNetCore.Hosting.GenericWebHostBuilder.<>c__DisplayClass13_0.<UseStartup>b__0(HostBuilderContext context, IServiceCollection services) at Microsoft.Extensions.Hosting.HostBuilder.CreateServiceProvider() at Microsoft.Extensions.Hosting.HostBuilder.Build() at Website.Program.Main(String[] args) in C:\Users\mypath\src\Website\Program.cs:line 10

    I can't figure out what it is.

    I can run the site from Visual Studio's IIS, but I can't run the published version. It looks like it is missing its ApplicationId from the lines ... at Umbraco.Extensions.StringExtensions.GenerateHash(String str) at Umbraco.Cms.Web.Common.AspNetCore.AspNetCoreHostingEnvironment.get_ApplicationId()

    What could this be?

    I've deleted my entire /bin and /obj folder, but it doesn't help. I have tried publishing to my desktop, but still the same error.

    What is wrong here?

  • Rasmus Bækgaard 2 posts 42 karma points
    Apr 17, 2022 @ 06:09
    Rasmus Bækgaard
    0

    Looks like the issue stems from this line of code.

    "AppDomainAppId" is not set in the variable logConfig.

  • Rasmus Bækgaard 2 posts 42 karma points
    Apr 17, 2022 @ 20:37
    Rasmus Bækgaard
    100

    Error found:

    Umbraco cannot make a Publish with .NET (6) as expected. It can run on a Visual Studio's F5, but it cannot make a Publish.

    Downgrading to .NET 5 resolves the error.

    @Mods, can you close this ticket? (Yes, it is I who is OP)

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies