LogoLogo
HomeNewsSupportVideos
  • Introduction
  • Getting Started
  • What's new in 4.0
    • Known Issues
    • .NET Core Designer
    • Managed Graphics
    • Fluent Markup
    • Markdown Support
    • Upgrade from 3.x
  • Releases
    • What's new in 4.0
    • What's new in 3.5
    • What's new in 3.2
      • View Builder
      • Validation Rules
      • Enhanced Font Support
      • Design-Time Debug
    • What's new in 3.1
    • What's new in 3.0
      • FAQs
      • Update Existing Projects
      • Multi Targeting
      • Visual Studio Designer
      • Referencing Assemblies
      • Docker Support
      • Troubleshooting
      • Deployment
    • What's new in 2.5
    • What's new in 2.2
    • What's new in 2.1
    • What's new in 2.0
    • Upgrade from 1.x
  • Getting Started
    • New Project
    • Templates
    • Troubleshooting
    • License Activation
    • FAQ
    • API
    • Hybrid
    • Deployment
    • Theme Builder
  • Concepts
    • Startup
    • Configuration
    • Load Balancing
    • Designer
    • Layouts
    • Client Profiles
    • Tab Order
    • Compression
    • Embedded Resources
    • Modal Workflow
    • Localization
    • RightToLeft
    • Background Tasks
    • Real Time Web Applications
    • JavaScript
    • JavaScript Object Model
    • Security
    • Synchronization
    • Session Management
    • Theming
    • Dependency Injection
    • Application Switches
    • Visual Studio Code
  • Controls & Components
    • General
      • Application
      • AutoSizing
      • AutoScroll
      • AutoScaling
      • Accessibility
      • Colors & Fonts
      • Embedded Tools
      • Events
      • Touch Events
      • Images
      • Labels
      • ToolTips
      • Data Binding
      • Common Properties
      • Custom Painting
      • Move & Resize
      • Drag & Drop
      • Validation
      • User Data
      • Responsive Properties
      • VB.NET Extensions
    • Common Dialogs
      • FolderBrowserDialog
      • ColorDialog
      • OpenFileDialog
      • SaveFileDialog
    • Editors
      • TextBox
        • TagTextBox
        • MaskedTextBox
        • TypedTextBox
      • DateTimePicker
      • MonthCalendar
      • TimeUpDown
      • DomainUpDown
      • NumericUpDown
      • TrackBar
    • Buttons
      • Button
      • SplitButton
      • CheckBox
      • RadioButton
    • Containers
      • Page
      • Form
      • Desktop
      • Panel
      • FlexLayoutPanel
      • FlowLayoutPanel
      • TableLayoutPanel
      • GroupBox
      • Accordion
      • TabControl
      • UserPopup
      • UserControl
      • ToolBar
      • StatusBar
      • SplitContainer
      • SlideBar
    • Lists & Grids
      • ComboBox
        • UserComboBox
        • TreeViewComboBox
        • ListViewComboBox
      • ListBox
        • CheckedListBox
      • TreeView
      • ListView
      • DataGridView
        • Column
        • TextBoxColumn
        • ButtonColumn
        • LinkColumn
        • ImageColumn
        • MaskedTextBoxColumn
        • DateTimePickerColumn
        • NumericUpDownColumn
        • CheckBoxColumn
        • ComboBoxColumn
      • DataRepeater
      • PropertyGrid
    • Extenders
      • Animation
      • ToolTip
      • ErrorProvider
      • Rotation
      • StyleSheet
      • JavaScript
    • Media
      • Audio
      • Video
      • FlashPlayer
    • Content
      • Label
      • LinkLabel
      • PictureBox
      • ScrollBars
      • Upload
      • AspNetPanel
      • ImageList
      • PdfViewer
      • ProgressBar
      • Spacer
      • Widget
      • WebBrowser
      • IFramePanel
      • HtmlPanel
      • Canvas
      • Shape
      • Line
    • Menus
      • MainMenu
      • MenuBar
      • MenuItem
      • LinkMenuItem
      • ContextMenu
    • Notifications
      • AlertBox
      • MessageBox
      • Toast
    • Other Components
      • Timer
      • BindingSource
      • BindingNavigator
      • DataSet
      • EventLog
      • MessageQueue
      • PerformanceCounter
