Questions tagged [self-hosting]

Operating independently of a hosting infrastructure

Self-hosting refers to a program or service which does not require a hosting environment. This term is often used to describe WCF web services that do not require IIS as their web host - a self-hosted WCF service establishes its own HTTP endpoints and listeners and is responsible for its own routing, security, and configuration management.

772 questions
17
votes
1 answer

Using WebAPI in LINQPad?

When I tried to use the Selfhosted WebAPI in LINQPad, I just kept getting the same error that a controller for the class didn't exist. Do I have to create separate assemblies for the WebAPI (Controllers/Classes) and then reference them in my…
NoLifeKing
  • 1,909
  • 13
  • 27
16
votes
1 answer

Managing evolutions in production environment

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…
Kristofer
  • 7,861
  • 6
  • 30
  • 31
14
votes
2 answers

Get current owin context in self host mode

I need to run my application which provides some ASP.NET Web API services on both IIS and .NET CLR self host modes. I developed my ASP.NET Web API services based on OWIN and it is working fine on both hosts. For now I need something like…
Yaser Moradi
  • 3,267
  • 3
  • 24
  • 50
13
votes
2 answers

Specify a Singleton service in a WCF self hosted service

I am writing an application that exposes a service via WCF. The service is self-hosted (console app) and needs to use a Singleton instance. I am trying to figure out how to specify singleton in the service configuration without using attributes on…
Erick T
  • 7,009
  • 9
  • 50
  • 85
13
votes
3 answers

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

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…
Simon Green
  • 1,131
  • 1
  • 10
  • 28
13
votes
1 answer

WCF self-hosted WebSocket Service with Javascript client

I have this WCF self-hosted WebSocket service code: Main: //Create a URI to serve as the base address Uri httpUrl = new Uri("http://192.168.1.95:8080/service"); //Create ServiceHost ServiceHost host = new ServiceHost(typeof(WebSocketService),…
MorgoZ
  • 2,012
  • 5
  • 27
  • 54
12
votes
1 answer

Self-hosted In Process Web API with Dot net core

I am trying to investigate the plausibility of moving to dot net core now 3.0 has been released. One of our key components allows our (private) nugets to create their own WebAPI, providing events and methods to the consumer. This supports…
Chris Watts
  • 822
  • 1
  • 9
  • 27
12
votes
1 answer

ASP.net 5 Self-Hosted on Live Windows Server - EACCES permission denied?

I was under the impression that we could actually run a console app on a live server that would listen and serve data (web pages if it were for that purpose). This way, we won't have to host our web apps on IIS. I always thought that this is what…
Mickael Caruso
  • 8,721
  • 11
  • 40
  • 72
12
votes
2 answers

Host Web API as Windows Service using OWIN

I'm trying to run a Web API application as a Windows Service using OWIN. However, I get the following message, when trying to start the service: The [ServiceName] service on Local Computer started and then stopped. Some services stop automatically…
SabrinaMH
  • 221
  • 1
  • 3
  • 11
12
votes
1 answer

Why do I get "Cannot resolve symbol 'CreatePerOwinContext'"?

I have a self hosted owin Web Api and I'm trying to use a single instance of my EF Context per Owin Request. Here is my config code for the startup class. public void Configuration(IAppBuilder app) { …
Brett
  • 321
  • 4
  • 15
12
votes
2 answers

asp.net web api self hosting / owin / katana

There are multiple question I have around self-hosting Self Hosting Nuget There are 2 nuget which provide self hosting : Microsoft.AspNet.WebApi.OwinSelfHost and Microsoft.AspNet.WebApi.SelfHost, so does microsoft have 2 implementation of self…
harishr
  • 17,807
  • 9
  • 78
  • 125
12
votes
2 answers

Should OWIN self host app using Ninject OWINHost need system.web?

I'm trying to create a Windows service with OWIN self hosted WebAPI with Ninject . I got it to work but I had to add a reference to system.web, which seems wrong. Without a reference to system.web I got these compile errors: The type…
HungryPipo
  • 265
  • 2
  • 11
12
votes
2 answers

Default route for root path using asp.net attribute routing

I'm using attribute routing from ASP.NET 5 RC, included in the Visual Studio 2013 RC release. I'd like for the root path, /, to lead to the canonical /Home/Index path, but I can't find a way to do this with just attribute routes. Is it possible, and…
gzak
  • 3,908
  • 6
  • 33
  • 56
12
votes
2 answers

What URL does OWIN understand for ipv6 self-hosting?

My application uses self-hosting feature of ASP.NET Web API. NuGet package name I use is Microsoft.AspNet.WebApi.SelfHost. I used following example as a base. Following code works for me to launch host on ipv4 localhost…
galets
  • 17,802
  • 19
  • 72
  • 101
12
votes
3 answers

Self-hosting WebAPI application referencing controller from different assembly

I came across this gem, which seemed to be close to what I wanted. However, I want to use the already-written controllers from a referenced assembly. My first crack was to reference the assembly, set up the routing rules the same as the original…
Ross
  • 2,448
  • 1
  • 21
  • 24
1
2
3
51 52