Hi
Apologize for the long post. Just trying to set the context.
Hopefully, someone can help me. I have created a simple WiseJ application with very little code. It’s mostly for screen design.
I am using Visual Studio 2022 and the project works fine in Debug mode, as expected. I then publish to a folder using Release Mode, Net7.0, and Portable.
I test it manually, but by executing the LauncherTool.exe I can navigate to http://localhost:5000. – Screenshot provided.
My Docker file:
FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS BaseWORKDIR /appCOPY . ./EXPOSE 80EXPOSE 443ENTRYPOINT [“dotnet”, “LauncherTool.dll”]
The type initializer for ‘Wisej.Web.Control’ threw an exception.
at Wisej.Web.Control.get_DefaultMargin() at Wisej.Web.Control..ctor() at Wisej.Web.ScrollableControl..ctor() at Wisej.Web.ContainerControl..ctor() at Wisej.Web.Page..ctor() at LauncherTool.SQLEditor..ctor() in D:\Development\LauncherTool\LauncherTool\SQLEditor.cs:line 10 at LauncherTool.Program.Main() in D:\Development\LauncherTool\LauncherTool\Program.cs:line 18 at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor) at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr) — End of stack trace from previous location — at Wisej.Web.Application.Start() at Wisej.Core.ResponseManager.b__29_0() at Wisej.Core.IWisejSynchronizedImplementation.Lock(IWisejSynchronized target, Action action) at Wisej.Core.ResponseManager.OnLoad(Session session, Object message) at System.Dynamic.UpdateDelegates.UpdateAndExecuteVoid3[T0,T1,T2](CallSite site, T0 arg0, T1 arg1, T2 arg2) at Wisej.Core.ResponseManager.ProcessRequest(ServiceType service, Object message)
using System;using System.Collections.Specialized;using Wisej.Web;namespace LauncherTool{internal static class Program{/// <summary>/// The main entry point for the application./// </summary>static void Main( ){Application.MainPage = new SQLEditor();}}}
using System;using Wisej.Web;using Wisej.Ext.BootstrapIcons;using Wisej.Core;namespace LauncherTool{public partial class SQLEditor : Page{public SQLEditor(){InitializeComponent();}}}
Hi,
Thank you so much! It’s working now. I encountered an issue with my Linux Docker builder, which required me to uninstall and reinstall it. After updating my Dockerfile with your suggested modifications, everything is functioning correctly.
Initially, I tried implementing your changes on a Docker-Windows container, but I couldn’t find the apt-get application, and the NuGet packages were missing some of the libraries I needed. However, after reinstalling Docker and switching to the Docker-Linux builder, everything works perfectly.
Cheers!
Hi Paresh,
The issue your having is due to the fact that the LibGdiPlus library is not installed.
Please modify your Dockerfile like the example below:
#Install ms fonts.
RUN sed -i’.bak’ ‘s/$/ contrib/’ /etc/apt/sources.list
RUN apt-get update; apt-get install -y ttf-mscorefonts-installer fontconfig
Please login first to submit.