Powered by GitBook
On this page
  • Startup Files
  • Sub-Applications
  • Creating
  • Running
  • Entry Point
  • Startup Workflow
  • Rules for Finding the .json File
  • Default Document Configuration

Was this helpful?

Export as PDF
  1. Concepts

Startup

PreviousFAQNextConfiguration

Last updated 3 months ago

Was this helpful?

Wisej.NET applications typically have a single application in the broad sense. For clarity:

  • "Sub-application" refers to an application in the strict sense

  • Each Wisej.NET project requires at least one default sub-application

Startup Files

A new Wisej.NET project creates three startup files:

  • Default.html

  • Default.json

  • Program.cs

Default.html maintains ASP.NET convention for startup pages.

Program.cs contains the static (Shared in VB) Main method.

The .html and .json filenames should match for simplicity but this isn't required.

You can:

  • Rename Default.html and Default.json

  • Use .aspx files for pre-load .NET code execution (see )

Sub-Applications

Creating

Create sub-applications in the project's root or any project folder:

  1. Right-click project/folder → Add → New Item

  2. Select Wisej on left side

  3. Click Application in list

  4. Set application Name

  5. Click Add

Example with name "Admin" creates:

  • Admin.html

  • Admin.json

  • Admin.cs

The Admin.cs file mirrors Program.cs:

static class Admin
{
		/// <summary>
		/// The main entry point for the application.
		/// </summary>
    static void Main()
    {
    }
}
Public Module Program

	''' <summary>
	''' The main entry point for the application.
	''' </summary>
	Public Sub Main()
	End Sub
	
End Moule

Running

Wisej.NET sub-applications start with the .json file, not the .html file. Even when accessing a URL with .html, Wisej.NET looks for the corresponding .json file (rules explained below).

For the "Admin" example, Admin.json contains:

{
	"url": "Admin.html",
	"startup": "[ProjectName].Admin.Main, [ProjectName]"
}

This file provides two key pieces of information:

  • url - Which .html file to display in browser

  • startup - Which server-side method to execute

When accessing http://myApp.com/Admin, Wisej.NET:

  1. Locates Admin.json

  2. Reads the url key and loads Admin.html

  3. Invokes the startup method specified in Admin.json

  • Browsers require an HTML-like file

  • Wisej.NET requires browser to load/execute wisej.wx

  • Instead of startup method, you can specify sub-application's main view (details below)

Entry Point

Wisej.NET needs the server-side startup method - in this case [ProjectName].Project.Main in assembly [ProjectName].

To instantiate an AdminPage instead of executing Main, modify Default.json:

{
    "url": "Default.html",
    "mainWindow": "[ProjectName].AdminPage, [ProjectName]"
}

Startup Workflow

The Wisej.NET startup process follows these steps:

  1. Locate .json file

  2. Direct browser to load/display the url HTML file

  3. Execute server-side action based on .json file:

    • Run the startup method, or

    • Instantiate the mainWindow view

Specifying both startup and mainWindow properties causes Wisej.NET to execute both.

Rules for Finding the .json File

  1. Replace Extension with .json

    • For URLs ending with an extension (e.g., http://myserver.com/Startup.php)

    • Wisej.NET looks for matching .json file (\Startup.json)

    • If .json not found and Wisej.NET loaded, wisej.wx reloads current page

  2. Append Default.json to Folder Path

    • For folder URLs:

      • Root folder (http://myserver.com) → \Default.json

      • Folder path (http://myserver.com/Suppliers/) → \Suppliers\Default.json

  3. Handle URLs Without Extensions

    • For URLs like http://myserver.com/Customers, Wisej.NET:

      1. Tries \Customers.json

      2. If not found, treats "Customers" as folder and tries \Customers\Default.json

Default Document Configuration

The Web.config file in Wisej.NET project templates includes:

<defaultDocument enabled="true">
   <files>
       <add value="Default.html" />
   </files>
</defaultDocument>

This defaultDocument setting isn't required because:

  • Website root URLs are treated as folder paths

  • Wisej.NET automatically looks for \Default.json in the project root

  • Rule 2 above handles folder path resolution

Wisej.UserData