0

I've recently started working on an existing project built with ASP.NET Framework 4.8.1 WebForms. However, my development environment is Ubuntu Linux, which doesn't natively support ASP.NET Framework due to its dependency on Windows libraries.

Is there a way to use Docker to create a development container for this application? This would allow me to develop without needing to install a virtual machine (VM).

During my research, I encountered a Docker image named Mono, but I couldn't integrate it with my project structure, which consists of several projects within a solution file (Portal.Web.sln):

Portal.Web.sln
| -- Portal.Web/
| ---- Portal.Web.csproj
| -- Portal.Scripts/
| ---- Portal.Scripts.csproj
| -- Portal.Neg/
| ---- Portal.Neg.csproj
| -- Portal.Ent/
| ---- Portal.Ent.csproj
| -- Portal.Dao/
| ---- Portal.Dao.csproj`

It seems I need an .exe file to run everything at once. Can anyone guide me through setting up Docker with Mono to run this ASP.NET WebForms application on Ubuntu?

5
  • 2
    While you may have some luck with this, note WebForms is really old. There are much more modern Asp.net options out there. If this is a brand new project look as asp.net core app instead. There is much better docker support there. See medium.com/@goncxjo/… . It may be worth considering modernizing the app anyway
    – Jon P
    Commented Aug 23 at 1:26
  • 1
    As you asked about running it under Mono - from the looks of things it will be painful and IMO, not worth the effort - part of the problem is that ASP.NET is heavily tied to IIS - and even with Mono, there's no IIS on Linux. If your project is actually using ASP.NET MVC then it's actually quite straightforward to upgrade it to ASP.NET Core - but if it's using WebForms (.aspx/.ascx/.master files with "server-side events" like Button_Click) then you're SOL and you should invoice your client 2x for having to put up with it.
    – Dai
    Commented Aug 23 at 1:29
  • From experience I can tell you the best thing is to just go with the flow and use whatever common software is needed for whatever project that you happen to be working on, otherwise you will spend more time trying to get your tooling to work than developing the product! In this case I would install a VM with Windows and Visual Studio Commented Aug 23 at 7:48
  • So, I’m currently using a VM for development, but I’m still open to advice on bringing my development and deployment environment into Docker. If anyone can help with that, I would appreciate it. (>‿◠)✌ Commented Sep 14 at 16:19
  • Mono is not .NET Framework and not even close. You have to use a Windows machine and then Windows containers.
    – Lex Li
    Commented Sep 16 at 19:11

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.