self-hosting

SSL: NancyFx Selfhost Mono Linux (pi)

爷,独闯天下 提交于 2019-12-12 08:54:22
问题 I am new to linux (PI) and mono, applogies for the newbie question How do I run NancyFx, shelf host, over https, on mono/linux/pi? If i am able to create a certificate using OpenSsl (cer file), how do I assign it to a port? in the docs show how to do this for windows (here https://github.com/NancyFx/Nancy/wiki/Accessing-the-client-certificate-when-using-SSL#configuration-of-hostingself) thanks 回答1: I have no knowledge of PI at all, but I assume it's not much different than hosting on any

“System.MissingMemberException: The server factory could not be located” starting Microsoft.Owin self-hosted in TeamCity

天涯浪子 提交于 2019-12-12 08:21:47
问题 When Teamcity runs an integration test that starts a self-hosted webapplication, the test fails with the error: System.MissingMemberException: The server factory could not be located for the given input: Microsoft.Owin.Host.HttpListener The code throwing this error is: var webApp = WebApp.Start<Startup>("http://*:52203/") The test runs fine when executed withing Visual Studio (using the Resharper test runner). Teamcity is configured to use the JetBrains.BuildServer.NUnitLauncher.exe

Unit Testing Web API using HttpServer or HttpSelfHostServer

我是研究僧i 提交于 2019-12-12 07:49:31
问题 I am trying to do some unit testing in for a Web API project. I am going simulate the web API hosting environment. It seems like that I could use In memory host (HttpServer) or self host (HttpSelfHostServer). Just wondering what are the difference and which technology is good for what and is there any limitation for those options. 回答1: You should use in memory host for end-to-end tests and then test the network connectivity of your environment separately. For a number of reasons: In memory

Self-Hosting WCF for AJAX Client

荒凉一梦 提交于 2019-12-12 01:31:52
问题 I'm trying to self-host a WCF web service and provide a HTTP endpoint with ajax support. Pretty much everything I've found about WCF and AJAX are talking about IIS, which I don't want to use. I've build a simple Console App to host the service. My service only have a single method: [ServiceContract] interface IMyService { [OperationContract] string TestConnection(); } And here's the app.config code: <services> <service name="Service.MyService" behaviorConfiguration="MyServiceBehavior" >

How to setup console self-host project for an existing Asp.NET Web API project

时光总嘲笑我的痴心妄想 提交于 2019-12-11 16:23:51
问题 I have ASP.NET web application. The template creates default web api controller ValuesController. I am trying to create console application to self-host using Microsoft.AspNet.WebApi.OwinSelfHost version 5.2.6. Solution structure looks like: Startup.cs in SelfHost.Server, agree! not a good name, is looks like: HttpConfiguration config = new HttpConfiguration(); config.Routes.MapHttpRoute( "DefaultApi", "api/{controller}/{id}", defaults: new { id = RouteParameter.Optional }); app.UseWebApi

Owin Selfhost: deal with large files

╄→гoц情女王★ 提交于 2019-12-11 10:14:53
问题 I found this article: http://www.strathweb.com/2012/09/dealing-with-large-files-in-asp-net-web-api/ It tells how to set the TransferMode when Selfhosting with System.Web.Http.Selfhost. Is there a similar way to set the TransferMode to Streaming when selfhosting with Owin instead? 回答1: As far as I can tell Microsoft's Owin server already streams all uploads and downloads. How you handle this data in your WebApi (or equivalent) determines whether or not it gets fully buffered or stays as a

NancyFx Queries to JSON files stripping the JSON extension from request URL

▼魔方 西西 提交于 2019-12-11 08:39:48
问题 In one project I'm using Nancy to serve basic web content via Nancy Self-Host. This generally works, but unfortunately, running queries on endpoints ie http://localhost/data.json results in the module receiving a request url of http://localhost/data . When I query localhost/data.json I get a nancy-generated 404 response... in JSON. I have no clue why this is happening, and can't find this behavior documented anywhere. Here's my module: public class NancySimpleWebModule : NancyModule { ///

ReactJS, ExpressJS different application Architectures & Modeling and Deployments

情到浓时终转凉″ 提交于 2019-12-11 07:04:44
问题 I have gone through different blog articles to find out how a full-fledged application can be modeled and developed with React,Redux (working on front-end) with API end-points communicating with an ExpressJS server. To my knowledge, we need to have: a). One expressJS application developed with all possible end-points (available for an API access). This application should be running on a port e.g. 7070 . This server side application will be communicating with the database. b). Develop a React

selfhost wcf service : how to pass stream variables

风流意气都作罢 提交于 2019-12-11 04:16:09
问题 I have an issue with passing a stream type variable to a self hosted rest service. Here is my code in client application static void Main(string[] args) { ChannelFactory<IService> cf = new ChannelFactory<IService>(new WebHttpBinding(), "http://localhost:8000"); cf.Endpoint.Behaviors.Add(new WebHttpBehavior()); IService channel = cf.CreateChannel(); string strQuery = "<?xml version=\"1.0\"?><wql host='192.168.1.115' username='domain\\sebastian' password='password' Type='powershell'><query id=