Wisej-4 .NET CORE Basics 101

Closed
0
0

 
Greetings sorry to trouble you…

is there a sample 2022 WiseJ-4 .NET CORE solution example. OR SOMETHING !? ANYTHING ? !

As I walk through several attempts to set up a NEW solution under WiseJ 4 .NET Core
the odd nuance differences between a regular Windows .NET Core solution
and the Wisej-4 keep tripping me up.

From the hosting model .NET 8 Minimal Hosting, versus Classic Hosting and
the myriad of potentially required supporting files to just initialize the environment,
program file, Startup.cs, launchSettings.json, SessionStartup.cs, Default.json.

I have implemented .NET CORE apps previously but from what I have tested thus far, refreshing
my memory on proper startup initialization of a pure .NET CORE app has enough differences from
initializing a new WiseJ-4 .NET CORE solution that it would bnot be beneficial.

The Stupid AI’s keep pulling up deprecated methods and properties not available in the current
version  EXAMPLES: 

Key points so far:
We are abandoning the Minimal Hosting Model for Wisej 4 on .NET 8.
Wisej 4 does not have AddWisej(), because it’s not an ASP.NET Core extension package. All necessary wiring is already in the Wisej 4 NuGet.
The proper setup is via Startup.cs that Wisej generates in the template. That file handles all Wisej middleware and bootstrap automatically.
Any EF Core services or other ASP.NET Core services are added alongside Wisej, not via services.AddWisej().
What this means for our Startup.cs
Do not call services.AddWisej().
The ConfigureServices in your Wisej project template already provides the needed services for Wisej.
You only add your own services (EF Core DbContext, logging, etc.) into ConfigureServices.

Example minimal Startup.cs snippet from a real Wisej 4 Web App template:

public class Startup
{
public Startup(IConfiguration configuration)
{
Configuration = configuration;
}

public IConfiguration Configuration { get; }

public void ConfigureServices(IServiceCollection services)
{
// Wisej services are already wired by the template – nothing to add here for Wisej itself

// Example: EF Core registration
services.AddDbContext<MyDbContext>(options =>
options.UseSqlServer(Configuration.GetConnectionString(“DefaultConnection”)));
}

public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
if (env.IsDevelopment())
app.UseDeveloperExceptionPage();

// Wisej automatically handles routing/middleware
app.UseWisej(); // this comes from Wisej template

// Optional ASP.NET Core middleware
app.UseRouting();
app.UseEndpoints(endpoints =>
{
endpoints.MapControllers();
});
}
}
✅ So the rule moving forward:
Keep Startup.cs as generated by Wisej.
Do not invent AddWisej() or similar.
Only add your own services inside ConfigureServices (like EF Core).
The Program.cs change we discussed is still valid — switch from Minimal
Hosting to classic UseStartup<Startup>().
If you want, the next step is to integrate EF Core cleanly into this existing
Wisej Startup.cs without breaking anything, so we can confirm the page loads first.
Do you want to go there next?
You said:
no lets get back on numberd track #2 2️⃣ Check launchSettings.json

ChatGPT said:

Perfect — let’s focus step 2: launchSettings.json.
This file controls how IIS Express or Kestrel launches your app.
Even if IIS Express says “running,” a misconfigured URL or port can prevent the page from loading.
1️⃣ Location
launchSettings.json is usually under:
blah,blah,blah.
By the time I make ANY progress the AI has “forgotten” the initial Parameters / constraints and starts
giving me erroneous info as if it “forgot” we need to use
SPECIAL WiseJ required hosting model Classic Hosting versus .NET 8 Minimal Hosting or whatever
Soo Confused ..
the designers open to allow me to toss a few controls on them to view anything
on the default page once loaded

  • You must to post comments
0
0

Create a blank new Wisej-4 project using the provided templates. It will create a sample for you with a couple of clicks. There are also dozens of samples in github.

This is a typical startup.cs with app.UseWisej();

https://github.com/iceteagroup/wisej-examples/blob/4.0/MDIExample/MDIExample/Startup.cs

In your solution there is no main method, the launchsettings doesn’t have true for launching the browser, the start url is wrong,  there is no call to app.Run(), the web.config is setup incorrectly for IIS instead of Kestrel (see comments in the one we provide). It doesn’t work with asp.net core regardless of wisej.net. If you copy the correct startup method it will work. We provide everything you need to make it work correctly.

https://dotnettutorials.net/lesson/asp-net-core-main-method/

https://stackify.com/how-to-deploy-asp-net-core-to-iis/  <– this works only when deploying in IIS, doesn’t work with Kestrel. This is all standard asp.net core.

 

 

 

 

 

  • Xenitel Developers
    Thanks I’ll keep trying Your runtimes are correct ✅ Designer fails because Visual Studio doesn’t fully support .NET 8 WinForms yet ⚠️ Options: Retarget to .NET 6/7 for designer. Use code-only edits for .NET 8. Upgrade VS to 17.10+ or VS 2023 preview. all runtimes are listed as installed but the designer still wont open ChatGPT said: Ah — that explains a lot. If the runtimes are installed but the designer still crashes or won’t open, then this is not a missing runtime issue anymore. You’re running into a designer-host vs .NET 8 mismatch issue in Visual Studio. Here’s what’s going on and how to fix it: ? Why the designer fails on .NET 8 Visual Studio 2022 (before 17.10+) does not fully support the .NET 8 WinForms designer. Even with all Desktop runtimes installed, the designer host (DesignToolsServer.exe) tries to load the .NET 6/7 design-time assemblies and throws a TypeInitializationException. This is a known limitation: design-time support lags behind runtime support in VS for the latest framework.
  • Luca
    • Luca
    • Aug 27, 2025 - 5:35 pm
    I have no idea what this means. See our documentation about Wisej-4 and the designer. Or contact support/sales for custom support.
  • You must to post comments
0
0

Wisej is a .NET Core middleware, which is typically added using UseWisej() (not AddWisej).

Create a new project using the provided templates and attach a new blank Wisej 4 project (without net48) that runs and opens a simple page with a label and a button. Look at the running project to see the setup, which is all standard net core and asp.net core.

  • Xenitel Developers
    I’m sorry , but I assuredly do not understand what you are suggesting here . So no there is no working examples for Wisej-4? You wrote: “Create a new project using the provided templates and attach a new blank Wisej 4 project” Literally do not understand what you are suggesting here…. I even included a zipped solution in my original question . THERE IS QUITE A BIT GOING ON FOR A .NET CORE solution- Even To JUST DEBUG locally on my machine Example: At this stage, make sure the profile, ports, and launch URLs are consistent. Once that’s confirmed, we know IIS Express is not blocking the page “is there a sample 2022 WiseJ-4 .NET CORE solution example. OR SOMETHING !? ANYTHING ? !” So no, there is no reference / sample Wisej 4 .NET CORE Example ? “..and attach a new blank Wisej 4 project (without net48) ” Well yeah a .NET CORE WiseJ project like the Wisej 4 Web Application (classic .NET Core) not a .Net Standard project that is the point HOW !
  • Gabriele Del Giovine
  • You must to post comments
Showing 2 results