WebMAP: WebForms to Web is a tool designed to convert ASP.NET web applications based on C# and Web Forms to a modern web architecture. Post-Conversion documentation for WebMAP WebForms.
With a brand new WebMAP: WebForms to Web converted application, let's dive into the necessary steps to have your application up and running.
This section explains in detail the following topics:
After converting your application, you will need the following applications before you run it for the first time:
- Visual Studio 2019, Build Tools for Visual Studio 2019. Your installation of Visual Studio, must include the following settings:
- Go to Workloads tab and turn on ASP.Net and web development, see the following example:
Visual Studio needed Workloads
Install Angular, if you haven't already. Please open a Command Line or PowerShell as an administrator and type the following command.
Update the npm configuration's registry key. This is required to resolve Mobilize's packages and should be done only once.
npm config set "@mobilize:registry" "https://packages.mobilize.net/npm/mobilizenet-npm/"
npm config set registry https://registry.npmjs.org/
Go to the converted application's folder, then go to the folder of the main project and then to the folder with angular in the name. Open the CommandLine pointing to this location. It should look as in the case of HelloWorldDemo.
Run the following command to install all the packages and their dependencies to run the UI. This step should only be done once.
The last command will build the UI and should be run after any change done to a component inside the angular folder.
npm run build
Now the user interface is ready!
- 1.Open the solution of the app using Visual Studio 2019.
- 2.Once you opened your project, go to the solution explorer (Can be opened through the "View" tab).
- 3.Right Click on your solution.
- 4.Click "Build Solution"
How to build your Application
- 1.Open your project solution.
- 2.Right click on the web project.
- 3.Select "Set as a Startup Project".
- 4.Click the Run button.
Startup Project configuration
If you followed all these steps you should have your application up and running!
For this example we will be using the HelloWorld project, once it is converted it will contain the following structure:
- helloworld folder: The main project folder.
- Project Pages: We will have all the pages of the project here, for more information about the structure of WebForms pages you can go to our Designer class documentation.
- wwwroot: Is a Virtual Directory of IIS server.
- helloworld-angular folder: Contains all the code related to the UI, for more information visit Workspace and project file structure.
- src folder.
- app folder.
- components folder: Contains all the angular components generated from the converted UI.
- app.component.css: It is the stylesheet used by the
- app.component.html: It is the HTML associated with the
- app.component.ts: This is the startup angular component of every migrated application
- app.module.ts: This module includes all the sub-modules of all the application. e.g. You have two projects (csproj): project1.csproj and project2.csproj. This will yield two sub-modules: project1.module.ts and project2.module.ts
- hello-world.module.ts: This module includes all the components of the hello-world csproj.
- assets folder: Contains all the images of the application.
- index.html: It is the page that launches the angular startup component: app.component
- Logs folder: You will find the logs related to the conversion and any error that might have occurred, for more information visit Error and Troubleshooting.
- Stubs folder: Any element that was not converted will be generated as a stub, for more information of what a stub is visit Error and Troubleshooting.
- HelloWorld.sln: Projects Solution.
- Lib folder: Several nuget dlls.
- nuget.config: Contains the package sources for the app.