Using c # winforms application to run owin
Created a launch configuration file
[assembly: OwinStartup(typeof(Chatter.Host.Startup))]
namespace Chatter.Host
{
public class Startup
{
public void Configuration(IAppBuilder app)
{
app.MapSignalR();
}
}
And then in my window form:
private void StartServer()
{
try
{
SignalR = WebApp.Start(URL);
}
catch (TargetInvocationException)
{
//Todo
}
this.Invoke((Action) (() => richTextBox1.AppendText("Server running on " + URL)));
How do I stop stopping / restarting the OWIN service, for example, would be great?
private void StopServer()
{
try
{
}
catch (TargetInvocationException)
{
}
}
source
share