Skip to main content
A newer version of this page is available. .
All docs
V21.2
.NET Framework 4.5.2+

Create a WinForms Application (.NET 5+) with the Middle Tier Security (ASP.NET Core Web API) (CTP)

  • 2 minutes to read

Important

We do not recommend that you use the Web API in production code. We made this service available to gather feedback from anyone who considers it for future use.

This topic contains step-by-step instructions on how to create a WinForms application with the Web API as the Middle Tier server.

  1. Create a new solution in Visual Studio. Select the DevExpress v21.2 XAF Template Gallery project template.

    Create a new project from the XAF Template Gallery

  2. Specify the name and location of the new project (solution), and click Create.

  3. Ensure that the .NET Core platform is selected and run the XAF Solution Wizard.

    Tutorial launch Wizard

  4. In the Solution Wizard, select the Desktop (Windows Forms) and Service (ASP.NET Core Web API) platforms. Select platforms for XAF application

    Note

    If you select only the Desktop (Windows Forms) platform in step 4 and the Middle Tier Security - Web API Service (Windows Forms only) database security option in step 6, XAF automatically adds the Web API project to the solution.

  5. Select the eXpress Persistent Objects ORM for your application. The current Web API version does not support Entity Framework Core.

    Select ORM

  6. Choose the Standard (requests login and password) authentication and Middle Tier Security - Web API Service (Windows Forms only) database security options for your application.

    Select platforms for XAF application

  7. Optional. Select additional XAF modules.

  8. XAF generates a solution with the following projects:

    Name

    Description

    MySolution.Module

    the Module project

    MySolution.Module.Win

    the WinForms Module project

    MySolution.WebApi

    the Web API project

    MySolution.Win

    the WinForms Application project

    8.1. Right-click the Solution node in the Solution Explorer and choose Properties.

    8.2. In the Solution Property Pages dialog, expand the Common Properties node and choose Startup Project.

    8.3. Choose the Multiple Startup Projects option and select the Start action for the Web API and MySolution.Win projects.

    Run WinForms and Web API projects

  9. Run the application.

See Also