self-hosting

Managing evolutions in production environment

﹥>﹥吖頭↗ 提交于 2019-12-02 20:49:39
We are in the process of deploying a new application using play 2.1.1 to production and are having some real issues with it and the very limited documentation didn't help much... So it was time to update to a new version, we ran our usual stop/upgrade/start scripts but they failed. For some reason, play was refusing to apply the evolutions. When starting it kept saying Oops, cannot start the server. @6elnj89fh: Database 'default' needs evolution! This was even though we tried setting applyEvolutions.default=true both through command line and in the application_prod.conf file. It also

ASP.NET Web API Self-Host with Windows Authentication

☆樱花仙子☆ 提交于 2019-12-02 17:10:22
I am trying to use the ASP.NET Web API Self-Host option with Windows authentication so I can determine the logged on user and ultimately accept or reject the user based on their identity. Here is my console application code: using System; using System.Web.Http; using System.Web.Http.SelfHost; namespace SelfHost { class Program { static void Main(string[] args) { var config = new HttpSelfHostConfiguration("http://myComputerName:8080"); config.UseWindowsAuthentication = true; config.Routes.MapHttpRoute( "API Default", "api/{controller}/{id}", new { id = RouteParameter.Optional }); using

Issue after updating to mono 4.0.1 on Ubuntu

北城余情 提交于 2019-12-02 01:30:32
问题 I just upgraded to the just released Mono version 4.0.1 on my ubuntu machines. The previous installed version of mono was 3.2.7 (if I remember correctly). Now the issue: My first issue is regarding SignalR and self-hosting. I have a .NET 4.5.1 console application in which I self host NancyFx, Web Api and SignalR using OWIN. When running on mono 3.2.7 there was no issues to my knowledge but when I try to start the application on mono 4.0.1 I get the following stack trace: Unhandled Exception:

Issue after updating to mono 4.0.1 on Ubuntu

烈酒焚心 提交于 2019-12-01 22:35:53
I just upgraded to the just released Mono version 4.0.1 on my ubuntu machines. The previous installed version of mono was 3.2.7 (if I remember correctly). Now the issue: My first issue is regarding SignalR and self-hosting. I have a .NET 4.5.1 console application in which I self host NancyFx, Web Api and SignalR using OWIN. When running on mono 3.2.7 there was no issues to my knowledge but when I try to start the application on mono 4.0.1 I get the following stack trace: Unhandled Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.

Multiple instances of a self hosted WCF service

一世执手 提交于 2019-12-01 21:49:57
问题 We have a "worker" service running from console application in c#, for development we were always running a single instance of this service, which fetches chunks of data and performs some calculations, these chunks of data are provided by another service (which keeps track of how much data is left etc.) Now in QA we want to run multiple instances of the "worker" service simultaneously (on the same machine).However we are get an exception as soon as the second instance is launched: The

How do I remotely access self-hosted Nancy service?

拥有回忆 提交于 2019-12-01 11:53:19
I am creating a simple Windows service that hosts a Nancy instance to provide views of its internal data. Everything works as expected when using a browser on the local machine; I see the view that it serves up. However, I cannot find any reason why it will not access from a remote browser (on the same network). Access from a remote browser simply delays a while; IE will eventually display "This page can’t be displayed;" Safari on an iPad shows the partial progress bar for a while and does nothing. I'm binding using all local IPs, not just localhost. I am using the GetUriParams() function at

How do I remotely access self-hosted Nancy service?

一世执手 提交于 2019-12-01 08:02:09
问题 I am creating a simple Windows service that hosts a Nancy instance to provide views of its internal data. Everything works as expected when using a browser on the local machine; I see the view that it serves up. However, I cannot find any reason why it will not access from a remote browser (on the same network). Access from a remote browser simply delays a while; IE will eventually display "This page can’t be displayed;" Safari on an iPad shows the partial progress bar for a while and does

Finish current requests when stopping self-hosted owin server

一曲冷凌霜 提交于 2019-12-01 03:29:19
问题 I have OWIN server as part of console app. You can see the main method here: class Program { public static ManualResetEventSlim StopSwitch = new ManualResetEventSlim(); static void Main(string[] args) { Console.CancelKeyPress += (s, a) => { a.Cancel = true; StopSwitch.Set(); }; using (WebApp.Start<Startup>("http://+:8080/")) { Console.WriteLine("Server is running..."); Console.WriteLine("Press CTRL+C to stop it."); StopSwitch.Wait(); Console.WriteLine("Server is stopping..."); } Console

SignalR self hosted windows service, listening for messages

♀尐吖头ヾ 提交于 2019-11-30 23:23:39
I'm attempting to build a windows service that's self-hosting SignalR. I have read through tutorials such as SignalR Self-Host on ASP.Net I'm noticing that, least it seems, that they're based around broadcasting messages, and can't seem to find anything around listening. I need to listen to messages from within the service, as well as broadcast. We already have our backplane setup - it's the same one that the site uses. In a web site I can join a group, via Javascript. How do I join a group in a self-hosted SignalR service. In a web site I register a callback on a hub. How do i register the

WCF Service behind firewall – How to set up port forwarding?

元气小坏坏 提交于 2019-11-30 20:33:29
问题 I'm just getting into WCF programming. I've set up a self-hosted test web service on my work computer, which is behind a firewall; it's at http://localhost:8000/MyTestService . I can access the service page through the browser; all working fine. Now I want to access that service from my home computer, which is on a different network. I have a dynamic dns (call it mydomain.dyndns.org) set up to point to my work router. Have tested, dyndns is pointing to the right address. Now I have installed