Skip to content

ponyspeed888/HostingDOTNETCoreInWPF

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This project demonstrate how to host dot net core web app in .net core WPF.

Steps

  1. Create Wpf Core Project
  2. Add the following packages

Microsoft.Extensions.Hosting Microsoft.AspNetCore

  1. Modify the code in App.xaml.cs. please note these two lines are required, please modify according to your project. Not sure when they are execute in standard asp.net core project, but in WPF host the webroot default to null

         .UseUrls("http://*:5000;http://localhost:5001;https://hostname:5002")
         .UseWebRoot(WEBROOT)         
    
  2. Create a .NET CORE WEB project and add as project reference of main Wpf project

  3. Go to localhost:5000 to see the hosted web site

About

Demonstrate how to host asp.net core in wpf core

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published