Questions tagged [self-host-webapi]

Questions regarding Self-Host ASP.NET Web API

71 questions
0
votes
0 answers

Run ASP.NET webapi selfhost on Linux

I've created an ASP.NET web api on Windows that returns some test data as XML. I have installed the Nuget package Microsoft ASP.NET Web Api Self Host and in the web api I have configured a Selfhost with the port 1234. I have used the following…
Symxn
  • 65
  • 1
  • 2
  • 5
0
votes
1 answer

How to use corporate proxy in the OpenIdConnectConfigurationRetriever.GetAsync call?

I am very new to all things Microsoft and Azure and am not even sure that I have selected the correct tags for the question. In the Azure service source code (that I have inherited from a colleague) the following code fails with "Host not found"…
0
votes
1 answer

C#: Html file not hosted when application run as admin

I have an application build by Winform C#. In my application have code to selfhost html file and Web API but the self host web API needs administrator permission. So, I run as administrators on my application, while accessing the html page in my…
Nyako
  • 11
  • 6
0
votes
1 answer

Self hosting Web API

My program is for Self hosting a Web API in a Windows Application. As I dont have much experience in web servie, I request someone's help to fix the problem. I could make a console application successfully. But when I change it in to Windows…
0
votes
2 answers

Connecting to WebAPI2 endpoints(routes) throw Http code 503 for a controller and another controller works fine

I am using Owin self-hosting with WebAPI2. I have two controller classes and using attribute routing. One of them has following signature: [RoutePrefix("api/v1/devices")] public class DeviceController : ApiController { …
0
votes
2 answers

Self-hosted WCF can connect to localhost but can't connect remote

I have a self-hosted C# WCF .Net 4.6.1 Windows service that communicates with another self-hosted WCF service. This works fine when both services are on the same server. However, when I move the server to another computer, I get this error:…
Velocedge
  • 1,222
  • 1
  • 11
  • 35
0
votes
1 answer

SignalR app starts, runs on http but not on https: Unexpectedly closed connection

I have a self-hosted SignalR application in a Windows Service built with VS2015 FW 4.6, SignalR 2.3.0. This has been working fine for more than 2 years using ports 6286 (https) and 6287 (http) and "*" for the IP. I wanted to switch these ports to…
Velocedge
  • 1,222
  • 1
  • 11
  • 35
0
votes
1 answer

Mixed authorization (Windows NTLM & anonymous) in selfhosted owin application not working - "Authorization has been denied for this request"

I am trying to develop selfhosted OWIN WebApp. Everything OK, until I tried to integrate Windows (NTLM) authentication. Windows authentication works fine if only IntegratedWindowsAuthentication is activated. But I need some of the requests to remain…
0
votes
1 answer

Owin/System.Web.Http.SelfHost - Won't Start after migration to .NET Core

I migrated the project from .NET Framework to .NET Core, by creating a new project, importing the code and installing dependencies. Everything has gone well, except for the API component.Previously I used System.Web.Http.Selfhost, however now when I…
marens101
  • 101
  • 1
  • 5
0
votes
1 answer

Access Service Fabric cluster via .net standard with web api

I have a service fabric stateless service which I am running inside my cluster within azure At the moment the service in question only has 1 instance I would like to be able to access data in the service via web api How can I do this with .net…
Paul
  • 2,773
  • 7
  • 41
  • 96
0
votes
1 answer

Configure IdentityServer4 with OWIN self-hosted WebApi

I am trying to create an Identity Service using IdentityServer4. The service is self-hosted with OWIN (.Net Fx 4.7.x). Here are what I have tried so far. Attempt#1: Use the examples from the documentation: However, all the examples are based on .Net…
Sayan Pal
  • 4,768
  • 5
  • 43
  • 82
0
votes
1 answer

Selfhost webapi and access it from the unit test project

We have a webapi project with 4 endpoints and we have a lot of acceptance tests written in JMeter. The problem is that now the JMeter file has more than 20 MB and when we have a conflict on this file while merging the branches, it is difficult to…
Buda Gavril
  • 21,409
  • 40
  • 127
  • 196
0
votes
0 answers

Exception while recieving the HttpResponseMessage in the client

I have created a self hosted WEB API, which works pretty well. While returning an object through HttpResponseMessage, I get an exception in the client code. Exception reads - "The underlying connection was closed: An unexpected error occurred on a…
GeeKay
  • 1
  • 3
0
votes
1 answer

How to relay http web request to on premise api based on web sockets

I have to implement an arquitecture for sorting out the problem represented by the following picture: Cloud to On-Premise API Basically, I have to deploy a public API in the cloud (Azure), but the data are located in on-premise machines. The…
0
votes
1 answer

.net webapi self hosted ssl

I would like to create a self hosted webapi that is reachable over https (ssl). I am a little bit confused because I see many different ways to do this. I read something about Karma and owin. As I know Owin is the current way to do this. Ao I…
Franki1986
  • 1,320
  • 1
  • 15
  • 40